Lune

VLDB2024Top-tier venue

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

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

130 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale cites LoRA: Low-Rank Adaptation of Large Language Models
  • OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale cites Large Language Models are Zero-Shot Reasoners
  • OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale cites CodeS: Towards Building Open-source Language Models for Text-to-SQL
  • DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction cites Large Language Models are Zero-Shot Reasoners
  • Large Language Models are Zero-Shot Reasoners cites Training language models to follow instructions with human feedback
  • SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning cites OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale
  • SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning cites 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 cites 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 ] cites 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 ] cites CodeS: Towards Building Open-source Language Models for Text-to-SQL
  • AgentBench: Evaluating LLMs as Agents cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • AgentBench: Evaluating LLMs as Agents cites Training language models to follow instructions with human feedback
  • CodeS: Towards Building Open-source Language Models for Text-to-SQL cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • CodeS: Towards Building Open-source Language Models for Text-to-SQL cites Training language models to follow instructions with human feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers130

  1. AgentBench: Evaluating LLMs as AgentsXiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu et al.ICLR 2024 · 748 citations
  2. The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ]Boyan Li, Yuyu Luo, Chengliang Chai, Guoliang Li et al.VLDB 2024 · 137 citations
  3. CodeS: Towards Building Open-source Language Models for Text-to-SQLHaoyang Li, Jing Zhang, Hanbing Liu, Ju Fan et al.SIGMOD 2024 · 124 citations
  4. SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement LearningPeixian Ma, Xialie Zhuang, Chengjin Xu, Xuhui Jiang et al.NeurIPS 2025 · 94 citations
  5. OmniSQL: Synthesizing High-quality Text-to-SQL Data at ScaleHaoyang Li, Shang Wu, Xiaokang Zhang, Xinmei Huang et al.VLDB 2025 · 90 citations

Builds on18

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  3. Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
  4. MPNet: Masked and Permuted Pre-training for Language UnderstandingKaitao Song, Xu Tan, Tao Qin, Jianfeng Lu et al.NeurIPS 2020 · 1,957 citations
  5. DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 citations

Related papers

  1. Enhancing Text-to-SQL Parsing through Question Rewriting and Execution-Guided RefinementWenxin Mao, Ruiqi Wang, Jiyu Guo, Jichuan Zeng et al.ACL Findings 2024 · 19 citations
  2. Enhancing Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design StrategiesLinyong Nan, Yilun Zhao, Weijin Zou, Narutatsu Ri et al.EMNLP Findings 2023 · 49 citations
  3. SQLForge: Synthesizing Reliable and Diverse Data to Enhance Text-to-SQL Reasoning in LLMsYu Guo, Dong Jin, Shenghao Ye, Shuangwu Chen et al.ACL Findings 2025 · 3 citations
  4. DTS-SQL: Decomposed Text-to-SQL with Small Large Language ModelsMohammadreza Pourreza, Davood RafieiEMNLP Findings 2024 · 71 citations
  5. PURPLE: Making a Large Language Model a Better SQL WriterTonghui Ren, Yuankai Fan, Zhenying He, Ren Huang et al.ICDE 2024 · 49 citations
Dusk over the sea between two cliffs drawn in fine vertical lines