arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.13725cs.CL

SQLForge:合成可靠且多样的数据以增强大语言模型的文本到SQL推理能力

SQLForge: Synthesizing Reliable and Diverse Data to Enhance Text-to-SQL Reasoning in LLMs

University of Science and Technology of China(中国科学技术大学);Institute of Artificial Intelligence, Hefei Comprehensive National Science Center(合肥综合性国家科学中心人工智能研究院)

Yu Guo, Dong Jin, Shenghao Ye, Shuangwu Chen, Jian Yang, Xiaobin Tan

AI总结:

SQLForge通过SQL语法约束、反向翻译、模板扩充和迭代式数据域探索合成可靠且多样的训练数据,微调得到的SQLForge-LM在Spider和BIRD基准上取得开源模型最优性能,显著缩小了与闭源模型的差距。

摘要:

大语言模型(LLMs)在文本到SQL推理任务中已展现出显著潜力,然而现有开源模型与闭源模型之间仍存在较大的性能差距。本文提出了SQLForge,一种通过合成可靠且多样的数据来增强大语言模型文本到SQL推理能力的新方法。我们通过SQL语法约束和SQL到问题的反向翻译来提升数据可靠性,在结构层面和语义层面同时保证数据逻辑的正确性。我们还提出了SQL模板扩充和迭代式数据域探索机制,以增强数据多样性。基于扩充后的数据,我们对多种不同架构和参数规模的开源模型进行了微调,得到了一系列统称为SQLForge-LM的模型。SQLForge-LM在广泛认可的Spider和BIRD基准测试上取得了开源模型中的最先进性能。具体而言,SQLForge-LM在Spider Dev上达到了85.7%的执行准确率,在BIRD Dev上达到了59.8%的执行准确率,显著缩小了与闭源方法之间的性能差距。

英文摘要:

Large Language models (LLMs) have demonstrated significant potential in text-to-SQL reasoning tasks, yet a substantial performance gap persists between existing open-source models and their closed-source counterparts. In this paper, we introduce SQLForge, a novel approach for synthesizing reliable and diverse data to enhance text-to-SQL reasoning in LLMs. We improve data reliability through SQL syntax constraints and SQL-to-question reverse translation, ensuring data logic at both structural and semantic levels. We also propose an SQL template enrichment and iterative data domain exploration mechanism to boost data diversity. Building on the augmented data, we fine-tune a variety of open-source models with different architectures and parameter sizes, resulting in a family of models termed SQLForge-LM. SQLForge-LM achieves the state-of-the-art performance on the widely recognized Spider and BIRD benchmarks among the open-source models. Specifically, SQLForge-LM achieves EX accuracy of 85.7% on Spider Dev and 59.8% on BIRD Dev, significantly narrowing the performance gap with closed-source methods.

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

↑