TL;DR
SQLConductor is a step-wise orchestration framework for Text-to-SQL that dynamically selects the next reasoning subtask based on real-time execution feedback. By training a compact policy model via offline Monte Carlo Tree Search (MCTS) and Curriculum Reinforcement Learning to coordinate larger, frozen Large Language Models (LLMs), it achieves state-of-the-art accuracy on complex benchmarks while reducing token costs by up to 16×.
What Problem Does This Paper Address?
Translating natural language questions into executable SQL queries (Text-to-SQL) over complex database environments requires multiple coordinated reasoning steps, such as schema linking, value extraction, and query refinement.
Existing systems typically tackle this using rigid, predefined multi-stage pipelines or "plan-then-execute" orchestration systems that commit to a complete workflow upfront. As illustrated in Figure 1, these paradigms lack adaptivity: they cannot adjust their course based on intermediate artifacts or execution errors, leading to severe error propagation in complex cases and unnecessary computational overhead for straightforward queries.
Methods
SQLConductor solves this by separating process organization from subtask reasoning. It frames Text-to-SQL subtasks as a modular action space containing seven specialized actions (Question Decomposition, Relevant Value Extraction, Operation Identification, Schema Pruning, SQL Generation, SQL Refinement, and Termination) driven by frozen LLMs.
To train a lightweight policy model to dynamically select these actions step-by-step, the authors introduce Search-to-Policy Learning, an offline training pipeline consisting of four key stages:
- MCTS-based Workflow Exploration: Monte Carlo Tree Search broadly explores candidate action sequences for each training query, guided by an execution-consistency reward.
- Workflow Supervision Curation: To eliminate accidental or unstable successes, trajectories are grouped by their structural "skeletons." The framework estimates a Laplace-smoothed stability score for each workflow and uses an LLM to augment the best paths with step-level reasoning justifications.
- Stability-weighted SFT: The policy model is fine-tuned using an instruction-tuning format where the loss function prioritizes robust, high-stability orchestration patterns.
- Curriculum Reinforcement Learning: The policy is further calibrated using Group Relative Policy Optimization (GRPO) on a curriculum of challenging queries where the initial MCTS exploration struggled.
The complete offline training and online deployment architecture is detailed in Figure 2.
Datasets
- BIRD-Train: Used to perform offline MCTS exploration and train the orchestration policy.
- BIRD-Dev: The primary evaluation benchmark, consisting of 1,534 challenging cross-domain questions across 11 distinct databases.
- Out-of-Distribution (OOD) Benchmarks: Spider-Test, KaggleDBQA, and ScienceBenchmark were utilized exclusively for zero-shot evaluation to test the policy's generalization capabilities without dataset-specific re-training.
Key Insights and Ideas
- Separation of Concerns: Decoupling the orchestration policy (how to solve) from subtask execution (the underlying LLM capabilities) allows a compact model (e.g., 8B parameters) to effectively manage much larger models without modifying their weights.
- Dynamic Effort Allocation: Rather than executing a fixed number of steps, the trained policy dynamically scales workflow depth based on query difficulty—allocating short paths to simple questions and reserving deeper, iterative refinement loops for challenging ones.
- Stability Filtering over Brute-Force Success: In code generation tasks, a model can occasionally stumble upon the correct execution result through a flawed logic path. Grouping trajectories by workflow skeletons and applying Laplace smoothing (shown in Figure 3) ensures that the policy learns reproducible, robust strategies rather than brittle hacks.
Key Results
- State-of-the-Art Performance: SQLConductor achieved 73.2% Execution Accuracy (EX) on BIRD-Dev when pairing an 8B policy model with Gemma4-31B-It as the action LLM, outperforming monolithic models and fixed pipelines.
- Extreme Efficiency: Under a shared Qwen2.5-Coder-32B backbone, SQLConductor achieved 71.2% EX while consuming roughly 16× fewer input tokens than pipeline baselines like CHESS. This reduced the average API cost to just \$0.012 per query.
- Strong Generalization: Without any fine-tuning on OOD datasets, the framework achieved a top OOD average score of 72.4%, demonstrating pronounced gains on complex scientific and web databases (KaggleDBQA and ScienceBenchmark).
Limitations and Future Work
While a dedicated limitations section is not included in the paper, a few constraints are apparent from the design:
- Action LLM Dependency: The framework's ultimate performance remains bounded by the baseline capabilities of the frozen action LLMs; the policy can optimize the route but cannot fix fundamentally broken subtask outputs.
- Predefined Action Space: The seven actions are currently human-engineered. Future work could explore automated action space discovery or expanding the framework to support non-relational databases and hybrid data-agent tasks.
Summary updated