Recent advancements in large language models (LLMs) have significantly contributed to the progress of the Text-to-SQL task. A common requirement in many of these works is the post-correction of SQL queries. However, the majority of this process entails analyzing error cases to develop prompts with rules that eliminate model bias. And there is an absence of execution verification for SQL queries. In addition, the prevalent techniques primarily depend on GPT-4 and few-shot prompts, resulting in expensive costs. To investigate the effective methods for SQL refinement in a cost-efficient manner, we introduce Semantic-Enhanced Text-to-SQL with Adaptive Refinement (SEA-SQL), which includes Adaptive Bias Elimination and Dynamic Execution Adjustment, aims to improve performance while minimizing resource expenditure with zero-shot prompts. Specifically, SEA-SQL employs a semantic-enhanced schema to augment database information and optimize SQL queries. During the SQL query generation, a fine-tuned adaptive bias eliminator is applied to mitigate inherent biases caused by the LLM. The dynamic execution adjustment is utilized to guarantee the executability of the bias eliminated SQL query. We conduct experiments on the Spider and BIRD datasets to demonstrate the effectiveness of this framework. The results demonstrate that SEA-SQL achieves state-of-the-art performance in the GPT3.5 scenario with 9%-58% of the generation cost. Furthermore, SEA-SQL is comparable to GPT-4 with only 0.9%-5.3% of the generation cost.
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(北航大学)
LLM-Based SQL Generation: Prompting, Self-Refinement, and Adaptive Weighted Majority Voting
Institute of Information Management(信息管理研究所);National Yang Ming Chiao Tung University(阳明交通大学);R. B. Annis School of Engineering(R. B. Annis工程学院);University of Indianapolis(印第安纳大学)
TCSR-SQL: Towards Table Content-aware Text-to-SQL with Self-retrieval
Harbin Institute of Technology (Shenzhen)(哈尔滨工业大学(深圳));Inspur Cloud Information Technology Co. Ltd(浪潮云信息技术有限公司);Peng Cheng Laboratory(鹏城实验室);Guangdong Power Grid Co. Ltd(广东电网有限责任公司);University of Macau(澳门大学)
SQL-o1: Automatic Text-to-SQL Program Synthesis via Self-Reward Heuristic Search
School of Computer Science, Beijing University of Posts and Telecommunications, China(北京邮电大学计算机科学学院);College of Computing and Data Science, Nanyang Technological University, Singapore(南洋理工大学计算机与数据科学学院);State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, China(北京邮电大学网络与交换技术国家重点实验室);College of Computer Science, Sichuan University, Chengdu, China(四川大学计算机学院)
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(塞阿拉联邦大学 计算机科学系)
Snel是一个关系数据库引擎,具有查询的即时(JIT)编译和列式数据表示。Snel旨在通过利用LLVM编译器基础设施进行快速在线分析。它还具有自定义的特殊方法,如解析直方图作为SQL语言的扩展。Snel是指“SQL Native Execution for LLVM”。与传统的数据库引擎不同,它不提供客户端-服务器接口。相反,它将其接口公开为SQLite的扩展,用于从命令行进行简单的交互式使用并嵌入应用程序中。由于Snel表是只读的,因此它不提供事务或更新等功能。这使得查询非常快,因为它们没有表锁定或确保一致性的开销。Snel的核心是一个可供客户端应用程序使用的动态库。它有一个SQLite扩展,可以与传统的SQL环境进行无缝集成,并可以从命令行进行简单的交互式使用。
Are These Modules Worth Their Cost? A Paradigm-Level Accuracy-Cost Analysis of In-context Learning Text-to-SQL
Jinan University(暨南大学);The Hong Kong Polytechnic University(香港理工大学);City University of Macau(澳门城市大学);Jilin University(吉林大学);Beihang University(北京航空航天大学)
Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflows
University of Hong Kong(香港大学);Salesforce Research(Salesforce 研究院);Sea AI Lab(Sea AI 实验室);Google Deepmind(谷歌DeepMind);Google Cloud AI Research(谷歌云 AI 研究院);University of Waterloo(滑铁卢大学)