arXiv:2507.04701cs.CL2025-07被引 50

多生成器框架提升文本转SQL准确率,突破现有最佳水平。

XiYan-SQL: A Novel Multi-Generator Framework For Text-to-SQL

  • 通过多生成器集成与风格化微调,生成多样化高质量SQL
  • 在BIRD数据集达75.63%准确率,Spider达89.65%新高
  • 适合需要高精度数据库查询的NLP应用开发者

为利用大模型在文本转SQL任务中的优势,我们提出XiYan-SQL,一种创新的多生成器框架,可有效生成并利用多个SQL候选。该框架包含三个部分:1)模式过滤模块,筛选并获取多个相关模式;2)多生成器集成方法,生成高质量且多样化的SQL查询;3)带候选重组织策略的选择模型,以获得最优SQL。针对多生成器集成,采用多任务微调策略增强模型对齐能力,并通过在不同SQL格式上微调构建具有不同生成风格的多个生成模型。实验结果与全面分析表明,该框架具有效性和鲁棒性。总体而言,XiYan-SQL在著名BIRD基准上达到75.63%的新SOTA性能,超越所有先前方法,并在Spider测试集上取得89.65%的准确率。

原文摘要 · Abstract (English)

To leverage the advantages of LLM in addressing challenges in the Text-to-SQL task, we present XiYan-SQL, an innovative framework effectively generating and utilizing multiple SQL candidates. It consists of three components: 1) a Schema Filter module filtering and obtaining multiple relevant schemas; 2) a multi-generator ensemble approach generating multiple highquality and diverse SQL queries; 3) a selection model with a candidate reorganization strategy implemented to obtain the optimal SQL query. Specifically, for the multi-generator ensemble, we employ a multi-task fine-tuning strategy to enhance the capabilities of SQL generation models for the intrinsic alignment between SQL and text, and construct multiple generation models with distinct generation styles by fine-tuning across different SQL formats. The experimental results and comprehensive analysis demonstrate the effectiveness and robustness of our framework. Overall, XiYan-SQL achieves a new SOTA performance of 75.63% on the notable BIRD benchmark, surpassing all previous methods. It also attains SOTA performance on the Spider test set with an accuracy of 89.65%.

文本转SQL多生成器大模型数据库查询

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。