Natural Language to SQL (NL2SQL) provides a new model-centric paradigm that simplifies database access for non-technical users by converting natural language queries into SQL commands. Recent advancements, particularly those integrating Retrieval-Augmented Generation (RAG) and Chain-of-Thought (CoT) reasoning, have made significant strides in enhancing NL2SQL performance. However, challenges such as inaccurate task decomposition and keyword extraction by LLMs remain major bottlenecks, often leading to errors in SQL generation. While existing datasets aim to mitigate these issues by fine-tuning models, they struggle with over-fragmentation of tasks and lack of domain-specific keyword annotations, limiting their effectiveness. To address these limitations, we present DeKeyNLU, a novel dataset which contains 1,500 meticulously annotated QA pairs aimed at refining task decomposition and enhancing keyword extraction precision for the RAG pipeline. Fine-tuned with DeKeyNLU, we propose DeKeySQL, a RAG-based NL2SQL pipeline that employs three distinct modules for user question understanding, entity retrieval, and generation to improve SQL generation accuracy. We benchmarked multiple model configurations within DeKeySQL RAG pipeline. Experimental results demonstrate that fine-tuning with DeKeyNLU significantly improves SQL generation accuracy on both BIRD (62.31% to 69.10%) and Spider (84.2% to 88.7%) dev datasets.


翻译:自然语言到SQL(NL2SQL)提供了一种以模型为中心的新范式,通过将自然语言查询转换为SQL命令,为非技术用户简化数据库访问。近期进展,特别是融合检索增强生成(RAG)与思维链(CoT)推理的技术,在提升NL2SQL性能方面取得了显著进步。然而,大语言模型在任务分解与关键词提取上的不准确性仍是主要瓶颈,常导致SQL生成错误。尽管现有数据集旨在通过微调模型缓解这些问题,但其存在任务过度碎片化且缺乏领域特定关键词标注的缺陷,限制了有效性。为应对这些局限,我们提出了DeKeyNLU——一个包含1500个精细标注问答对的新型数据集,旨在优化RAG流程中的任务分解并提升关键词提取精度。基于DeKeyNLU微调,我们提出了DeKeySQL:一种基于RAG的NL2SQL流程,采用三个独立模块分别处理用户问题理解、实体检索与生成,以提高SQL生成准确率。我们在DeKeySQL RAG流程中对多种模型配置进行了基准测试。实验结果表明,使用DeKeyNLU微调能显著提升在BIRD(从62.31%提升至69.10%)和Spider(从84.2%提升至88.7%)开发数据集上的SQL生成准确率。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
专知会员服务
33+阅读 · 2021年9月27日
专知会员服务
65+阅读 · 2021年5月29日
【EMNLP2020】自然语言生成,Neural Language Generation
专知会员服务
39+阅读 · 2020年11月20日
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
强化学习与文本生成
微信AI
41+阅读 · 2019年4月4日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
NLP(自然语言处理)扫盲
大数据和云计算技术
20+阅读 · 2017年7月9日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Arxiv
0+阅读 · 2月17日
Arxiv
0+阅读 · 2月13日
VIP会员
相关VIP内容
相关资讯
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
强化学习与文本生成
微信AI
41+阅读 · 2019年4月4日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
NLP(自然语言处理)扫盲
大数据和云计算技术
20+阅读 · 2017年7月9日
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员