Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL

Zijin Hong,Zheng Yuan,Qinggang Zhang,Hao Chen,Junnan Dong,Feiran Huang,Xiao Huang
2024-07-16
Abstract:Generating accurate SQL from natural language questions (text-to-SQL) is a long-standing challenge due to the complexities in user question understanding, database schema comprehension, and SQL generation. Conventional text-to-SQL systems, comprising human engineering and deep neural networks, have made substantial progress. Subsequently, pre-trained language models (PLMs) have been developed and utilized for text-to-SQL tasks, achieving promising performance. As modern databases become more complex, the corresponding user questions also grow more challenging, causing PLMs with parameter constraints to produce incorrect SQL. This necessitates more sophisticated and tailored optimization methods, which, in turn, restricts the applications of PLM-based systems. Recently, large language models (LLMs) have demonstrated significant capabilities in natural language understanding as the model scale increases. Therefore, integrating LLM-based implementation can bring unique opportunities, improvements, and solutions to text-to-SQL research. In this survey, we present a comprehensive review of LLM-based text-to-SQL. Specifically, we propose a brief overview of the technical challenges and the evolutionary process of text-to-SQL. Then, we provide a detailed introduction to the datasets and metrics designed to evaluate text-to-SQL systems. After that, we present a systematic analysis of recent advances in LLM-based text-to-SQL. Finally, we discuss the remaining challenges in this field and propose expectations for future research directions.
Computation and Language,Artificial Intelligence,Databases
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the conversion from natural language to SQL queries (text - to - SQL), which is a long - standing challenge. Specifically, the paper focuses on how to generate accurate SQL queries through large - language models (LLMs) to overcome the complexity in user - question understanding, database - schema understanding and SQL generation. As modern databases become more and more complex, the questions raised by users also become more challenging, which leads to problems in parameter - restricted pre - trained language models (PLMs) when generating correct SQL. Therefore, more refined and customized optimization methods are required, and this in turn restricts the application of PLM - based systems. Recently, large - language models (LLMs) have shown remarkable capabilities in natural language understanding. With the increase in model scale, integrating LLMs into text - to - SQL research can bring unique opportunities, improvements and solutions. The main objective of the paper is to conduct a comprehensive review of LLMs - based text - to - SQL techniques, including technical challenges, development processes, the design of data sets and evaluation metrics, recent progress and future research directions. Through these contents, the paper aims to provide a clear overview and stimulate future related research.