TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Text-to-SQL Empowered by Large Language Models: A Benchmar...

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

2023-08-29Text-To-SQLPrompt Engineering
PaperPDFCode(official)

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.

Results

TaskDatasetMetricValueModel
Semantic ParsingspiderExact Match Accuracy (Dev)74.4DAIL-SQL + GPT-4 + Self-Consistency
Semantic ParsingspiderExecution Accuracy (Dev)84.4DAIL-SQL + GPT-4 + Self-Consistency
Semantic ParsingspiderExecution Accuracy (Test)86.6DAIL-SQL + GPT-4 + Self-Consistency
Semantic ParsingBIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation)Execution Accuracy % (Dev)54.76DAIL-SQL + GPT-4
Semantic ParsingBIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation)Execution Accuracy % (Test)57.41DAIL-SQL + GPT-4
Text-To-SQLspiderExact Match Accuracy (Dev)74.4DAIL-SQL + GPT-4 + Self-Consistency
Text-To-SQLspiderExecution Accuracy (Dev)84.4DAIL-SQL + GPT-4 + Self-Consistency
Text-To-SQLspiderExecution Accuracy (Test)86.6DAIL-SQL + GPT-4 + Self-Consistency
Text-To-SQLBIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation)Execution Accuracy % (Dev)54.76DAIL-SQL + GPT-4
Text-To-SQLBIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation)Execution Accuracy % (Test)57.41DAIL-SQL + GPT-4

Related Papers

Leveraging Language Prior for Infrared Small Target Detection2025-07-17Emotional Support with LLM-based Empathetic Dialogue Generation2025-07-17Prompt Engineering in Segment Anything Model: Methodologies, Applications, and Emerging Challenges2025-07-13CogniSQL-R1-Zero: Lightweight Reinforced Reasoning for Efficient SQL Generation2025-07-08AdaptaGen: Domain-Specific Image Generation through Hierarchical Semantic Optimization Framework2025-07-08XiYan-SQL: A Novel Multi-Generator Framework For Text-to-SQL2025-07-07Helping CLIP See Both the Forest and the Trees: A Decomposition and Description Approach2025-07-04State and Memory is All You Need for Robust and Reliable AI Agents2025-06-30