SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent Collaboration
Jipeng Cen, Jiaxin Liu, Zhixu Li, Jingjing Wang
摘要
While fine-tuned large language models (LLMs) excel in generating grammatically valid SQL in Text-to-SQL parsing, they often struggle to ensure semantic accuracy in queries, leading to user confusion and diminished system usability. To tackle this challenge, we introduce SQLFixAgent, a new consistency-enhanced multi-agent collaborative framework designed for detecting and repairing erroneous SQL. Our framework comprises a core agent, SQLRefiner, alongside two auxiliary agents: SQLReviewer and QueryCrafter. The SQLReviewer agent employs the rubber duck debugging method to identify potential semantic mismatches between SQL and user query. If the error is detected, the QueryCrafter agent generates multiple SQL as candidate repairs using a fine-tuned SQLTool. Subsequently, leveraging similar repair retrieval and failure memory reflection, the SQLRefiner agent selects the most fitting SQL statement from the candidates as the final repair. We evaluated our proposed framework on five Text-to-SQL benchmarks. The experimental results show that our method consistently enhances the performance of the baseline model, specifically achieving an execution accuracy improvement of over 3% on the Bird benchmark. Our framework also has a higher token efficiency compared to other advanced methods, making it more competitive.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors 引用了 RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
- Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors 引用了 Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- GBV-SQL: Guided Generation and SQL2Text Back-Translation Validation for Multi-Agent Text2SQL 引用了 RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
- ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement 引用了 SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL
- ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement 引用了 Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL 引用了 Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Least-to-Most Prompting Enables Complex Reasoning in Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation 引用了 RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
- Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- From Text to Simulation: A Multi-Agent LLM Workflow for Automated Chemical Process Design 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
引用它的顶会 Paper6
- SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQLYue Gong, Chuan Lei, Xiao Qin, Kapil Vaidya 等NeurIPS 2025 · 21 次引用
- ErrorLLM: Modeling SQL Errors for Text-to-SQL RefinementZijin Hong, Hao Chen, Zheng Yuan, Qinggang Zhang 等KDD 2026 · 3 次引用
- Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL ErrorsJiawei Shen, Chengcheng Wan, Ruoyi Qiao, Jiazhen Zou 等FSE 2026 · 1 次引用
- From Text to Simulation: A Multi-Agent LLM Workflow for Automated Chemical Process DesignXufei Tian, Wenli Du, Shaoyi Yang, Han Hu 等AAAI 2026 · 1 次引用
- GBV-SQL: Guided Generation and SQL2Text Back-Translation Validation for Multi-Agent Text2SQLDaojun Chen, Xi Wang, Shenyuan Ren, Qingzhi Ma 等ACL 2026
它引用的 Paper14
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 次引用
- Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun 等VLDB 2024 · 609 次引用
- RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLHaoyang Li, Jing Zhang, Cuiping Li, Hong ChenAAAI 2023 · 343 次引用
- Least-to-Most Prompting Enables Complex Reasoning in Large Language ModelsDenny Zhou, Nathanael Schärli, Le Hou, Jason Wei 等ICLR 2023 · 318 次引用
相关 Paper
- TS-SQL: Test-driven Self-refinement for Text-to-SQLWenbo Xu, Haifeng Zhu, Liang Yan, Chuanyi Liu 等EMNLP Findings 2025 · 2 次引用
- ToolSQL: A Tool-Assisted Agent for SQL Verification and RefinementZhongyuan Wang, Richong Zhang, Zhijie Nie, Jaein KimKDD 2025 · 2 次引用
- OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency AlignmentXiangjin Xie, Guangwei Xu, Lingyan Zhao, Ruijie GuoSIGMOD 2025 · 28 次引用
- MARS-SQL: A Multi-Agent Reinforcement Learning Framework For Text-To-SQLHaolin Yang, Jipeng Zhang, Zhitao He, Alexander Zhou 等ICML 2026 · 12 次引用
- SafeQL: Search-based Refinement for Safe and Efficient LLM-based Text-to-SQLGeonho Lee, Min-Soo KimVLDB 2026
