Converting natural language questions into SQL queries enables non-expert users to interact with relational databases and has long been a central task for natural language interfaces to data. While the WikiSQL dataset played a key role in early text-to-SQL research, its usage has declined due to structural and annotation issues, including case sensitivity inconsistencies, data type mismatches, syntax errors, and unanswered questions. We present LLMSQL, a systematic revision and transformation of WikiSQL designed for the large language model era. We classify these errors and implement automated methods for cleaning and re-annotation. To assess the impact of these improvements, we evaluated multiple large language models, including Gemma 3, LLaMA 3.2, Mistral 7B, gpt-oss 20B, Phi-3.5 Mini, Qwen 2.5, OpenAI o4-mini, DeepSeek-R1, and others. Notably, DeepSeek-R1 achieves 88.40% accuracy in a zero-shot setting, and models under 10B parameters surpass 90% accuracy after fine-tuning. Rather than serving as an update, LLMSQL is introduced as an LLM-ready benchmark. Unlike the original WikiSQL, which was tailored for pointer-network models selecting tokens from input, LLMSQL provides clean natural language questions and full SQL queries as plain text, enabling straightforward generation and evaluation for modern natural-language-to-SQL models.


翻译:将自然语言问题转换为SQL查询使得非专业用户能够与关系数据库交互,长期以来一直是数据自然语言接口的核心任务。尽管WikiSQL数据集在早期文本转SQL研究中发挥了关键作用,但由于结构和标注问题(包括大小写敏感性不一致、数据类型不匹配、语法错误和未回答问题),其使用率已下降。我们提出了LLMSQL,这是为大规模语言模型时代设计的WikiSQL系统性修订与转换版本。我们对这些错误进行了分类,并实现了自动化的清洗与重新标注方法。为评估这些改进的影响,我们评估了多个大型语言模型,包括Gemma 3、LLaMA 3.2、Mistral 7B、gpt-oss 20B、Phi-3.5 Mini、Qwen 2.5、OpenAI o4-mini、DeepSeek-R1等。值得注意的是,DeepSeek-R1在零样本设置下达到了88.40%的准确率,而参数规模小于100亿的模型在微调后准确率超过90%。LLMSQL并非作为更新版本,而是作为面向大语言模型的基准测试集引入。与原始WikiSQL专为从输入中选择标记的指针网络模型设计不同,LLMSQL提供干净的自然语言问题和完整的SQL查询作为纯文本,为现代自然语言转SQL模型提供了直接的生成与评估框架。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
PlanGenLLMs:大型语言模型规划能力的最新综述
专知会员服务
32+阅读 · 5月18日
Python图像处理,366页pdf,Image Operators Image Processing in Python
【NeurIPS2019】图变换网络:Graph Transformer Network
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关资讯
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员