The increasing volume of data stored in relational databases has led to the need for efficient querying and utilization of this data in various sectors. However, writing SQL queries requires specialized knowledge, which poses a challenge for non-professional users trying to access and query databases. Text-to-SQL parsing solves this issue by converting natural language queries into SQL queries, thus making database access more accessible for non-expert users. To take advantage of the recent developments in Large Language Models (LLMs), a range of new methods have emerged, with a primary focus on prompt engineering and fine-tuning. This survey provides a comprehensive overview of LLMs in text-to-SQL tasks, discussing benchmark datasets, prompt engineering, fine-tuning methods, and future research directions. We hope this review will enable readers to gain a broader understanding of the recent advances in this field and offer some insights into its future trajectory.
翻译:随着关系数据库中存储的数据量不断增加,各行各业对高效查询和利用这些数据的需求日益增长。然而,编写SQL查询需要专业知识,这对试图访问和查询数据库的非专业用户构成了挑战。文本到SQL解析通过将自然语言查询转换为SQL查询来解决这一问题,从而使非专业用户能够更便捷地访问数据库。为利用大型语言模型(LLMs)的最新进展,一系列新方法应运而生,主要集中在提示工程和微调两个方面。本综述全面概述了LLMs在文本到SQL任务中的应用,讨论了基准数据集、提示工程、微调方法以及未来研究方向。我们希望本文能够帮助读者更广泛地了解该领域的最新进展,并对其未来发展趋势提供一些见解。