Text-to-SQL systems translate natural language (NL) questions into SQL queries, enabling non-technical users to interact with structured data. While large language models (LLMs) have shown promising results on the text-to-SQL task, they often produce semantically incorrect yet syntactically valid queries, with limited insight into their reliability. We propose SQLens, an end-to-end framework for fine-grained detection and correction of semantic errors in LLM-generated SQL. SQLens integrates error signals from both the underlying database and the LLM to identify potential semantic errors within SQL clauses. It further leverages these signals to guide query correction. Empirical results on two public benchmarks show that SQLens outperforms the best LLM-based self-evaluation method by 25.78% in F1 for error detection, and improves execution accuracy of out-of-the-box text-to-SQL systems by up to 20%.
ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL
Soochow University(苏州大学);Guangdong Laboratory of Artificial Intelligence and Digital Economy (SZ)(广东省人工智能与数字经济发展实验室);South China University of Technology(华南理工大学);University of Chinese Academy of Sciences(中国科学院大学);Alibaba DAMO Academy(阿里巴巴达摩院);International Digital Economy Academy (IDEA), China(国际数字经济学院(IDEA),中国)
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(北京大学与同济大学行为与空间人工智能实验室)
ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement
The Hong Kong Polytechnic University(香港理工大学);City University of Macau(澳门城市大学);Jilin University(吉林大学);Harbin Institute of Technology (Shenzhen)(哈尔滨工业大学(深圳));Beihang University(北航大学)
Causal Episodic Memory for Feedback-Driven Agent Repair
Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Faculty of Computer Science and Engineering, Ho Chi Minh City University of Technology (HCMUT), VNU-HCM(胡志明市理工大学计算机科学与工程学院(HCMUT,VNU-HCM))