Natural Language to SQL (NL2SQL) technology empowers non-expert users to query relational databases without requiring SQL expertise. While large language models (LLMs) have greatly improved NL2SQL algorithms, their rapid development outpaces systematic evaluation, leaving a critical gap in understanding their effectiveness, efficiency, and limitations. To this end, we present NL2SQLBench, the first modular evaluation and benchmarking framework for LLM-enabled NL2SQL approaches. Specifically, we dissect NL2SQL systems into three core modules: Schema Selection, Candidate Generation, and Query Revision. For each module, we comprehensively review existing strategies and propose novel fine-grained metrics that systematically quantify module-level effectiveness and efficiency. We further implement these metrics in a flexible multi-agent framework, allowing configurable benchmarking across diverse NL2SQL approaches. Leveraging NL2SQLBench, we rigorously evaluate ten representative open-source methods on two datasets, the BIRD development set and the ScienceBenchmark development set, using two LLMs, DeepSeek-V3 and GPT-4o mini. We systematically assess each approach across the three core modules and evaluate multiple critical performance dimensions. Our evaluation reveals significant gaps in existing NL2SQL methods, highlighting not only substantial room for accuracy improvements but also the significant computational inefficiency, which severely hampers real-world adoption. Furthermore, our analysis identifies critical shortcomings in current benchmark datasets and evaluation rules, emphasizing issues such as inaccurate gold SQL annotations and limitations in existing evaluation rules. By synthesizing these insights into a unified benchmarking, our study establishes a clear reference point for fair comparison and serves as essential guidance for future targeted innovation in NL2SQL technology.


翻译:自然语言到SQL(NL2SQL)技术使非专家用户无需掌握SQL专业知识即可查询关系数据库。虽然大语言模型(LLM)显著提升了NL2SQL算法性能,但其快速发展速度已超过系统性评估的跟进,导致在理解其有效性、效率与局限性方面存在关键空白。为此,我们提出NL2SQLBench——首个面向大语言模型赋能的NL2SQL方法的多模块评估与基准测试框架。具体而言,我们将NL2SQL系统拆解为三个核心模块:模式选择、候选生成与查询修正。针对每个模块,我们全面综述现有策略,并提出新颖的细粒度度量指标以系统量化模块级效能与效率。我们进一步将这些度量指标集成至灵活的多智能体框架中,实现跨不同NL2SQL方法的可配置基准测试。借助NL2SQLBench,我们基于BIRD开发集和ScienceBenchmark开发集两个数据集,采用DeepSeek-V3与GPT-4o mini两种大语言模型,对十种代表性开源方法进行严格评估。我们系统评估各方法在三个核心模块上的表现,并考察多项关键性能维度。评估结果揭示了现有NL2SQL方法的显著差距,不仅表明准确率存在巨大提升空间,更暴露出严重阻碍实际部署的计算效率低下问题。此外,我们的分析指出当前基准数据集与评估规则的关键缺陷,着重强调黄金SQL标注不准确及现有评估规则的局限性。通过将这些洞见整合为统一基准测试,本研究为公平比较建立了清晰参考基准,并为未来NL2SQL技术的定向创新提供关键指导。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
「大型语言模型评测」综述
专知会员服务
70+阅读 · 2024年3月30日
NL2SQL:弱监督学习与有监督学习完成进阶之路
PaperWeekly
14+阅读 · 2019年6月24日
NLG ≠ 机器写作 | 专家专栏
量子位
13+阅读 · 2018年9月10日
NLP(自然语言处理)扫盲
大数据和云计算技术
20+阅读 · 2017年7月9日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
1+阅读 · 今天14:45
定向能反无人机系统最新发展动态
专知会员服务
4+阅读 · 今天13:50
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
3+阅读 · 今天13:33
相关VIP内容
「大型语言模型评测」综述
专知会员服务
70+阅读 · 2024年3月30日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员