LLMSQL: 为大语言模型时代升级WikiSQL
LLMSQL: Upgrading WikiSQL for the LLM Era of Text-to-SQL
AI总结:
LLMSQL为大语言模型时代升级WikiSQL,提供干净的自然语言问题和完整SQL查询,提升文本到SQL模型的生成与评估效率。
摘要:
将自然语言问题转换为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%的准确率,且参数小于10B的模型在微调后超过90%的准确率。与其作为更新不同,LLMSQL被介绍为适用于大语言模型的基准。与原始WikiSQL不同,后者是为指针网络模型选择输入中的令牌而设计的,LLMSQL提供干净的自然语言问题和完整的SQL查询作为纯文本,使现代自然语言到SQL模型能够轻松生成和评估。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。