CYANSQL: Unlock the Power of NL2SQL Via Clustering-Based Test-Time Scaling
Haoyu Qin, Tonghui Ren, Zhenying He, X. Sean Wang, Jiashu Xing, Yanghuan Ye, Shifei Huang, Jinbao Li
摘要
Large language models (LLMs) are playing an increasingly important role in the Natural Language to SQL (NL2SQL) task. Although LLMs exhibit strong inherent reasoning abilities, they often fail to generate correct SQL because they lack knowledge of the target logical operator composition. Few-shot learning is a commonly employed approach to provide relevant knowledge to LLMs, and many studies focus on how to select effective demonstrations. However, these methods are often limited by the quality of the selected demonstrations, resulting in a failure to fully exploit the rich logical operation information contained in the demonstrations. In this work, we propose CYANSQL (Cluster-aware Yielded Augmentation for NL2SQL), a method that leverages parallel test-time scaling to strengthen LLM reasoning. We first cluster the demonstrations based on SQL logical operator composition, then perform multi-path generation by injecting demonstrations from each cluster during LLM inference, followed by a ranking stage to identify the optimal SQL. CYANSQL achieves an execution accuracy of 73.47% and a state-of-the-art recall of 87.22% on the development set of the popular NL2SQL benchmark BIRD. The source code of this project is available at: https://github.com/zyddqhy/CYANSQL
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。
相关 Paper
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 被引用 909 次
- CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLMohammadreza Pourreza, Hailong Li, Ruoxi Sun, Yeounoh Chung 等ICLR 2025
- PURPLE: Making a Large Language Model a Better SQL WriterTonghui Ren, Yuankai Fan, Zhenying He, Ren Huang 等ICDE 2024 · 被引用 49 次
- Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree SearchBoyan Li, Jiayi Zhang, Ju Fan, Yanwei Xu 等ICML 2025
- SchemaRAG: A Schema-aware Retrieval-Augmented Generation Framework for Text-to-SQLDi Wu, Zetong Tang, Yi He, Xin LuoSIGMOD 2026 · 被引用 9 次
