Agentar-Scale-SQL: Orchestrated Text-to-SQL Scaling
- Agentar-Scale-SQL is a Text-to-SQL framework that orchestrates test-time scaling by integrating RL-enhanced intrinsic reasoning, iterative repair, and diverse candidate synthesis.
- Its modular design enables easy adaptation to new databases by separating offline schema indexing from online inference while improving query accuracy.
- Empirical results on the BIRD benchmark show state-of-the-art execution accuracy, validating the benefits of orchestration over traditional single-trace methods.
Searching arXiv for the specified paper and closely related agentic Text-to-SQL work. Agentar-Scale-SQL is a Text-to-SQL framework that advances performance through an explicitly orchestrated use of test-time computation. It is described as a general-purpose framework designed for easy adaptation to new databases and more powerful LLMs, and it structures inference around three complementary perspectives: Internal Scaling via RL-enhanced Intrinsic Reasoning, Sequential Scaling through Iterative Refinement, and Parallel Scaling using Diverse Synthesis and Tournament Selection. On the BIRD benchmark, the framework reaches 81.67\% execution accuracy on the test set and ranks first on the official leaderboard, positioning orchestrated test-time scaling as a concrete methodology for closing part of the gap between contemporary Text-to-SQL systems and human experts (Wang et al., 29 Sep 2025).
1. Concept and problem setting
Agentar-Scale-SQL is motivated by the observation that state-of-the-art Text-to-SQL methods still lag significantly behind human experts on challenging benchmarks such as BIRD, and that existing approaches to test-time scaling lack an orchestrated strategy and neglect the model's internal reasoning process (Wang et al., 29 Sep 2025). The framework therefore treats additional inference compute not as an undifferentiated budget, but as a resource to be allocated across distinct forms of reasoning and selection.
The system converts extra inference compute into higher Text-to-SQL accuracy by orchestrating three scaling perspectives at test time. Internal Scaling corresponds to “System-1 → System-2” introspection and equips the model with an intrinsic reasoning loop via reinforcement learning. Sequential Scaling corresponds to iterative, multistep deliberation that repeatedly repairs syntactic and semantic errors in candidate SQL. Parallel Scaling corresponds to concurrent, diverse proposal generation followed by structured selection rather than simple self-consistency.
This design places Agentar-Scale-SQL within the broader movement from one-shot or prompt-only SQL generation toward agentic and compute-scaled inference. Related systems emphasize different bottlenecks: semantic memory and trajectory reuse in AgentSM (Biswal et al., 22 Jan 2026), hypothesis-verification loops in APEX-SQL (Cao et al., 11 Feb 2026), and multi-turn credit assignment in SQL-ASTRA (Li et al., 17 Mar 2026). This suggests that Agentar-Scale-SQL is part of a broader reconfiguration of Text-to-SQL around controlled inference-time deliberation rather than static schema conditioning alone.
2. Orchestrated test-time scaling architecture
The framework embeds the three scaling perspectives within a three-stage pipeline. Stage 1, Task Understanding, retrieves relevant database cells and few-shot examples. Stage 2, SQL Generation Scaling, combines Internal, Parallel, and Sequential scaling to produce a candidate set . Stage 3, SQL Selection Scaling, applies Internal and Parallel scaling to choose the final query (Wang et al., 29 Sep 2025).
The following table summarizes the architecture using the terminology of the original framework.
| Component | Role | Mechanism |
|---|---|---|
| Task Understanding | Retrieve evidence before generation | Relevant database cells and few-shot examples |
| SQL Generation Scaling | Produce candidate set | Internal + Parallel + Sequential scaling |
| SQL Selection Scaling | Choose final SQL | Internal + Parallel scaling |
Internal Scaling is implemented through two RL-trained modules: the Intrinsic Reasoning Generator and the Intrinsic Reasoning Selector. Sequential Scaling is implemented by an Iterative Refinement module that repairs errors in candidate SQL. Parallel Scaling is implemented by Diverse Synthesis, which builds a broad candidate pool, and Tournament Selection, which compares candidates pairwise.
The architecture is explicitly modular. The framework distinguishes schema formats for different modeling pathways: DDL schema is used to fine-tune a code LLM for reasoning, while a Markdown “light” schema is used for in-context learning with general LLMs. Retrieval is also factorized into a vector store for database cell values, retrieved by keyword embeddings, and a vector store for few-shot demonstrations, retrieved by skeleton-extracted queries. The paper states that transfer to new databases requires re-executing the offline preprocessing to index schema, cells, and examples, while all online modules remain unchanged (Wang et al., 29 Sep 2025).
A plausible implication is that the framework separates persistent database-specific preparation from model-agnostic online orchestration, which is central to its claim of general-purpose adaptability.
3. Internal scaling and RL-enhanced intrinsic reasoning
Both the Reasoning Generator and the Reasoning Selector are trained with the same RL framework, GRPO (Shao et al., 2024), formalized over a state, action, policy, and reward definition. For the generator, the state encodes the user question , schema , retrieved evidence , and the partial SQL prefix. For the selector, the state contains the two SQL candidates plus execution feedback. The action is next-token emission for generation or a binary “choose left vs. right” decision for selection, and the policy is parameterized by a Transformer-based LLM (Wang et al., 29 Sep 2025).
The generator reward is defined as
The selector reward is
0
if the selected SQL is correct, and 1 otherwise (Wang et al., 29 Sep 2025).
The GRPO optimization uses a clipped surrogate loss. Let each input 2 yield 3 rollouts 4 under 5, with 6 and 7. The per-sample loss is
8
and the full objective adds a KL penalty: 9
Within Agentar-Scale-SQL, this RL machinery is not confined to SQL token generation. It also governs candidate comparison. That distinction matters because the framework claims that existing test-time scaling approaches often neglect the model’s internal reasoning process. Here, “internal reasoning” is operationalized as a trainable inference policy rather than as an untrained prompt format. In comparison, SQL-ASTRA also uses GRPO but focuses on dense step-level and trajectory-level rewards for multi-turn agentic SQL (Li et al., 17 Mar 2026). This suggests that Agentar-Scale-SQL’s contribution is less about reward shaping for multi-turn execution than about embedding RL-trained reasoning and selection into an orchestrated test-time stack.
4. Sequential and parallel scaling mechanisms
Sequential Scaling begins from an initial pool of 0 SQL candidates 1 and applies a bounded repair process. The iterative refinement algorithm examines each candidate and invokes either SQL_Fixer for syntactic invalidity or SQL_Reviser for semantic incorrectness, repeating until no new repairs are produced or a maximum number of iterations 2 is reached (Wang et al., 29 Sep 2025). To prevent combinatorial growth, candidates are grouped by identical execution results at each step, and only one representative per group is refined.
This mechanism is narrower than general-purpose agentic exploration. It does not seek new evidence from the database during every refinement step; rather, it repairs an existing candidate pool. A plausible implication is that the framework assigns exploration primarily to candidate generation and evidence retrieval, while reserving refinement for local correction.
Parallel Scaling is implemented through Diverse Synthesis and Tournament Selection. Diverse Synthesis uses two generators in parallel:
- Reasoning Generator 3: an RL-tuned, code-specialized model fine-tuned on DDL schema for precise, stepwise SQL synthesis.
- ICL Generator 4: a proprietary LLM given a light Markdown schema and retrieved few-shot examples (Wang et al., 29 Sep 2025).
Diversity is further increased by varying prompt styles, including direct prompting, Chain-of-Thought, and decomposition; by shuffling few-shot examples; and by sampling multiple temperatures and even different LLM backbones such as Gemini-Pro and GPT-5. Each generator emits 5 candidates in parallel, yielding 6. The union increases the upper bound on correct queries from 75.9\% or 81.4\% individually to 84.3\% combined (Wang et al., 29 Sep 2025).
Tournament Selection replaces majority voting over execution results with pairwise competition. The system first reduces the pool by grouping candidates with identical execution outputs on 7, selecting one representative per group to form 8. For each unordered pair 9, the selector computes
0
increments the appropriate win-score, and returns
1
Because the selector itself is trained through GRPO with reward 2, the framework claims that it learns to pick more accurate queries than simple frequency-based self-consistency (Wang et al., 29 Sep 2025).
The combination of iterative repair and pairwise tournament structure distinguishes Agentar-Scale-SQL from systems centered on retrieval of prior trajectories or explicit database exploration. AgentSM, for example, emphasizes structured semantic memory and composite tools (Biswal et al., 22 Jan 2026), while APEX-SQL emphasizes hypothesis-verification and exploration directives grounded in real data (Cao et al., 11 Feb 2026). Agentar-Scale-SQL instead concentrates compute into generation diversity, repair, and learned selection.
5. Adaptability, modularity, and scaling behavior
The paper characterizes Agentar-Scale-SQL as a modular, plug-and-play framework. Its adaptability is expressed through interchangeable schema formats, retrieval stores, and language-model backbones. To transfer the system to new databases, the required step is to re-execute offline preprocessing that indexes schema, cells, and examples; the online modules are unchanged. To scale with stronger LLMs, one can replace 3 or the code LLM backbones used in reasoning and selection, and allocate more rollouts 4, more refinement iterations 5, and larger tournaments (Wang et al., 29 Sep 2025).
This modularity is important because Text-to-SQL often exhibits sharp dependence on schema presentation and retrieval strategy. The DDL-versus-Markdown split effectively assigns different schema views to different generators. This suggests that the framework treats representational heterogeneity not as noise to be normalized away, but as a source of candidate diversity.
The use of vector stores for 6 and 7 also aligns the system with retrieval-augmented Text-to-SQL pipelines, but with a narrower role than in semantic-memory systems. In AgentSM, memory is explicitly represented as a store 8 of dense keys and structured program fragments, with top-9 retrieval by cosine similarity and selective update under an accuracy threshold (Biswal et al., 22 Jan 2026). Agentar-Scale-SQL does not define memory in that form; instead, retrieval is concentrated in task understanding and example selection. A plausible implication is that its main scaling axis is inference orchestration rather than persistent trajectory reuse.
The framework’s description that performance lifts automatically when stronger LMs, more rollouts, more refinement iterations, or larger tournaments are used should be read as a design claim about scalability rather than as a closed-form law. It states the intended direction of scaling behavior, not a universal guarantee.
6. Empirical results, ablations, and significance
The benchmark evaluation is reported on BIRD, which contains 12,751 QA-SQL pairs across 95 real-world databases. Agentar-Scale-SQL achieves 74.90\% Dev EX, 81.67\% Test EX, and 77.00\% R-VES, surpassing the previous best prompt-only result of 80.88\% Test EX from AskData+GPT-4o and the best single-model baseline of 75.68\% from Databricks RLVR 32B. The paper further states that Agentar-Scale-SQL was Leader #1 on the official BIRD leaderboard as of Sept 28 2025 (Wang et al., 29 Sep 2025).
The ablation results assign differentiated value to the three scaling components and to task understanding.
| Ablation | Effect on EX |
|---|---|
| –Reasoning Generator | drops by 4.89 pp |
| –ICL Generator | drops by 3.78 pp |
| –Selection Scaling (self-consistency) | drops by 1.82 pp |
| –Iterative Refinement | –0.52 pp |
| –Task Understanding | –0.45 pp |
These results indicate that the two parallel generators account for the largest performance contributions, with the RL-tuned reasoning generator producing the largest single drop when removed. Selection scaling also matters, though less than generator diversity, while iterative refinement and task understanding contribute smaller but still measurable gains.
The generator-synergy analysis reports an upper bound of 81.36\% using only the ICL generator, 75.88\% using only the reasoning generator, and 84.29\% using the combined pool. The effect of candidate count shows that Pass@k rises steeply until 0, then plateaus (Wang et al., 29 Sep 2025). This empirical profile is consistent with the framework’s emphasis on parallel scaling: additional candidates help substantially at first, but marginal returns diminish after moderate pool sizes.
In the broader Text-to-SQL landscape, these results should not be conflated with other benchmarks or task settings. APEX-SQL reports 70.65\% execution accuracy on BIRD and 51.01\% on Spider 2.0-Snow under an exploration-centered design (Cao et al., 11 Feb 2026). AgentSM reports 44.8\% execution accuracy on Spider 2.0 Lite with reduced average token usage and trajectory length through semantic memory (Biswal et al., 22 Jan 2026). SQL-ASTRA reports gains from dense multi-turn reward shaping on BIRD and Spider-Dev (Li et al., 17 Mar 2026). These systems address related bottlenecks, but their reported metrics are attached to different datasets, evaluation protocols, and architectural assumptions. The significance of Agentar-Scale-SQL lies specifically in demonstrating that orchestrated Internal, Sequential, and Parallel test-time scaling can deliver state-of-the-art BIRD performance within a modular Text-to-SQL pipeline.
A common misconception is that “test-time scaling” in Text-to-SQL is equivalent to sampling more SQL candidates and taking a vote. Agentar-Scale-SQL directly contradicts that narrower view. Its framework includes RL-trained intrinsic reasoning, iterative repair, dual-generator diversity, and tournament-style learned selection. Another misconception is that stronger base models alone explain the reported gains. The ablation results indicate that orchestration itself contributes materially: removing the reasoning generator, ICL generator, selection scaling, iterative refinement, or task understanding each reduces execution accuracy (Wang et al., 29 Sep 2025).
Taken together, Agentar-Scale-SQL defines a form of agentic Text-to-SQL in which inference-time compute is organized rather than merely increased. Its central claim is that the effective unit of scaling is not a single reasoning trace, but a coordinated system of reasoning, repair, synthesis, and comparison.