A Survey of Text-to-SQL in the Era of LLMs: Where Are We, and Where Are We Going?

IF 10.4 2区 计算机科学 Q1 COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE
Xinyu Liu;Shuyu Shen;Boyan Li;Peixian Ma;Runzhi Jiang;Yuxin Zhang;Ju Fan;Guoliang Li;Nan Tang;Yuyu Luo
{"title":"A Survey of Text-to-SQL in the Era of LLMs: Where Are We, and Where Are We Going?","authors":"Xinyu Liu;Shuyu Shen;Boyan Li;Peixian Ma;Runzhi Jiang;Yuxin Zhang;Ju Fan;Guoliang Li;Nan Tang;Yuyu Luo","doi":"10.1109/TKDE.2025.3592032","DOIUrl":null,"url":null,"abstract":"Translating users’ natural language queries (NL) into SQL queries (i.e., Text-to-SQL, <italic>a.k.a.</i> NL2SQL) can significantly reduce barriers to accessing relational databases and support various commercial applications. The performance of Text-to-SQL has been greatly enhanced with the emergence of Large Language Models (LLMs). In this survey, we provide a comprehensive review of Text-to-SQL techniques powered by LLMs, covering its entire lifecycle from the following four aspects: (1) <italic>Model:</i> Text-to-SQL translation techniques that tackle not only NL ambiguity and under-specification, but also properly map NL with database schema and instances; (2) <italic>Data:</i> From the collection of training data, data synthesis due to training data scarcity, to Text-to-SQL benchmarks; (3) <italic>Evaluation:</i> Evaluating Text-to-SQL methods from multiple angles using different metrics and granularities; and (4) <italic>Error Analysis:</i> analyzing Text-to-SQL errors to find the root cause and guiding Text-to-SQL models to evolve. Moreover, we offer a rule of thumb for developing Text-to-SQL solutions. Finally, we discuss the research challenges and open problems of Text-to-SQL in the LLMs era.","PeriodicalId":13496,"journal":{"name":"IEEE Transactions on Knowledge and Data Engineering","volume":"37 10","pages":"5735-5754"},"PeriodicalIF":10.4000,"publicationDate":"2025-07-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Knowledge and Data Engineering","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11095853/","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
引用次数: 0

Abstract

Translating users’ natural language queries (NL) into SQL queries (i.e., Text-to-SQL, a.k.a. NL2SQL) can significantly reduce barriers to accessing relational databases and support various commercial applications. The performance of Text-to-SQL has been greatly enhanced with the emergence of Large Language Models (LLMs). In this survey, we provide a comprehensive review of Text-to-SQL techniques powered by LLMs, covering its entire lifecycle from the following four aspects: (1) Model: Text-to-SQL translation techniques that tackle not only NL ambiguity and under-specification, but also properly map NL with database schema and instances; (2) Data: From the collection of training data, data synthesis due to training data scarcity, to Text-to-SQL benchmarks; (3) Evaluation: Evaluating Text-to-SQL methods from multiple angles using different metrics and granularities; and (4) Error Analysis: analyzing Text-to-SQL errors to find the root cause and guiding Text-to-SQL models to evolve. Moreover, we offer a rule of thumb for developing Text-to-SQL solutions. Finally, we discuss the research challenges and open problems of Text-to-SQL in the LLMs era.
法学硕士时代文本到sql的调查:我们在哪里,我们要去哪里?
将用户的自然语言查询(NL)转换为SQL查询(即文本到SQL,又称NL2SQL)可以显著降低访问关系数据库的障碍,并支持各种商业应用程序。随着大型语言模型(Large Language Models, llm)的出现,文本到sql的性能得到了极大的提高。在本调查中,我们全面回顾了由llm提供支持的文本到sql技术,从以下四个方面涵盖了其整个生命周期:(1)模型:文本到sql翻译技术,不仅解决了NL歧义和规范不足,而且还将NL与数据库模式和实例进行了适当的映射;(2)数据:从训练数据的收集,由于训练数据稀缺而进行的数据综合,到Text-to-SQL基准测试;(3)评价:使用不同的度量和粒度从多角度评价Text-to-SQL方法;(4)错误分析:分析文本到sql的错误,找出根本原因,指导文本到sql模型的发展。此外,我们还提供了开发Text-to-SQL解决方案的经验法则。最后,讨论了法学硕士时代文本到sql的研究挑战和有待解决的问题。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
IEEE Transactions on Knowledge and Data Engineering
IEEE Transactions on Knowledge and Data Engineering 工程技术-工程:电子与电气
CiteScore
11.70
自引率
3.40%
发文量
515
审稿时长
6 months
期刊介绍: The IEEE Transactions on Knowledge and Data Engineering encompasses knowledge and data engineering aspects within computer science, artificial intelligence, electrical engineering, computer engineering, and related fields. It provides an interdisciplinary platform for disseminating new developments in knowledge and data engineering and explores the practicality of these concepts in both hardware and software. Specific areas covered include knowledge-based and expert systems, AI techniques for knowledge and data management, tools, and methodologies, distributed processing, real-time systems, architectures, data management practices, database design, query languages, security, fault tolerance, statistical databases, algorithms, performance evaluation, and applications.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信