Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Search

Boyan Li, Jiayi Zhang, Ju Fan, Yanwei Xu, Chong Chen +2 more
2/14/2026

No official code found. Best implementation: HKUSTDial/Alpha-SQL (161 stars, MIT, last commit 2026-01-07). 1 more below.

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 task-specific 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.

View on arXivView PDF

Code Implementations(2)

MIT

šŸ”„[ICML'25] Official repository for the paper "Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Search"

16120Shell, PythonMay 7, 20259 months agoMIT
icmlicml-2025test-time-scalingtext-to-sql
Ahm-rgb/Alpha-SQLCommunity63%
MIT

Official repository for the paper "Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Search" [ICML'25]

82Shell, PythonMay 9, 20255 months agoMIT
data-structuresicml-2025javascriptjsonmariadb+9 more

Similar Papers

Cite this paper

@article{li2026alphasql,
  title  = {Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Search},
  author = {Boyan Li and Jiayi Zhang and Ju Fan and Yanwei Xu and Chong Chen and Nan Tang and Yuyu Luo},
  year   = {2026},
  eprint = {2502.17248},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.17248},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.17248.svg)](https://codeofpaper.com/paper/2502.17248)

Discussion