arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.05451cs.LGcs.CL
收藏

RingSQL: 通过不依赖模式的模板生成合成数据以用于文本到SQL推理模型

RingSQL: Schema-Independent Synthetic Data Generation for Text-to-SQL Reinforcement Learning

Northwestern University(西北大学);Purdue University(普渡大学)

Marko Sterbentz, Kevin Cushing, Cameron Barrie, Kristian J. Hammond

AI总结:

RingSQL通过结合不依赖模式的模板和大语言模型生成,提升文本到SQL模型的准确性和多样性

摘要:

最近的文本到SQL系统进展主要由更大的模型和改进的数据集推动,但进展仍然受到高质量训练数据稀缺的限制。手动数据创建成本高昂,现有合成方法在可靠性和可扩展性之间进行权衡。基于模板的方法可以确保正确的SQL,但需要特定模式的模板,而基于大语言模型的生成方法易于扩展,但缺乏质量和正确性的保证。我们介绍了RingSQL,一种混合数据生成框架,结合了不依赖模式的查询模板和基于大语言模型的自然语言问题改写。这种方法在多样化的模式中保持SQL的正确性,同时提供广泛的语言多样性。在我们的实验中,我们发现使用RingSQL生成的数据训练的模型在六个文本到SQL基准测试中,平均准确率提高了+2.3%。我们将在https://github.com/nu-c3lab/RingSQL上公开我们的代码。

英文摘要:

Recent advances in text-to-SQL have been driven by larger models, better datasets, and new training methods like RLVR. However, progress remains limited by scarce high-quality training data, a problem RLVR is especially sensitive to since noisy data can produce spurious rewards. Manual data creation is expensive, and existing synthetic methods trade off reliability for scalability: template-based approaches guarantee correct SQL but need schema-specific templates and lack diversity, while LLM-based generation scales easily but lacks quality guarantees. We introduce RingSQL, a hybrid framework for generating question-SQL pairs that combines schema-independent query templates with LLM-based paraphrasing of natural language questions. By grounding question generation in complete template questions, RingSQL preserves question-query correctness across all levels of query complexity, a property purely LLM-based methods fail to maintain. RingSQL also produces the only synthetic dataset that improves RLVR training performance across all tested model architectures and benchmarks, achieving 69.8% average accuracy and surpassing both the next-best synthetic dataset by 2.1% and human-annotated data from Spider and BIRD. Code and data are available at https://github.com/nu-c3lab/RingSQL.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑