[Paper Review] Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL
This survey comprehensively reviews LLM-based text-to-SQL, covering challenges, datasets, evaluation metrics, methods (ICL and FT), models, and future directions.
Generating accurate SQL from users' natural language questions (text-to-SQL) remains a long-standing challenge due to the complexities involved in user question understanding, database schema comprehension, and SQL generation. Traditional text-to-SQL systems, which combine human engineering and deep neural networks, have made significant progress. Subsequently, pre-trained language models (PLMs) have been developed for text-to-SQL tasks, achieving promising results. However, as modern databases and user questions grow more complex, PLMs with a limited parameter size often produce incorrect SQL. This necessitates more sophisticated and tailored optimization methods, which restricts the application of PLM-based systems. Recently, large language models (LLMs) have shown significant capabilities in natural language understanding as model scale increases. Thus, integrating LLM-based solutions can bring unique opportunities, improvements, and solutions to text-to-SQL research. In this survey, we provide a comprehensive review of existing LLM-based text-to-SQL studies. Specifically, we offer a brief overview of the technical challenges and evolutionary process of text-to-SQL. Next, we introduce the datasets and metrics designed to evaluate text-to-SQL systems. Subsequently, we present a systematic analysis of recent advances in LLM-based text-to-SQL. Finally, we make a summarization and discuss the remaining challenges in this field and suggest expectations for future research directions. All the related resources of LLM-based, including research papers, benchmarks, and open-source projects, are collected for the community in our repository: https://github.com/DEEP-PolyU/Awesome-LLM-based-Text2SQL.
Motivation & Objective
- Introduce the fundamental challenges of text-to-SQL and the motivation for LLM-based approaches.
- Survey datasets and benchmarks used to evaluate text-to-SQL systems and classify their characteristics.
- Review evaluation metrics and the evolution of implementation paradigms from rule-based to LLM-based approaches.
- Systematically analyze LLM-based methods and provide directions for future research.
Proposed method
- Outline the evolution of text-to-SQL from rule-based methods to PLMs and LLMs.
- Provide taxonomy of datasets and benchmarks, including cross-domain, knowledge-augmented, context-dependent, robustness, and cross-lingual settings.
- Summarize evaluation metrics: component matching, exact matching, execution accuracy, and valid efficiency score.
- Classify and discuss in-context learning and fine-tuning paradigms and their representative methods.
- Discuss design choices in prompting, decomposition, reasoning enhancement, and execution refinement.
- Highlight future challenges and potential research directions.
Experimental results
Research questions
- RQ1What datasets and benchmarks are most relevant for evaluating LLM-based text-to-SQL, and how do their characteristics affect evaluation?
- RQ2What evaluation metrics best capture the performance of LLM-based text-to-SQL systems, and how do they relate to practical correctness and efficiency?
- RQ3What are the key methodological categories in in-context learning and fine-tuning for text-to-SQL, and what are their trade-offs?
- RQ4What challenges remain for robust, cross-domain, and multilingual text-to-SQL using LLMs, and what future directions are promising?
Key findings
- LLMs offer strong semantic parsing capabilities for text-to-SQL and have become central to state-of-the-art results.
- The field evolved from rule-based systems to deep learning, PLMs, and now LLM-based implementations with in-context learning and fine-tuning.
- Datasets such as Spider, CoSQL, SParC, WikiSQL, and BIRD are central benchmarks, with extensions addressing cross-domain, knowledge-augmentation, context, robustness, and cross-lingual settings.
- Evaluation relies on content-matching metrics (Component Matching and Exact Matching) and execution-based metrics (Execution Accuracy and Valid Efficiency Score).
- Prompt design and structured prompting significantly influence LLM performance in text-to-SQL, with several categorized methods enhancing decomposition, prompt optimization, reasoning, and execution refinement.
- Despite progress, challenges remain in robustness, cross-domain generalization, efficiency, data privacy, and real-world deployment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.