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 is a subtask in semantic parsing that has seen rapid progress with the evolution of Large Language Models (LLMs). However, LLMs face challenges due to hallucination issues and a lack of domain-specific database knowledge(such as table schema and cell values). As a result, they can make errors in generating table names, columns, and matching values to the correct columns in SQL statements. This paper introduces a method of knowledge injection to enhance LLMs' ability to understand schema contents by incorporating prior knowledge. This approach improves their performance in Text-to-SQL tasks. Experimental results show that pre-training LLMs on domain-specific database knowledge and fine-tuning them on downstream Text-to-SQL tasks significantly improves the Execution Match (EX) and Exact Match (EM) metrics across various models. This effectively reduces errors in generating column names and matching values to the columns. Furthermore, the knowledge-injected models can be applied to many downstream Text-to-SQL tasks, demonstrating the generalizability of the approach presented in this paper.
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(上海人工智能实验室)
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大学信息科学与技术学院)
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(暨南大学网络安全学院)
When Prompts Become Payloads: A Framework for Mitigating SQL Injection Attacks in Large Language Model-Driven Applications
Hasso Plattner Institute, University of Potsdam, Germany(波茨坦大学霍斯曼-普拉特研究所, 德国);Chemnitz University of Technology, Chemnitz, Germany(Chemnitz技术大学, Chemnitz, 德国)
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的性能。定量和定性的实验结果表明,我们所提出的方法在预测条件值的灵活性和效率,其鲁棒性随机问题的缩写和错别字。
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(塞阿拉联邦大学 计算机科学系)
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(浙江大学)
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(东北大学鲁克斯研究所科里计算机科学学院)
IGSQL: Database Schema Interaction Graph Based Neural Model for Context-Dependent Text-to-SQL Generation
Wangxuan Institute of Computer Technology, Peking University(北京大学王选计算机研究所);Center for Data Science, Peking University(北京大学数据科学中心);The MOE Key Laboratory of Computational Linguistics, Peking University(北京大学教育部计算语言学重点实验室)