Papers › A Preview of XiYan-SQL: A Multi-Generator Ensemble Framework for Text-to-SQL

A Preview of XiYan-SQL: A Multi-Generator Ensemble Framework for Text-to-SQL

13 Nov 2024arXiv:2411.08599archive 2025-07-28

Yingqi Gao, Yifu Liu, Xiaoxia Li, Xiaorong Shi, Yin Zhu, Yiming Wang, Shiqi Li, Wei Li, Yuntao Hong, Zhiling Luo, Jinyang Gao, Liyu Mou, Yu Li

To tackle the challenges of large language model performance in natural language to SQL tasks, we introduce XiYan-SQL, an innovative framework that employs a multi-generator ensemble strategy to improve candidate generation. We introduce M-Schema, a semi-structured schema representation method designed to enhance the understanding of database structures. To enhance the quality and diversity of generated candidate SQL queries, XiYan-SQL integrates the significant potential of in-context learning (ICL) with the precise control of supervised fine-tuning. On one hand, we propose a series of training strategies to fine-tune models to generate high-quality candidates with diverse preferences. On the other hand, we implement the ICL approach with an example selection method based on named entity recognition to prevent overemphasis on entities. The refiner optimizes each candidate by correcting logical or syntactical errors. To address the challenge of identifying the best candidate, we fine-tune a selection model to distinguish nuances of candidate SQL queries. The experimental results on multiple dialect datasets demonstrate the robustness of XiYan-SQL in addressing challenges across different scenarios. Overall, our proposed XiYan-SQL achieves the state-of-the-art execution accuracy of 75.63% on Bird benchmark, 89.65% on the Spider test set, 69.86% on SQL-Eval, 41.20% on NL2GQL. The proposed framework not only enhances the quality and diversity of SQL queries but also outperforms previous methods.

PaperPDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

XGenerationLab/XiYan-SQL officialmentioned on GitHubApache-2.0 report
XGenerationLab/M-Schema mentioned on GitHubApache-2.0 report
xgenerationlab/xiyan-dbdescgen mentioned on GitHubApache-2.0 report
xgenerationlab/xiyan_mcp_server mentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

DiversityIn-Context LearningLarge Language ModelNamed Entity RecognitionText to SQLText-To-SQL

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Text-To-SQL BIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation) XiYan-SQL Execution Accuracy % (Dev) 73.34 #1 of 41 Archive leaderboard report
Text-To-SQL BIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation) XiYan-SQL Execution Accuracy % (Test) 75.63 #1 of 41 Archive leaderboard report
Text-To-SQL SQL-Eval XiYan-SQL Execution Accuracy 69.86 #1 of 1 Archive leaderboard report
Text-To-SQL spider XiYan-SQL Execution Accuracy (Test) 89.65 #1 of 20 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections