Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
Dawei Gao, Haibin Wang, Yaliang Li et al. · Proceedings of the VLDB Endowment · 2024
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.
Cited by 331 works. doi:10.14778/3641204.3641221 Open-access PDF
Authors
References
- Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing
- Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing
- RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
- Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies
- TaBERT: Pretraining for Joint Understanding of Textual and Tabular Data
- Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence
- PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models
- Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing
- A survey on deep learning approaches for text-to-SQL
- Proceedings of the 2021 International Conference on Management of Data