13 Mar 2025 | Zijin Hong, Zheng Yuan, Qinggang Zhang, Hao Chen, Junnan Dong, Feiran Huang, and Xiao Huang
This survey provides a comprehensive review of existing large language model (LLM)-based text-to-SQL research. Text-to-SQL aims to convert natural language questions into executable SQL queries, enabling non-experts to interact with databases. Despite progress in traditional text-to-SQL systems, challenges remain due to the complexity of natural language understanding, database schema comprehension, and SQL generation. Recent advances in LLMs have significantly improved performance, but further optimization is needed for robustness, efficiency, and cross-domain generalization.
The survey discusses the evolution of text-to-SQL research, from rule-based methods to deep learning and pre-trained language models (PLMs), and finally to LLM-based approaches. It introduces key datasets and evaluation metrics for text-to-SQL, including cross-domain, knowledge-augmented, context-dependent, robustness, cross-lingual, long-context, and specialized-domain datasets. Evaluation metrics such as component matching, exact matching, execution accuracy, and valid efficiency score are also discussed.
The survey categorizes LLM-based text-to-SQL methods into five paradigms: in-context learning (ICL), fine-tuning (FT), decomposition, reasoning enhancement, and execution refinement. ICL methods use prompt engineering to guide LLMs in generating SQL queries, while FT methods involve training LLMs on domain-specific data. Decomposition methods break down tasks into manageable components, reasoning enhancement methods improve LLMs' ability to handle complex SQL through structured reasoning, and execution refinement methods leverage database feedback to improve SQL accuracy.
The survey also discusses challenges in text-to-SQL research, including robustness, computational efficiency, data privacy, and cross-domain generalization. It highlights the potential of LLM-based approaches in addressing these challenges and suggests future research directions, such as improving LLMs' ability to handle complex SQL operations and enhancing their generalization across different domains. The survey concludes with a taxonomy tree summarizing the structure and contents of the research.This survey provides a comprehensive review of existing large language model (LLM)-based text-to-SQL research. Text-to-SQL aims to convert natural language questions into executable SQL queries, enabling non-experts to interact with databases. Despite progress in traditional text-to-SQL systems, challenges remain due to the complexity of natural language understanding, database schema comprehension, and SQL generation. Recent advances in LLMs have significantly improved performance, but further optimization is needed for robustness, efficiency, and cross-domain generalization.
The survey discusses the evolution of text-to-SQL research, from rule-based methods to deep learning and pre-trained language models (PLMs), and finally to LLM-based approaches. It introduces key datasets and evaluation metrics for text-to-SQL, including cross-domain, knowledge-augmented, context-dependent, robustness, cross-lingual, long-context, and specialized-domain datasets. Evaluation metrics such as component matching, exact matching, execution accuracy, and valid efficiency score are also discussed.
The survey categorizes LLM-based text-to-SQL methods into five paradigms: in-context learning (ICL), fine-tuning (FT), decomposition, reasoning enhancement, and execution refinement. ICL methods use prompt engineering to guide LLMs in generating SQL queries, while FT methods involve training LLMs on domain-specific data. Decomposition methods break down tasks into manageable components, reasoning enhancement methods improve LLMs' ability to handle complex SQL through structured reasoning, and execution refinement methods leverage database feedback to improve SQL accuracy.
The survey also discusses challenges in text-to-SQL research, including robustness, computational efficiency, data privacy, and cross-domain generalization. It highlights the potential of LLM-based approaches in addressing these challenges and suggests future research directions, such as improving LLMs' ability to handle complex SQL operations and enhancing their generalization across different domains. The survey concludes with a taxonomy tree summarizing the structure and contents of the research.