KwaiSQL: Preference-Optimized Selection for Enhanced Text-to-SQL Generation
Danyang Zhao, Wenbo Zhang, Yan Li, Xiaohui Li, Fei Chen, Song Gao, Penghui Chen, Ruining Wang
Abstract
Text-to-SQL systems increasingly combine candidate generation with query selection. When these two roles share a model, can learning to select better queries also improve generation? Both tasks require judging how faithfully SQL operations express a natural-language question, making candidate comparison a potential source of supervision for generation. We investigate this connection by training a shared model for SQL generation and selection. Starting from a tool-using generator trained with execution rewards, we apply preference learning to candidate selection and use the resulting checkpoint for both roles. We analyze how selection updates can benefit generation through shared parameters and evaluate the generated candidate pools before selection, using the same tools and sampling settings. On BIRD Dev, selection preference training raises generation-only pass@16 from 81.79% to 82.83%, increasing the coverage of questions with at least one correct candidate. The resulting model achieves 74.67% execution accuracy when used for both generation and selection. These findings show that learning to compare SQL candidates provides a training signal that improves candidate generation and raises the ceiling for final query selection.Our model is publicly available at https://huggingface.co/Kwai-AutoSQL/Kwai-AutoSQL-27B.
Create a lesson
Related papers
Remember Me: Enhancing Long-term Character Persistence in LLM-Generated Stories using Knowledge Graphs
Shared title terminologycs.CLAlvin Tan, Jay Campanell, Richa Misra et al.
DualBO: Diversity-Aware Candidate Generation and Semantics-Behavior Coupled Bayesian Optimization for Prompt Search
Shared title terminologycs.CLRuotian Wu, Ahmad Rashid, Syed Shariyar Murtaza et al.
Dr.EMO: De-biased Reward Optimization for Emotionally Expressive Text-to-Speech
Shared title terminologycs.CLHaishu Zhao, Yuan Ge, Bingsen Zhou et al.
Sublanguage Alignment: A Linguistically-Grounded Evluation Method for Domain-Specific Text Generation
Shared title terminologycs.CLJustin Hofenbitzer, Jacqueline Lammert, Bernhard Haller et al.
AIDetx2: Lightweight and Explainable Detection of AI-Generated Text
Shared title terminologycs.CLDiogo M. Silva, Armando J. Pinho, Diogo Pratas
Conflict-Aware Retrieval-Augmented Generation: Knowledge Conflict Detection, Reranking, and Adaptive Context Selection
Shared title terminologycs.CLAlaa Zahweh, Hadi Hasan, Ali Chehab