Large language models (LLMs) have revolutionized Text-to-SQL generation, allowing users to query structured data using natural language with growing ease. Yet, real-world deployment remains challenging, especially in complex or unseen schemas, due to inconsistent accuracy and the risk of generating invalid SQL. We introduce Template Constrained Decoding (TeCoD), a system that addresses these limitations by harnessing the recurrence of query patterns in labeled workloads. TeCoD converts historical NL-SQL pairs into reusable templates and introduces a robust template selection module that uses a fine-tuned natural language inference model to match or reject queries efficiently. Once the template is selected, TeCoD enforces it during SQL generation through grammar-constrained decoding, implemented via a novel partitioned strategy that ensures both syntactic validity and efficiency. Together, these components yield up to 36% higher execution accuracy than in-context learning (ICL) and 2.2x lower latency on matched queries.
Evaluating LLMs on Conversational Text-to-SQL under Chain Ambiguity and Intent Drift
The Hong Kong Polytechnic University(香港理工大学);City University of Macau(澳门城市大学);Jilin University(吉林大学);Beihang University(北京航空航天大学);Jinan University(暨南大学)
Are These Modules Worth Their Cost? A Paradigm-Level Accuracy-Cost Analysis of In-context Learning Text-to-SQL
Jinan University(暨南大学);The Hong Kong Polytechnic University(香港理工大学);City University of Macau(澳门城市大学);Jilin University(吉林大学);Beihang University(北京航空航天大学)
ZAS-SQL: Distilling Rules from Failures for Zero-Shot Text-to-SQL
Shanghai Research Institute for Intelligent Autonomous Systems, Tongji University(同济大学上海自主智能无人系统科学中心);College of Architecture and Urban Planning, Tongji University(同济大学建筑与城市规划学院);Behavioral and Spatial AI Lab, Peking University & Tongji University(北京大学与同济大学行为与空间人工智能实验室)
BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation
Center for Computational & Data Sciences, Independent University, Bangladesh(计算与数据科学中心,独立大学,孟加拉国);University of Massachusetts Amherst(马萨诸塞大学阿默斯特分校);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)
Reflect to Inform: Boosting Multimodal Reasoning via Information-Gain-Driven Verification
University of Science and Technology of China(中国科学技术大学);Huawei Foundation Model Department(华为基础模型部);The Chinese University of Hong Kong(香港中文大学);Hong Kong University of Science and Technology(香港科技大学)
LLM-Based Test Case Generation in DBMS through Monte Carlo Tree Search
Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳));The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));Huawei Hong Kong Research Center(华为香港研究中心)