Recent In-Context Learning based methods have achieved remarkable success in Text-to-SQL task. However, there is still a large gap between the performance of these models and human performance on datasets with complex database schema and difficult questions, such as BIRD. Besides, existing work has neglected to supervise intermediate steps when solving questions iteratively with question decomposition methods, and the schema linking methods used in these works are very rudimentary. To address these issues, we propose MAG-SQL, a multi-agent generative approach with soft schema linking and iterative Sub-SQL refinement. In our framework, an entity-based method with tables' summary is used to select the columns in database, and a novel targets-conditions decomposition method is introduced to decompose those complex questions. Additionally, we build a iterative generating module which includes a Sub-SQL Generator and Sub-SQL Refiner, introducing external oversight for each step of generation. Through a series of ablation studies, the effectiveness of each agent in our framework has been demonstrated. When evaluated on the BIRD benchmark with GPT-4, MAG-SQL achieves an execution accuracy of 61.08%, compared to the baseline accuracy of 46.35% for vanilla GPT-4 and the baseline accuracy of 57.56% for MAC-SQL. Besides, our approach makes similar progress on Spider. The codes are available at https://github.com/LancelotXWX/MAG-SQL.
DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graph
Department of Artificial Intelligence, Sungkyunkwan University(人工智能系,成均馆大学);Department of Immersive Media Engineering, Sungkyunkwan University(沉浸媒体工程系,成均馆大学);Department of Computer Science and Engineering, Sungkyunkwan University(计算机科学与工程系,成均馆大学)
PET-SQL: A Prompt-Enhanced Two-Round Refinement of Text-to-SQL with Cross-consistency
SenseTime Research(商汤科技研究院);Peking University(北京大学);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);School of Computer Science and Technology, Beijing Institute of Technology(北京理工大学计算机学院);University of Cologne(科隆大学)
University of Chinese Academy of Sciences(中国科学院大学);Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences(中国科学院深圳先进技术研究院);Alibaba Group(阿里巴巴集团);Massachusetts Institute of Technology(麻省理工学院)
The importance of building text-to-SQL parsers which can be applied to new databases has long been acknowledged, and a critical step to achieve this goal is schema linking, i.e., properly recognizing mentions of unseen columns or tables when generating SQLs. In this work, we propose a novel framework to elicit relational structures from large-scale pre-trained language models (PLMs) via a probing procedure based on Poincaré distance metric, and use the induced relations to augment current graph-based parsers for better schema linking. Compared with commonly-used rule-based methods for schema l…
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(新加坡管理大学计算与信息系统学院)
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(鹏城实验室)
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(浙江大学)
From Natural Language to SQL: Review of LLM-based Text-to-SQL Systems
School of Computing and Informatics, University of Louisiana at Lafayette(路易斯安那大学拉斐特分校计算与信息学院);School of Mechanical Engineering, University of Louisiana at Lafayette(路易斯安那大学拉斐特分校机械工程学院)
Text-to-SQL as Dual-State Reasoning: Integrating Adaptive Context and Progressive Generation
School of Computer Science, Guangdong University of Technology(广东工业大学计算机科学学院);College of Science, Shantou University(汕头大学科学学院);Peng Cheng Laboratory(鹏城实验室)
Query Carefully: Detecting the Unanswerables in Text-to-SQL Tasks
Institute of Computer Science, Zurich University of Applied Sciences(计算机科学研究所,应用科学大学苏黎世);Institute of Medical Virology, University of Zurich(医学病毒学研究所,苏黎世大学);Department of Gastroenterology and Hepatology, University Hospital Zurich, University of Zurich(消化内科与肝病科,苏黎世大学医院,苏黎世大学)
From Questions to Queries: An AI-powered Multi-Agent Framework for Spatial Text-to-SQL
Geoinformation and Big Data Research Laboratory, Department of Geography, The Pennsylvania State University(宾夕法尼亚州立大学地理系地理信息与大数据研究实验室);Institute for Computational and Data Sciences and Department of Geography, The Pennsylvania State University(宾夕法尼亚州立大学计算与数据科学研究所及地理系)