Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Search
Boyan Li, Jiayi Zhang, Ju Fan, Yanwei Xu, Chong Chen, Nan Tang, Yuyu Luo
Abstract
Text-to-SQL, which enables natural language interaction with databases, serves as a pivotal method across diverse industries. With new, more powerful large language models (LLMs) emerging every few months, fine-tuning has become incredibly costly, labor-intensive, and error-prone. As an alternative, zero-shot Text-to-SQL, which leverages the growing knowledge and reasoning capabilities encoded in LLMs without taskspecific fine-tuning, presents a promising and more challenging direction. To address this challenge, we propose Alpha-SQL, a novel approach that leverages a Monte Carlo Tree Search (MCTS) framework to iteratively infer SQL construction actions based on partial reasoning states. To enhance the framework's reasoning capabilities, we introduce LLM-as-Action-Model to dynamically generate SQL construction actions during the MCTS process, steering the search toward more promising SQL queries. Moreover, Alpha-SQL employs a self-supervised reward function to evaluate the quality of candidate SQL queries, ensuring more accurate and efficient query generation. Experimental results show that Alpha-SQL achieves 69.7% execution accuracy on the BIRD development set, using a 32B open-source LLM without fine-tuning. Alpha-SQL outperforms the best previous zero-shot approach based on GPT-4o by 2.5% on the BIRD development set. The code is available at https://github.com/ HKUSTDial/Alpha-SQL.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
30 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- STaR: Bootstrapping Reasoning With Reasoning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- VisJudge-Bench: Aesthetics and Quality Assessment of Visualizations cites DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Framework
- DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Framework cites VisJudge-Bench: Aesthetics and Quality Assessment of Visualizations
- Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- AOrchestra: Automating Sub-Agent Creation for Agentic Orchestration cites DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Framework
- DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Framework cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Framework cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewards cites OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale
- Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewards cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewards cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewards cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Cited by top-tier papers30
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at ScaleHaoyang Li, Shang Wu, Xiaokang Zhang, Xinmei Huang et al.VLDB 2025 · 90 citations
- DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL FrameworkBoyan Li, Chong Chen, Zhujun Xue, Yinan Mei et al.SIGMOD 2026 · 40 citations
- Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised RewardsYuxin Zhang, Meihao Fan, Ju Fan, Mingyang Yi et al.SIGMOD 2026 · 24 citations
- VisJudge-Bench: Aesthetics and Quality Assessment of VisualizationsYupeng Xie, Zhiyang Zhang, Yifan Wu, Sirong Lu et al.ICLR 2026 · 23 citations
- AOrchestra: Automating Sub-Agent Creation for Agentic OrchestrationJianhao Ruan, Zhihao Xu, Yiran Peng, Fashen Ren et al.ICML 2026 · 19 citations
Builds on20
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran et al.NeurIPS 2023 · 5,068 citations
- STaR: Bootstrapping Reasoning With ReasoningEric Zelikman, Yuhuai Wu, Jesse Mu, Noah D. GoodmanNeurIPS 2022 · 1,126 citations
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 citations
- Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun et al.VLDB 2024 · 609 citations
Related papers
- SDE-SQL: Enhancing Text-to-SQL Generation in Large Language Models via Self-Driven Exploration with SQL ProbesWenxuan Xie, Yaxun Dai, Wenhao JiangACL 2026 · 4 citations
- MARS-SQL: A Multi-Agent Reinforcement Learning Framework For Text-To-SQLHaolin Yang, Jipeng Zhang, Zhitao He, Alexander Zhou et al.ICML 2026 · 12 citations
- OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency AlignmentXiangjin Xie, Guangwei Xu, Lingyan Zhao, Ruijie GuoSIGMOD 2025 · 28 citations
- LEAF-SQL: Level-Wise Exploration with Adaptive Fine-Graining for Text-to-SQL Skeleton PredictionZhao Tan, Xiping Liu, Qing Shu, Qizhi Wan et al.ICDE 2026
- MCTS-SQL: Light-Weight LLMs Can Master the Text-to-SQL Through Monte Carlo Tree SearchShuozhi Yuan, Liming Chen, Miaomiao Yuan, Jin ZhaoAAAI 2026 · 4 citations
