Language models have shown promising performance on the task of translating natural language questions into SQL queries (Text-to-SQL). However, most of the state-of-the-art (SOTA) approaches rely on powerful yet closed-source large language models (LLMs), such as ChatGPT and GPT-4, which may have the limitations of unclear model architectures, data privacy risks, and expensive inference overheads. To address the limitations, we introduce CodeS, a series of pre-trained language models with parameters ranging from 1B to 15B, specifically designed for the text-to-SQL task. CodeS is a fully open-source language model, which achieves superior accuracy with much smaller parameter sizes. This paper studies the research challenges in building CodeS. To enhance the SQL generation abilities of CodeS, we adopt an incremental pre-training approach using a specifically curated SQL-centric corpus. Based on this, we address the challenges of schema linking and rapid domain adaptation through strategic prompt construction and a bi-directional data augmentation technique. We conduct comprehensive evaluations on multiple datasets, including the widely used Spider benchmark, the newly released BIRD benchmark, robustness-diagnostic benchmarks such as Spider-DK, Spider-Syn, Spider-Realistic, and Dr.Spider, as well as two real-world datasets created for financial and academic applications. The experimental results show that our CodeS achieves new SOTA accuracy and robustness on nearly all challenging text-to-SQL benchmarks.
ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement
The Hong Kong Polytechnic University(香港理工大学);City University of Macau(澳门城市大学);Jilin University(吉林大学);Harbin Institute of Technology (Shenzhen)(哈尔滨工业大学(深圳));Beihang University(北航大学)
$R^3$: "This is My SQL, Are You With Me?" A Consensus-Based Multi-Agent System for Text-to-SQL Tasks
School of Engineering, Westlake University(西湖大学工程学院);University of Michigan(密歇根大学);Carnegie Mellon University(卡内基梅隆大学);School of Mathematical Science, Shanghai Jiao Tong University(上海交通大学数学科学学院)
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(暨南大学网络安全学院)
A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future Directions
Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences(中国科学院深圳先进技术研究院);University of Chinese Academy of Sciences(中国科学院大学);Alibaba Group(阿里巴巴集团);The University of Hong Kong(香港大学)
SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent Collaboration
School of Computer Science & Technology, Soochow University(苏州大学计算机科学与技术学院);School of Information, Renmin University of China(中国人民大学信息学院);International College (Suzhou Research Institute), Renmin University of China(中国人民大学国际学院(苏州研究院));iFLYTEK Research (Suzhou)(科大讯飞研究院(苏州))
SQLForge: Synthesizing Reliable and Diverse Data to Enhance Text-to-SQL Reasoning in LLMs
University of Science and Technology of China(中国科学技术大学);Institute of Artificial Intelligence, Hefei Comprehensive National Science Center(合肥综合性国家科学中心人工智能研究院)
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(鹏城实验室)
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(路易斯安那大学拉斐特分校机械工程学院)
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(浙江大学)
SQLBench: A Comprehensive Evaluation for Text-to-SQL Capabilities of Large Language Models
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);SenseTime Research(商汤科技研究院);School of Artificial Intelligence, Shandong University(山东大学人工智能学院);School of Computer Science and Technology, Beijing Institute of Technology(北京理工大学计算机科学与技术学院);Technical University of Munich, Heilbronn Data Science Center, Munich Data Science Institute(慕尼黑技术大学,海德堡数据科学中心,慕尼黑数据科学研究所);Institute of Microelectronics, Chinese Academy of Sciences(中国科学院微电子研究所)