MCTS-SQL: Light-Weight LLMs can Master the Text-to-SQL through Monte Carlo Tree Search
Not on the map. Why?
Abstract (arXiv)
Text-to-SQL is a fundamental yet challenging task in the NLP area, aiming at translating natural language questions into SQL queries. While recent advances in large language models have greatly improved performance, most existing approaches depend on models with tens of billions of parameters or costly APIs, limiting their applicability in resource-constrained environments. For real world, especially on edge devices, it is crucial for Text-to-SQL to ensure cost-effectiveness. Therefore, enabling the light-weight models for Text-to-SQL is of great practical significance. However, smaller LLMs often struggle with complicated user instruction, redundant schema linking or syntax correctness. To address these challenges, we propose MCTS-SQL, a novel framework that uses Monte Carlo Tree Search to guide SQL generation through multi-step refinement. Since the light-weight models' weak performance of single-shot prediction, we generate better results through several trials with feedback. However, directly applying MCTS-based methods inevitably leads to significant time and computational overhead. Driven by this issue, we propose a token-level prefix-cache mechanism that stores prior information during iterations, effectively improved the execution speed. Experiments results on the SPIDER and BIRD benchmarks demonstrate the effectiveness of our approach. Using a small open-source Qwen2.5-Coder-1.5B, our method outperforms ChatGPT-3.5. When leveraging a more powerful model Gemini 2.5 to explore the performance upper bound, we achieved results competitive with the SOTA. Our findings demonstrate that even small models can be effectively deployed in practical Text-to-SQL systems with the right strategy.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 17 of its 26 references that are in the map. First posted on arXiv 28 Jan 2025.
Builds on
17 of 26 references.
References · 17
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 667
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
- 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 164
- 2024AlphaMath Almost Zero: Process Supervision without Processcited by 160
- 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 158
- 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 132
- 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 123
- 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 103
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
5 more
- 2024E-SQL: Direct Schema Linking via Question Enrichment in Text-to-SQLcited by 35
- 2023No Train Still Gain. Unleash Mathematical Reasoning of Large Language Models with Monte Carlo Tree Search Guided by Energy Functioncited by 19
- 2019Content Enhanced BERT-based Text-to-SQL Generationcited by 16
- 2023Monte-Carlo Tree Search for Multi-Agent Pathfinding: Preliminary Resultscited by 9
- 2023General Method for Solving Four Types of SAT Problemscited by 4
Built on by
Citing papers per year: 2025: 2; 2026: 2.
4 papers.
- 2025CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learningcited by 15
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLcited by 8
- 2026IESR:Efficient MCTS-Based Modular Reasoning for Text-to-SQL with Large Language Modelscited by 0
- 2026LEAF-SQL: Level-wise Exploration with Adaptive Fine-graining for Text-to-SQL Skeleton Predictioncited by 0
- 2026LEAF-SQL: Level-wise Exploration with Adaptive Fine-graining for Text-to-SQL Skeleton Prediction10 May 2026
- 2026IESR:Efficient MCTS-Based Modular Reasoning for Text-to-SQL with Large Language Models5 Feb 2026
- 2025CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learning19 May 2025
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL19 May 2025