Text-to-SQL aims to translate natural language questions into executable SQL queries over structured databases, enabling non-expert users to access data intuitively. While recent advances in large language models (LLMs) have shown promise in this task, existing LLM-based approaches often struggle to strike a balance between strong reasoning capabilities and robust generalization. To address these limitations, we propose CoTE-SQL to enhance the LLM-based text-to-SQL generation with three key innovations: (i) self-enhanced reasoning traces distilled from LLMs without human annotation, (ii) structured chain-of-thought (CoT) prompting with modular decomposition and examples retrieval, and (iii) error-aware revision based on SQL execution feedback. Extensive experiments on the Spider and Bird benchmarks demonstrate that CoTE-SQL achieves new state-of-the-art performance among methods built on open-source LLMs with comparable model sizes on Bird (53.39% EX / 59.02 VES) and strong results on Spider (79.60% EX / 77.19 VES), with especially significant gains on complex queries. Results highlight the effectiveness of combining self-enhancement, structured reasoning, and execution-time feedback within an LLM-based framework for text-to-SQL design.


翻译:文本到SQL旨在将自然语言问题转化为可执行的结构化数据库SQL查询,使非专业用户能够直观地访问数据。尽管近期大型语言模型(LLMs)的进展在这一任务中展现出潜力,但现有基于LLM的方法往往难以在强大的推理能力与稳健的泛化性之间取得平衡。为解决这些局限,我们提出CoTE-SQL,通过三项关键创新增强基于LLM的文本到SQL生成:(i)从LLM中提炼、无需人工标注的自增强推理轨迹;(ii)结合模块化分解与示例检索的结构化思维链提示;(iii)基于SQL执行反馈的错误感知修正。在Spider和Bird基准上的大量实验表明,CoTE-SQL在基于开源LLM且模型规模相当的方法中,于Bird数据集上达到新最优性能(53.39% EX / 59.02% VES),并在Spider数据集上取得强劲结果(79.60% EX / 77.19% VES),尤其在复杂查询上提升显著。实验结果凸显了在基于LLM的文本到SQL设计框架中融合自增强、结构化推理与执行时反馈的有效性。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
大语言模型中的检索与结构化增强生成综述
专知会员服务
34+阅读 · 2025年9月17日
迈向大型推理模型:基于大型语言模型的强化推理综述
专知会员服务
50+阅读 · 2025年1月17日
《大语言模型的数据合成与增强综述》
专知会员服务
44+阅读 · 2024年10月19日
大型语言模型增强强化学习综述:概念、分类和方法
专知会员服务
57+阅读 · 2024年4月4日
大型语言模型在表格推理中的应用综述
专知会员服务
47+阅读 · 2024年2月14日
面试题:文本摘要中的NLP技术
七月在线实验室
15+阅读 · 2019年5月13日
强化学习与文本生成
微信AI
41+阅读 · 2019年4月4日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
干货|当深度学习遇见自动文本摘要,seq2seq+attention
机器学习算法与Python学习
10+阅读 · 2018年5月28日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
VIP会员
最新内容
《通过小型无人机系统将情报能力“作战化”》
消耗优势:美军的“精确规模化”概念
专知会员服务
8+阅读 · 6月15日
《离线语言支持系统:面向空战战术决策》
专知会员服务
10+阅读 · 6月15日
相关VIP内容
大语言模型中的检索与结构化增强生成综述
专知会员服务
34+阅读 · 2025年9月17日
迈向大型推理模型:基于大型语言模型的强化推理综述
专知会员服务
50+阅读 · 2025年1月17日
《大语言模型的数据合成与增强综述》
专知会员服务
44+阅读 · 2024年10月19日
大型语言模型增强强化学习综述:概念、分类和方法
专知会员服务
57+阅读 · 2024年4月4日
大型语言模型在表格推理中的应用综述
专知会员服务
47+阅读 · 2024年2月14日
相关资讯
面试题:文本摘要中的NLP技术
七月在线实验室
15+阅读 · 2019年5月13日
强化学习与文本生成
微信AI
41+阅读 · 2019年4月4日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
干货|当深度学习遇见自动文本摘要,seq2seq+attention
机器学习算法与Python学习
10+阅读 · 2018年5月28日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员