Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
Dawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun, Yichen Qian, Bolin Ding, Jingren Zhou
摘要
Large language models (LLMs) have emerged as a new paradigm for Text-to-SQL task. However, the absence of a systematical benchmark inhibits the development of designing effective, efficient and economic LLM-based Text-to-SQL solutions. To address this challenge, in this paper, we first conduct a systematical and extensive comparison over existing prompt engineering methods, including question representation, example selection and example organization, and with these experimental results, we elaborate their pros and cons. Based on these findings, we propose a new integrated solution, named DAIL-SQL, which refreshes the Spider leaderboard with 86.6% execution accuracy and sets a new bar. To explore the potential of open-source LLM, we investigate them in various scenarios, and further enhance their performance with supervised fine-tuning. Our explorations highlight open-source LLMs' potential in Text-to-SQL, as well as the advantages and disadvantages of the supervised fine-tuning. Additionally, towards an efficient and economic LLM-based Text-to-SQL solution, we emphasize the token efficiency in prompt engineering and compare the prior studies under this metric. We hope that our work provides a deeper understanding of Text-to-SQL with LLMs, and inspires further investigations and broad applications.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 131 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale 引用了 LoRA: Low-Rank Adaptation of Large Language Models
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale 引用了 Large Language Models are Zero-Shot Reasoners
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale 引用了 CodeS: Towards Building Open-source Language Models for Text-to-SQL
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction 引用了 Large Language Models are Zero-Shot Reasoners
- Large Language Models are Zero-Shot Reasoners 引用了 Training language models to follow instructions with human feedback
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning 引用了 OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning 引用了 CodeS: Towards Building Open-source Language Models for Text-to-SQL
- The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ] 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ] 引用了 CodeS: Towards Building Open-source Language Models for Text-to-SQL
- AgentBench: Evaluating LLMs as Agents 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- AgentBench: Evaluating LLMs as Agents 引用了 Training language models to follow instructions with human feedback
- CodeS: Towards Building Open-source Language Models for Text-to-SQL 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- CodeS: Towards Building Open-source Language Models for Text-to-SQL 引用了 Training language models to follow instructions with human feedback
引用它的顶会 Paper131
- AgentBench: Evaluating LLMs as AgentsXiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu 等ICLR 2024 · 748 次引用
- The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ]Boyan Li, Yuyu Luo, Chengliang Chai, Guoliang Li 等VLDB 2024 · 137 次引用
- CodeS: Towards Building Open-source Language Models for Text-to-SQLHaoyang Li, Jing Zhang, Hanbing Liu, Ju Fan 等SIGMOD 2024 · 124 次引用
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement LearningPeixian Ma, Xialie Zhuang, Chengjin Xu, Xuhui Jiang 等NeurIPS 2025 · 94 次引用
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at ScaleHaoyang Li, Shang Wu, Xiaokang Zhang, Xinmei Huang 等VLDB 2025 · 90 次引用
它引用的 Paper18
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo 等NeurIPS 2022 · 8,168 次引用
- MPNet: Masked and Permuted Pre-training for Language UnderstandingKaitao Song, Xu Tan, Tao Qin, Jianfeng Lu 等NeurIPS 2020 · 1,957 次引用
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 次引用
相关 Paper
- Enhancing Text-to-SQL Parsing through Question Rewriting and Execution-Guided RefinementWenxin Mao, Ruiqi Wang, Jiyu Guo, Jichuan Zeng 等ACL Findings 2024 · 19 次引用
- Enhancing Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design StrategiesLinyong Nan, Yilun Zhao, Weijin Zou, Narutatsu Ri 等EMNLP Findings 2023 · 49 次引用
- SQLForge: Synthesizing Reliable and Diverse Data to Enhance Text-to-SQL Reasoning in LLMsYu Guo, Dong Jin, Shenghao Ye, Shuangwu Chen 等ACL Findings 2025 · 3 次引用
- DTS-SQL: Decomposed Text-to-SQL with Small Large Language ModelsMohammadreza Pourreza, Davood RafieiEMNLP Findings 2024 · 71 次引用
- PURPLE: Making a Large Language Model a Better SQL WriterTonghui Ren, Yuankai Fan, Zhenying He, Ren Huang 等ICDE 2024 · 49 次引用
