Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL
Department of Computing, The Hong Kong Polytechnic University(香港理工大学计算机系);Faculty of Data Science, City University of Macau(澳门城市大学数据科学学院);College of Cyber Security, Jinan University(暨南大学网络安全学院)
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.
Structure Guided Large Language Model for SQL Generation
Department of Computing, The Hong Kong Polytechnic University, Hung Hom, Hong Kong SAR, China(香港理工大学计算机系);City University of Macau, Macau SAR, China(澳门城市大学);College of Information Science and Technology, Jinan University, GZ, China(广州jinan大学信息科学与技术学院)
Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs
The University of Hong Kong(香港大学);DAMO Academy, Alibaba Group(阿里巴巴集团达摩院);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));MIT CSAIL(麻省理工学院计算机科学与人工智能实验室);Tsinghua University(清华大学);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Shanghai AI Laboratory(上海人工智能实验室)
Enhancing Text-to-SQL Capabilities of Large Language Models via Domain Database Knowledge Injection
School of Cyber Science Engineering, Huazhong University of Science and Technology(华中科技大学网络空间科学与工程学院);Wuhan AI Research Foundation Model Research Center(武汉人工智能研究基金会大模型研究中心);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Peng Cheng Laboratory(鹏城实验室)
Text-to-SQL based on Large Language Models and Database Keyword Search
Instituto Tecgraf, PUC-Rio(里约天主教大学 Tecgraf 研究所);Petrobras(巴西石油公司);Departamento de Informática, PUC-Rio(里约天主教大学 信息学系);Departamento de Computação, UFC(塞阿拉联邦大学 计算机科学系)
A Survey of Large Language Model-Based Generative AI for Text-to-SQL: Benchmarks, Applications, Use Cases, and Challenges
Cleveland State University(克利夫兰州立大学);The Davey Tree Expert Company(戴维树专家公司);The MathWorks(MathWorks公司);Khoury College of Computer Science, Roux Institute at Northeastern University(东北大学鲁克斯研究所科里计算机科学学院)
Cooperative SQL Generation for Segmented Databases By Using Multi-functional LLM Agents
School of Computer Science, Northwestern Polytechnical University(西北工业大学计算机学院);Big Data Shortage and Management, MIIT(工业和信息化部大数据短缺与管理局);School of Computing, National University of Singapore(新加坡国立大学计算机学院);School of Computing and Information Systems, Singapore Management University(新加坡管理大学计算与信息系统学院)
Text-to-SQL Generation for Question Answering on Electronic Medical Records
Virginia Tech(弗吉尼亚理工大学)
电子医疗记录(EMR)包含全面的患者信息,并且通常存储在具有多个表的关系数据库中。从电子病历数据中有效地检索患者信息检索是医学专家的一项具有挑战性的任务。SQL到SQL生成方法通过首先预测关于数据库的给定问题的SQL查询,然后在数据库上执行查询来解决这个问题。然而,大多数现有的方法还没有适应医疗保健领域,由于缺乏医疗保健数据库到SQL数据集的学习模型特定于这个领域。此外,术语缩写的广泛使用和问题中可能的错别字为准确生成相应的SQL查询带来了额外的挑战。在本文中,我们通过开发一个基于深度学习的TRanslate-Edit Model for SQL(TREQS)生成来解决这些挑战,该模型采用广泛使用的序列到序列模型来直接生成给定问题的SQL查询,并使用注意力复制机制和特定于任务的查找表进一步执行所需的编辑。基于广泛使用的公共电子医疗数据库,我们创建了一个新的大规模的SQL对数据集,命名为MIMICSQL,以执行在医疗领域的SQL到SQL的生成任务。一组广泛的实验进行评估我们提出的模型MIMICSQL的性能。定量和定性的实验结果表明,我们所提出的方法在预测条件值的灵活性和效率,其鲁棒性随机问题的缩写和错别字。
ProSPy: A Profiling-Driven SQL-Python Agentic Framework for Enterprise Text-to-SQL
State Key Lab of CAD&CG(计算机辅助设计与图形学国家重点实验室);School of Software Technology(软件技术学院);Tencent TEG(腾讯科技集团);School of Mathematical Sciences, Peking University(北京大学数学科学学院);Zhejiang University(浙江大学)