BAP-SQL: Budget-Aware Observation Planning for Agentic Text-to-SQL
Summary
BAP-SQL presents a budget-aware observation planning approach for agentic text-to-SQL, treating SQL query choice as a budget-control decision to improve tight-budget success while reducing token usage.
View Cached Full Text
Cached at: 08/05/26, 07:37 AM
# BAP-SQL: Budget-Aware Observation Planning for Agentic Text-to-SQL
Source: [https://arxiv.org/html/2608.02876](https://arxiv.org/html/2608.02876)
Chong Peng1, Pin Qian2, Su Wang2, Yihang Chen3, Varun Sah1 1Microsoft2Carnegie Mellon University 3Georgia Institute of Technology
###### Abstract
Tool\-using agents do not merely consume observations: their actions determine what arrives next\. In agentic text\-to\-SQL, a broad query can spend context and database work before useful evidence appears, while post\-hoc compression cannot recover omitted rows or expended work\. We present BAP\-SQL, which treats observation formation as a budget\-control stage: it estimates query risk, rewrites SQL when useful, and delegates hard limits to an independent runtime shield\. Across general 4B, specialized FINER\-SQL 4B, and 7B backbones, BAP\-SQL improves tight\-budget success\. On the primary BIRD\-derived setting, it gains 3\.4/3\.6 percentage points over matched SFT while using 4\.5/5\.0% fewer tokens\. Matched retraining and task\-level transfer associate the gain with policy\-visible planning and budget\-sensitive rescue\. The benefit attenuates as model capability and budget increase, reverses at the loosest setting, and does not reduce database work\.
## Introduction
Tool\-using agents do not simply process observations; they choose actions that create them\. Consider an analytics agent asked which product category generated the most revenue\. A broad join returns thousands of rows, the interface truncates the result, and the agent continues from an incomplete observation\. Summarization can reduce the text shown to the model, but it cannot undo the query or recover evidence that never entered the context\. In agentic SQL, query choice controls result cardinality, observation size, and the information available for later reasoning\.
Recent text\-to\-SQL systems use execution feedback and reinforcement learning to improve multi\-turn correction and searchMaet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib3)\); Zhanget al\.\([2025b](https://arxiv.org/html/2608.02876#bib.bib4)\); Xuet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib5)\); Huaet al\.\([2026](https://arxiv.org/html/2608.02876#bib.bib6)\)\. A parallel line of work controls tool calls, reasoning length, or context growthWanget al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib9)\); Xianget al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib10)\); Aggarwal and Welleck \([2025](https://arxiv.org/html/2608.02876#bib.bib27)\); Hanet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib28)\); Wuet al\.\([2026](https://arxiv.org/html/2608.02876#bib.bib11)\)\. Two gaps remain\. First, post\-hoc context control cannot refund database work or recover rows omitted by the original query\. Second, correctness\-oriented SQL training does not decide whether the next observation is affordable\. Our key insight is that the SQL action itself is a budget\-control decision: a selective aggregate changes result cardinality, result tokens, and downstream evidence before the observation exists\.
BAP\-SQL operationalizes this insight\. At every turn, the policy sees the remaining budget and may inspect the schema, estimate a proposed query, rewrite it, execute it, manage evidence, answer, or abstain\. Cost estimates guide the policy, while an independent runtime shield enforces hard limits\. The same policy is trained across four budget levels and adapts its actions to the remaining resources\. Figure[1](https://arxiv.org/html/2608.02876#Sx1.F1)contrasts this plan\-before\-execution loop with post\-hoc control\.
A deterministic rewriter is not sufficient for this setting\. Whether an estimate is worth requesting, whether a broad query should be replaced by an aggregate, and whether more evidence is needed depend on the question, previous observations, and remaining budget\. Reinforcement learning provides a natural way to learn these sequential choices from task outcomes while assigning zero reward to wrong or infeasible trajectories\.
This work makes four contributions\. First, it identifies observation formation as a distinct budget\-control stage for tool\-using agents and formulates its SQL instance under joint context, query, result\-token, and database\-work budgets\. Second, it introduces a closed\-loop policy that estimates query risk, chooses whether to issue a different evidence query, manages recoverable evidence, and separates planning information from hard enforcement\. Third, matched retraining, interface\-matched SQL\-RL, and a cost\-matched placebo distinguish planning, reward shaping, and inference\-time estimate use\. Fourth, experiments across general 4B, specialized FINER\-SQL 4B, and 7B generators characterize a consistent regime: gains are largest when observation budgets are tight and attenuate as generator capability and available resources increase\.
Figure 1:Post\-hoc control acts after a broad SQL query has created an oversized observation\. BAP\-SQL instead estimates the candidate, chooses whether to rewrite it, executes under a runtime shield, and returns compact visible evidence\. The schematic is not a benchmark result; all quantitative measurements follow the Experimental Setup protocol\.
## Related Work
### SQL reinforcement learning and interactive text\-to\-SQL\.
BIRD provides a realistic execution\-based benchmark for text\-to\-SQLLiet al\.\([2023](https://arxiv.org/html/2608.02876#bib.bib1)\)\. Recent systems optimize SQL generation with outcome rewards, process rewards, or multi\-turn execution feedbackWanget al\.\([2018](https://arxiv.org/html/2608.02876#bib.bib2)\); Maet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib3)\); Zhanget al\.\([2025b](https://arxiv.org/html/2608.02876#bib.bib4)\); Xuet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib5)\); Huaet al\.\([2026](https://arxiv.org/html/2608.02876#bib.bib6)\); Daiet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib30)\)\. MARS\-SQL extends this direction to trainable multi\-agent workflowsYanget al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib21)\)\. BIRD\-INTERACT further emphasizes dynamic interaction rather than one\-shot generationHuoet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib18)\)\. These systems learn how to improve a query through feedback\. BAP\-SQL focuses on a complementary question: how to change the query before execution when its observation would consume the remaining budget\.
### Budget\-aware agents and adaptive computation\.
Tool\-use and reasoning systems increasingly expose finite resources to the policy\. Search\-R1 trains long\-horizon search behavior with reinforcement learningJinet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib16)\)\. OTC\-PO rewards efficient tool use only when the task is solvedWanget al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib9)\); ALP, L1, and TALE adapt reasoning to a token budget or input difficultyXianget al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib10)\); Aggarwal and Welleck \([2025](https://arxiv.org/html/2608.02876#bib.bib27)\); Hanet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib28)\); BAGEN predicts remaining\-budget intervals and learns when to stopLinet al\.\([2026](https://arxiv.org/html/2608.02876#bib.bib17)\)\. ContextBudget formulates context compression as a budget\-conditioned sequential decision problem and trains BACM\-RL to decide when and how much history to compressJianget al\.\([2023](https://arxiv.org/html/2608.02876#bib.bib24)\); Wuet al\.\([2026](https://arxiv.org/html/2608.02876#bib.bib11)\)\. Its central empirical claim is higher task performance under both fixed and progressively tighter context budgets\. LLMLingua compresses selected prompt content and ContextBudget manages acquired interaction history; BAP\-SQL instead changes the SQL action that produces a future observation\.
### Database cost control and runtime safety\.
Query optimizers estimate cardinality and cost before executionKipfet al\.\([2019](https://arxiv.org/html/2608.02876#bib.bib23)\); Lanet al\.\([2021](https://arxiv.org/html/2608.02876#bib.bib29)\); Zhanget al\.\([2025a](https://arxiv.org/html/2608.02876#bib.bib22)\), while SQLGovernor uses DBMS feedback for SQL correction and rewritingJianget al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib7)\)\. Runtime shielding and database admission control provide a separate enforcement layerAlshiekhet al\.\([2018](https://arxiv.org/html/2608.02876#bib.bib26)\)\. Cost\-aware routing and accounting have also begun to appear in text\-to\-SQL evaluation: EllieSQL studies routingZhuet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib32)\), while CostSQL studies realized costDeochake and Mukhopadhyay \([2025](https://arxiv.org/html/2608.02876#bib.bib31)\)\. BAP\-SQL connects these ideas to an agent policy: the estimate is exposed as decision information, whereas the runtime shield remains responsible for feasibility\. Evidence storage follows the broader line of virtual context and semantic memoryPackeret al\.\([2023](https://arxiv.org/html/2608.02876#bib.bib25)\); Biswalet al\.\([2026](https://arxiv.org/html/2608.02876#bib.bib8)\)\. Unlike a database optimizer, the policy may choose a non\-equivalent evidence query because the observation and downstream reasoning process are jointly budgeted; learned optimizers instead select lower\-cost physical plans for equivalent SQL\.
## Problem Formulation
An episode contains a questionqq, schema𝒮\\mathcal\{S\}, databaseDD, and joint budget
𝐁=\[Bctx,Bquery,Bresult,Bdb\]\.\\mathbf\{B\}=\[B\_\{\\mathrm\{ctx\}\},B\_\{\\mathrm\{query\}\},B\_\{\\mathrm\{result\}\},B\_\{\\mathrm\{db\}\}\]\.The state includes the active transcript, remaining budget, prior estimates, evidence blocks, and executed SQL\. The policy emits one typed action at each turn from
𝒜=\{\\displaystyle\\mathcal\{A\}=\\\{Inspect,Estimate,Rewrite,Execute,\\displaystyle\\textsc\{Inspect\},\\textsc\{Estimate\},\\textsc\{Rewrite\},\\textsc\{Execute\},Manage,Answer,Abstain\}\.\\displaystyle\\textsc\{Manage\},\\textsc\{Answer\},\\textsc\{Abstain\}\\\}\.A SQL action is therefore not merely a retrieval call\. It changes the next observation through its result cardinality and projected structure\.
Table 1:Frozen joint budget ladder: live context tokens, executed queries, cumulative admitted result tokens, SQLite VM steps, and turn ceiling\.The channels have different accounting semantics\.BctxB\_\{\\mathrm\{ctx\}\}limits the live prompt at each turn, so archiving or compression restores context headroom\. Executed queries, admitted result tokens, and deterministic SQLite VM steps are cumulative\. Estimate and syntax\-check actions consume prompt tokens and measured database work but do not increment the query channel; estimate, rewrite, and evidence\-management actions consume a turn\. A preflight\-rejected execution consumes a turn but no query because SQL never runs\. Catalog construction is shared offline preprocessing and is not charged to individual episodes\.
We use a small, stable metric vocabulary\.*Budgeted Success*means that the final answer is correct and the episode respects all budgets\.*Official BIRD EX*is the standard unbudgeted execution\-accuracy anchor\.*Evidence Support*measures whether cited, policy\-visible rows justify the answer\.*Total tokens*are cumulative prompt, completion, result, and controller tokens across the episode; they are never subtracted\.*Active context*is the live prompt buffer at a turn and can decrease after compression or archiving\.
TheAnsweraction emits a typed scalar, list, or ordered list\. Correctness uses task\-specific normalization and numeric tolerance; lists use multiset equality, with order enforced only for ordered\-list tasks\. Malformed answers are incorrect\. Letyiy\_\{i\}be this answer and letzi=1z\_\{i\}=1when every channel respects its own level or cumulative semantics\. For taskii,
si=𝟙\[yi=yi⋆\]𝟙\[zi=1\]\.s\_\{i\}=\\mathbb\{1\}\[y\_\{i\}=y\_\{i\}^\{\\star\}\]\\mathbb\{1\}\[z\_\{i\}=1\]\.The shield makes hard breaches unreachable during normal operation; budget pressure instead appears through rejected actions, capped observations, and incorrect answers\. We retainziz\_\{i\}as an audit invariant for harness or accounting failures\.
*Frontier Score*is the trapezoidal mean over the four equally spaced ordinal budget levels, reported in percentage\-point units rather than as a probability\.
## BAP\-SQL
BAP\-SQL separates policy decisions from hard enforcement \(Figure[1](https://arxiv.org/html/2608.02876#Sx1.F1)\)\. At turntt, the policy observes the question, schema summary, remaining budget𝐁t\\mathbf\{B\}\_\{t\}, prior estimates, and stored\-evidence references\. It emits one typed action—inspect, estimate, rewrite, execute, manage evidence, answer, or abstain—and receives an updated ledger\. The same policy serves all budgets: tight regimes favor one compact aggregate, whereas larger budgets permit drill\-down and corroboration\.
### Pre\-execution query planning\.
Given a proposed SQL query,estimate\_querycombinesEXPLAIN QUERY PLAN, a zero\-row probe, and per\-database catalog statistics\. It returns p50 and p95 estimates for rows, result tokens, and database work\. Catalog statistics provide cardinalities, distinct counts, and serialized widths; SQL\-shape features mark joins, filters, aggregates, limits, and projections\. Calibration factors are fitted on disjoint databases\. ALIMIT 0probe validates bindings and output columns without admitting rows\. The policy may execute, rewrite with aggregation or selective predicates, request another evidence query, or abstain\. Rewrites need not preserve the discarded candidate’s semantics; correctness and visible support are judged against the user question\.
### Runtime shielding\.
Before execution, the environment checks the remaining ledger and configures VM\-step, row, byte, and result\-token caps\. Estimates are used to expose risk and reject clearly infeasible actions; execution\-time caps provide the hard guarantee\. Accounting continues after visible output is capped, so truncation does not refund the scan\. Syntax checks and estimates consume context and database work but not the result\-producing query channel\.
### Recoverable evidence\.
Query results are stored as evidence blocks containing rows, SQL provenance, profiles, truncation status, and retrieval references\.Archiveremoves exact rows from active context,Compressreplaces them with a deterministic profile, andDiscardmakes them unavailable\. Support is computed only from visible rows\. Restoring or fetching rows consumes result tokens again and returns them to active context; cumulative charges are never refunded\.
### Training\.
Nine programmatic workflows provide action syntax and initial budget behavior, including direct aggregation, estimate–rewrite, drill\-down, evidence compression, and justified abstention\. We retain 8,192 turn\-level SFT pairs and train rank\-32 LoRA adaptersHuet al\.\([2021](https://arxiv.org/html/2608.02876#bib.bib14)\)\. During RL, each task–budget prompt is sampled eight times; groups with 2–6 successes provide the online difficulty\-filtered training signalBaeet al\.\([2026](https://arxiv.org/html/2608.02876#bib.bib15)\)\.
### RL objective and configuration\.
We use correctness\-gated efficiency shaping rather than an explicit token, context, or database\-work reward\. For a correct and feasible trajectory with evidence scoreee, executed queriesmm, and the minimum successful group query countnn,
R=𝟏\[correct∧feasible\]\(1\+0\.4e\)rtool\(m,n\)\.R=\\mathbf\{1\}\[\\mathrm\{correct\}\\wedge\\mathrm\{feasible\}\]\\,\(1\+0\.4e\)\\,r\_\{\\mathrm\{tool\}\}\(m,n\)\.Wrong answers and hard\-budget violations receive zero, so efficiency only ranks correct trajectories; a cheap wrong answer cannot receive a positive reward\. The deterministic evidence score lies in\[0,1\]\[0,1\]and combines valid citations, provenance, visible answer support, and corroboration; no learned judge or hidden rows are used\. The tool factor follows the correctness\-gated multiplicative form used by OTC\-PO, withnntaken from the smallest successful query count in the same rollout groupWanget al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib9)\): forn\>0n\>0,f\(m,n\)=2mn/\(m\+n\)f\(m,n\)=2mn/\(m\+n\)andrtool=sin\(f\(m,n\)π/\(2n\)\)r\_\{\\mathrm\{tool\}\}=\\sin\\\!\\left\(f\(m,n\)\\pi/\(2n\)\\right\)\. For the zero\-query fallback we use the corresponding OTC\-PO cosine branch\. Budget state remains visible to the policy, and the runtime shield is unchanged\. The no\-efficiency\-shaping ablation keeps the same state, evidence bonus, and shield but setsrtool=1r\_\{\\mathrm\{tool\}\}=1\. Matched SQL\-RL instead uses pure correctness reward, removing both the evidence bonus and tool\-efficiency factor\. We optimize three adapters with group\-relative policy optimizationShaoet al\.\([2024](https://arxiv.org/html/2608.02876#bib.bib13)\); Yuet al\.\([2025](https://arxiv.org/html/2608.02876#bib.bib12)\); configuration details appear in Section[Experimental Setup](https://arxiv.org/html/2608.02876#Sx5)\.
## Experimental Setup
### Evaluation at a glance\.
The primary endpoint compares BAP\-SQL RL with matched SFT at XS/S using an ordered quality\-then\-token test\. Interface\-matched SQL\-RL is the closest trainable control, adapted BACM\-RL is the external post\-hoc comparator, and FINER\-SQL tests transfer to a stronger SQL\-specialized backbone\.
### Data\.
The BIRD\-derived source contains 8,477 tasks from 69 databasesLiet al\.\([2023](https://arxiv.org/html/2608.02876#bib.bib1)\): 7,496 train and 981 held\-out validation tasks after database\-level splitting\. Dev contains 1,523 executable tasks from 11 disjoint databases, with no database or exact\-question overlap\. Budgeted Success uses task\-specific scalar/list answers; Official BIRD EX remains an external anchor on all 1,534 official dev records\.
### Budgets and models\.
We evaluate four joint budgets \(Table[1](https://arxiv.org/html/2608.02876#Sx3.T1)\) using Qwen3\.5\-4B with reasoning mode disabledQwen Team \([2026](https://arxiv.org/html/2608.02876#bib.bib20)\)\. The ladder was chosen from training\-source profiling to span severe through moderate serving constraints and was frozen before dev evaluation\. Conditions share tasks, matched SFT initialization, online filtering, decoding, 120 updates, three seeds, syntax checks, and the runtime shield; controllers pay their prompt and output tokens\. The ladder varies all scientific channels together\. Mixed single\-channel vectors are out\-of\-distribution sensitivity probes, and a common\-turn control checks parity\.
### Baselines\.
Raw and Dashboard isolate prompting and budget visibility; Dashboard has no estimator or rewrite action\. Adaptive post\-hoc control learns truncation, summarization, profiling, or a fixed limit after execution\. Interface\-matched SQL\-RL shares the budget state, estimator, rewrite, evidence memory, and training protocol but uses pure correctness reward\. Context\-only RL freezes the matched\-SFT SQL generator and learns evidence management with the full BAP\-SQL reward\. Adapted BACM\-RL uses its released compression policy with the same frozen SQL generator\. Its prompts, summaries, and outputs are charged, but the frozen generator makes this a secondary comparison; SQL\-RL is the tighter trainable\-SQL control\.
### Metrics and inference\.
*Budgeted Success*is the primary quality measure\. We additionally report Official BIRD EX, total tokens, active context, queries, result tokens, and database work\. Quality and cost are tested in order: the primary XS/S comparison against SFT first uses a five\-percentage\-point non\-inferiority margin, then tests paired token reduction\. Ten thousand paired bootstrap replicates resample the 11 databases while retaining all task–seed observations; intervals therefore condition on the three adapters\. Database\-tt, leave\-one\-database\-out, per\-seed, macro, and sign\-test analyses check the direction\. Frontier Score is a descriptive trapezoidal mean over the four ordinal budgets\. The primary gate is conjunctive atα=0\.05\\alpha=0\.05; other intervals are exploratory and unadjusted\.
### Strong\-backbone transfer\.
We evaluate FINER\-SQL\-4B\-BIRDHoanget al\.\([2026](https://arxiv.org/html/2608.02876#bib.bib19)\)under the same budgets\. Its frozen one\-shot checkpoint reaches 41\.56/48\.33/51\.54/55\.88% at XS/S/M/L and 66\.82% Official EX\. Comparing the same one\-shot SQL across budgets partitions tasks into always\-correct, budget\-sensitive, and persistent\-under\-L groups\. We train matched FINER\-initialized SQL\-RL, BACM\-RL, and BAP\-SQL adapters; frontier cells average three seeds, while Figure[3](https://arxiv.org/html/2608.02876#Sx6.F3)shows the median\-seed transition matrix\.
### Reproducibility\.
SFT runs for one epoch \(10−410^\{\-4\}learning rate, effective batch 128, maximum length 8,192\)\. RL uses learning rate10−610^\{\-6\}, temperature 1\.0, top\-pp0\.95, 16 groups of eight trajectories per update, 120 updates, and three seeds\. Primary training and failed launches consume approximately 190 A100 GPU\-hours\. We release prompts, configs, hashes, trajectories, and analysis\.
### Ablations\.
The locked retraining suite is independent of the main frontier\. It separately trains a full\-interface SFT checkpoint and an action\-matched no\-planning SFT checkpoint on the same task–budget order, 8,192 turn pairs, maximum length, and update budget\. No\-planning retainsInspect,Execute, evidence management,Answer, andAbstain, but removes policy\-visible p50/p95 estimates andRewrite\. The runtime shield and its preflight estimator remain unchanged; the policy observes only ordinary rejection outcomes, not estimator warnings\. Pair count and maximum sequence length are matched, but exact token exposure is not forced equal\. The two SFT initializations have the same rounded aggregate performance, 31\.4/34\.3 at XS/S, before their respective RL stages\.
We retrain three no\-planning adapters with the full reward and three with pure correctness reward, using the frozen prompt pool, online filter, optimizer, and 120\-update budget\. Together with the corresponding planning\-enabled runs, this forms a2×22\\times 2factorial over policy\-visible planning and reward shaping\. All effects in the left panel of Table[4](https://arxiv.org/html/2608.02876#Sx6.T4)are computed within this locked suite using paired database bootstrap intervals\. Fixed\-adapter no\-rewrite/no\-interface interventions diagnose operational dependence in the separate main run\. A cost\-matched placebo permutes only the policy\-visible p50/p95 payload while the shield retains true estimates; it tests inference\-time reliance, not retrained causality\.
## Results
### RQ1: Tight\-budget frontier\.
BAP\-SQL has the highest observed Budgeted Success at XS/S and the highest Frontier Score \(Table[2](https://arxiv.org/html/2608.02876#Sx6.T2); Figure[2](https://arxiv.org/html/2608.02876#Sx6.F2)\)\. Relative to SFT, the XS/S gains are 3\.4 and 3\.6 percentage points\. The three adapter Frontier Scores are 38\.6, 37\.9, and 37\.2 \(sample standard deviation 0\.70\)\. Relative to adapted BACM\-RL, the gains are 1\.4 and 1\.6 percentage points, with paired intervals\[0\.8,2\.0\]\[0\.8,2\.0\]and\[0\.9,2\.3\]\[0\.9,2\.3\]\. The advantage narrows as budgets loosen: against interface\-matched SQL\-RL, the XS/S differences are\+2\.6\+2\.6\[1\.8,3\.4\]\[1\.8,3\.4\]and\+2\.4\+2\.4\[1\.6,3\.2\]\[1\.6,3\.2\]\. At L, matched SQL\-RL is 1\.4 percentage points higher than BAP\-SQL \(\[−2\.5,−0\.3\]\[\-2\.5,\-0\.3\]for BAP\-SQL–SQL\-RL\)\. Official BIRD EX is 42\.0% for BAP\-SQL RL and 41\.9% for SFT; these are descriptive unbudgeted anchors\. Across seeds, the paired XS/S gains range from 2\.6–4\.1 and 2\.8–4\.5 points\. Database\-macro gains are 3\.4/3\.6 points, and leave\-one\-database\-out ranges are\[3\.1,3\.7\]\[3\.1,3\.7\]and\[3\.2,4\.0\]\[3\.2,4\.0\]\. The matched comparisons are also directionally stable: BAP\-SQL minus SQL\-RL ranges from 2\.5–2\.7 points at XS and 2\.2–2\.7 at S, while BAP\-SQL minus BACM\-RL ranges from 1\.3–1\.5 and 1\.5–1\.8 points\.
Table 2:Budgeted Success on the BIRD\-derived dev set, pooled over three adapters for trained methods\. Frontier Score is the mean of the trapezoidal interpolant over equally spaced ordinal XS–L positions; it is not a probability or inferential endpoint\. Adapter\-seed Frontier Scores for BAP\-SQL RL are 38\.6/37\.9/37\.2 \(sample standard deviation 0\.70\)\. At L, matched SQL\-RL has the highest observed mean\.
### RQ2: Quality and interaction cost\.
Both primary budgets pass the ordered quality\-then\-cost test \(Table[3](https://arxiv.org/html/2608.02876#Sx6.T3)\)\. Total tokens fall by 4\.5% at XS and 5\.0% at S, or about 66 and 84 tokens per episode\. Quality improves on 10 of 11 databases at XS and 9 of 11 at S \(one\-sided sign\-testp≈0\.006p\\approx 0\.006and0\.0330\.033\); token reductions hold on 10 of 11 databases at both budgets\. Database\-ttintervals,\[2\.0,4\.8\]\[2\.0,4\.8\]and\[2\.1,5\.1\]\[2\.1,5\.1\], preserve the direction\. At L, the token interval crosses zero\.
Relative to BACM\-RL, BAP\-SQL has slightly lower total\-token use \(−1\.3%\-1\.3\\%at XS and−1\.4%\-1\.4\\%at S\), while BACM\-RL keeps active context 4\.1% and 4\.4% smaller\. The methods therefore occupy different quality–cost points rather than dominating every resource\.
Savings arise from shorter trajectories, not uniformly smaller outputs\. BAP\-SQL admits 13\.8 and 30\.2 result tokens at XS/S, slightly more than SFT, but completes in 2\.82 and 3\.58 turns versus 2\.93 and 3\.84\. On the outcome\-selected rescued subset, offline replay of discarded candidates reduces median result tokens from 121 to 46 at XS and from 336 to 139 at S; VM steps fall from 336K to 181K and from 804K to 451K\. These subset diagnostics explain how rewrites rescue binding cases, but pooled database work still increases by about 0\.8%; we claim no database\-compute saving\.
Table 3:Paired RL–SFT endpoint\. The non\-inferiority \(NI\) criterion is met when the one\-sided 95% database\-bootstrap lower bound exceeds−5\-5pp\. Both XS and S must then satisfy the total\-token\-reduction criterion \(paired 95% intervals entirely below zero\)\. Intervals resample 11 databases and condition on the three evaluated adapters\. Quality sign counts are 10/11 \(XS\) and 9/11 \(S\); token\-reduction sign counts are 10/11 at both budgets\. M/L are secondary\.Figure 2:Budget conditioning changes the tight\-budget operating point\. Left: Budgeted Success over the four budgets\. Right: the corresponding quality–token trajectories\. Markers pool three adapters; vertical bars are 95% database\-cluster bootstrap intervals over 11 databases, conditional on those adapters\. BAP\-SQL has the highest observed means at XS/S; secondary L means favor matched SQL\-RL\.
### RQ3: Pressure and mechanism\.
Mixed single\-channel budget vectors are sensitivity probes because the policy was trained on the four joint levels\. Around S, the BAP\-SQL–SFT gaps remain positive when tightening only context, queries, result tokens, or database work; the intervals overlap, so we do not rank channels\. Result\-token and database\-work pressure have the largest point estimates\.
### Training\-level planning effect\.
The left panel of Table[4](https://arxiv.org/html/2608.02876#Sx6.T4)is an independently locked rerun; its cells should not be mixed with the main\-frontier cells\. In the locked suite, SFT reaches 31\.4/34\.3, matched SQL\-RL 32\.2/35\.1, no\-planning RL 32\.6/35\.2, and full BAP\-SQL 34\.5/37\.2; the additional no\-planning SQL\-RL cell reaches 32\.1/34\.5\. Full\-minus\-no\-planning is therefore 1\.9/2\.0 percentage points, with paired 95% intervals\[0\.7,3\.1\]/\[0\.8,3\.2\]\[0\.7,3\.1\]/\[0\.8,3\.2\]\. Across seeds, the effect ranges from 1\.7–2\.1 points at XS and 1\.8–2\.2 at S; every seed is positive\. The locked SFT and SQL\-RL cells are within 0\.3 and 0\.1 points of their main\-frontier counterparts, while the full rerun is 0\.3/0\.4 points lower\. Both action\-matched SFT initializations round to the displayed 31\.4/34\.3 before RL\. The result identifies the combined policy\-visible estimate\-and\-rewrite package under a shared reward and curriculum; it does not separate estimation from rewriting\.
### Reward–planning interaction\.
The completed factorial separates planning and reward within the locked suite\. Without planning, full reward improves over pure correctness by 0\.5/0\.7 points; with planning, it improves by 2\.3/2\.1 points\. Conversely, planning adds 0\.1/0\.6 points under pure correctness and 1\.9/2\.0 under full reward\. The planning\-by\-reward interaction is therefore\+1\.8/\+1\.4\+1\.8/\+1\.4percentage points at XS/S, indicating that efficiency shaping and the pre\-execution interface act as complements in this training setting\.
### Fixed\-policy diagnostics\.
The right panel uses the separate main\-run reference \(34\.8/37\.6\)\. No\-rewrite is worse than removing both actions, consistent with a frozen policy receiving estimates it cannot act on\. The shuffled placebo reaches 31\.9/34\.4; its differences from no\-interface are\+0\.2/\+0\.2\+0\.2/\+0\.2, with intervals\[−0\.7,1\.1\]/\[−0\.8,1\.2\]\[\-0\.7,1\.1\]/\[\-0\.8,1\.2\]\. These diagnostics show inference\-time sensitivity but can include distribution mismatch\. Retrained no\-efficiency shaping loses 1\.9/2\.0 points and uses 5\.0% more tokens; no\-abstention changes success by only 0\.3 points\.
### Estimator behavior\.
Estimator p95 coverage is 98\.8% for rows, 97\.0% for result tokens, and 96\.0% for database work\. At least one policy\-visible warning occurs in 54% of XS episodes and 48% of S episodes\. Of these, 71%/66% trigger rewrites, and 64%/61% of warned\-and\-rewritten episodes succeed; shield\-only rejected episodes recover in 55%/52%\. These are descriptive conditional frequencies\. The shield records zero hard breaches by construction\.
A\. Locked retraining suite
B\. Main\-run diagnostics
Table 4:Mechanism evidence at XS/S\. Left: an independently locked matched retraining suite, reported as mean±\\pmseed SD\. Full BAP\-SQL exceeds no\-planning RL by 1\.9/2\.0 percentage points, with paired intervals\[0\.7,3\.1\]/\[0\.8,3\.2\]\[0\.7,3\.1\]/\[0\.8,3\.2\]; the planning\-by\-reward interaction is 1\.8/1\.4 points\. Right: diagnostics from the separate main run; all are fixed\-policy except no\-efficiency shaping\. Effects are computed only within their panel\.
### RQ4: Strong\-backbone transfer\.
One\-shot FINER already reaches 41\.6% and 48\.3% at XS/S\. BAP\-SQL reaches 45\.0% and 51\.3%, with paired one\-shot differences of\[2\.0,4\.8\]\[2\.0,4\.8\]and\[1\.6,4\.4\]\[1\.6,4\.4\]\. At XS, Figure[3](https://arxiv.org/html/2608.02876#Sx6.F3)attributes the net gain to 86 rescued budget\-sensitive tasks, 39 regressions, and 5 additional successes\. The net gain shrinks at M and reverses slightly at L\. This pattern is seed\-stable: at XS, 82–91 tasks are rescued, 39–40 regress, and the net gain ranges from 46–58 tasks \(3\.0–3\.8 points\); at S, 47–56 are rescued, 11–12 regress, and the net ranges from 40–51 tasks \(2\.6–3\.3 points\)\. Planning raises total\-token use by about 4%: 1,530 \(XS\) and 1,550 \(S\) tokens per episode versus 1,473 and 1,491 for one\-shot FINER\. Relative to matched SQL\-RL, the differences are\+1\.2\+1\.2\[0\.3,2\.1\]\[0\.3,2\.1\]and\+1\.0\+1\.0\[0\.1,1\.9\]\[0\.1,1\.9\]; relative to BACM\-RL they are\+1\.0\+1\.0\[0\.1,1\.9\]\[0\.1,1\.9\]and\+0\.7\+0\.7\[−0\.2,1\.6\]\[\-0\.2,1\.6\]\. The XS regressions primarily follow unnecessary rewrites, motivating more conservative gating\. Official EX changes descriptively from 66\.82% to 66\.7%; we make no equivalence claim\.
Figure 3:Median\-seed FINER\-SQL task\-level transfer; frontier point estimates average three adapters\. Across seeds, the XS net ranges from 46–58 tasks and the S net from 40–51\. The frozen one\-shot query partitions tasks into always\-correct, budget\-sensitive, and persistent\-under\-L groups \(left\)\. At XS, BAP\-SQL rescues 86 budget\-sensitive tasks, regresses 39 previously correct tasks, and solves 5 additional tasks, for a net gain of 52 \(middle\)\. Net gains concentrate at XS/S and reverse slightly at L \(right\)\.
### Boundary conditions and failures\.
The advantage is regime\-specific\. At L, correctness\-oriented SQL\-RL is stronger on both backbones; pooled database work does not decrease\. On a 7B coder model, the XS/S gains attenuate to\+2\.1\+2\.1\[0\.9,3\.3\]\[0\.9,3\.3\]and\+1\.8\+1\.8\[0\.6,3\.0\]\[0\.6,3\.0\]\. Thus the benefit transfers across model scale, but stronger SQL generation leaves less headroom than the general 4B setting\. On BIRD\-INTERACT\-LITE, normalized reward changes from 18\.7% to 19\.8% \(\+1\.1\+1\.1points\[−0\.8,3\.0\]\[\-0\.8,3\.0\]\) and tokens change by−3\.5%\-3\.5\\%\[−7\.0,0\.0\]\[\-7\.0,0\.0\]\. Tightening or loosening the ladder by 25% yields XS/S mean gains of\+3\.2\+3\.2\[0\.8,5\.6\]\[0\.8,5\.6\]and\+2\.7\+2\.7\[0\.4,5\.0\]\[0\.4,5\.0\]; a common 10\-turn ceiling retains\+3\.2/\+3\.3\+3\.2/\+3\.3points\. Adding 15% and 30% estimator noise changes success by−0\.4\-0\.4and−1\.8\-1\.8points, with zero hard breaches\. The shield guarantees feasibility, not optimality\.
At XS, residual SQL\-semantic and schema/value errors account for an estimated 37% of tasks\. Terminal rejection plus unjustified abstention accounts for 15%, compared with 19\.5% for adaptive post\-hoc control; remaining failures come from insufficient evidence, tool selection, or output format\. Labels use a balanced, double\-coded sample of 600 trajectories \(κ=0\.78\\kappa=0\.78\)\. BAP\-SQL therefore reduces budget\-allocation errors but does not solve base SQL competence\.
## Limitations, Ethics, and Disclosure
### Scope\.
The primary study covers one general 4B backbone, one specialized SQL backbone, 11 dev databases, and three adapter seeds\. Database\-clustered intervals condition on those adapters rather than marginalizing all training randomness\. The 7B check retains a smaller but positive effect, supporting transfer across model scale\. The BIRD\-INTERACT\-LITE interval still crosses zero, so transfer to a different interactive task remains unestablished\.
### Resource trade\-offs\.
The efficiency profile is backbone\-dependent\. On the general 4B model, BAP\-SQL saves about 66–84 tokens per episode at XS/S\. On FINER\-SQL, the same method spends about 4% more total tokens for a quality gain, because the one\-shot baseline already executes a single SQL\. BAP\-SQL also increases the number of planning actions and does not reduce database work\. Mixed single\-channel vectors are out\-of\-distribution sensitivity probes rather than clean channel\-specific interventions\.
### Comparison and mechanism limits\.
ContextBudget requires an environment adaptation because its original action space manages search history rather than SQL observations\. We keep its released policy and learning procedure intact and freeze the SQL generator, but a single harness cannot eliminate every implementation difference\. The comparison is strongest at the shared abstraction of budget\-conditioned control over incoming information\.
The no\-rewrite and no\-estimate/rewrite rows are fixed\-policy interventions and can include off\-policy mismatch\. The cost\-matched placebo more cleanly tests inference\-time dependence on estimator information\. The retrained no\-planning control establishes a training\-level contribution for the combined policy\-visible estimate\-and\-rewrite package\. It does not isolate estimator calibration or rewriting separately; a retrained shuffled\-estimate placebo would address part of this gap\. The completed reward–planning factorial identifies their interaction at the package level but remains specific to the locked curriculum\. Residual failures remain dominated by SQL semantics and schema linking\.
### Ethics and disclosure\.
The system executes read\-only SQL on local databases\. Deployment still requires least privilege, sensitive\-column controls, and query auditing\. Estimates can encode dataset\-specific cardinality patterns; a deployed catalog should be rebuilt when schemas or data distributions change\. Generative AI assisted planning, drafting, and review; human authors remain responsible for the paper and its claims\.
## Conclusion
Tool\-using agents shape future observations through action choice\. BAP\-SQL instantiates this principle for agentic text\-to\-SQL by exposing pre\-execution cost information, learning when to issue a different evidence query, and separating policy decisions from hard enforcement\. Across general, SQL\-specialized, and larger generators, it improves tight\-budget success; the gain concentrates on budget\-sensitive failures, and matched retraining provides training\-level evidence for policy\-visible planning and its positive interaction with efficiency shaping\. The effect attenuates as generator capability and available resources increase, reverses at the loosest evaluated budget, and does not reduce database work\. Thus pre\-execution observation planning is a targeted complement to stronger task policies and post\-hoc context control, and a broader design principle for agents whose actions determine the cost and content of incoming observations\.
## References
- L1: controlling how long a reasoning model thinks with reinforcement learning\.arXiv preprint arXiv:2503\.04697\.External Links:[Link](https://arxiv.org/abs/2503.04697)Cited by:[Introduction](https://arxiv.org/html/2608.02876#Sx1.p2.1),[Budget\-aware agents and adaptive computation\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px2.p1.1)\.
- M\. Alshiekh, R\. Bloem, R\. Ehlers, B\. Könighofer, S\. Niekum, and U\. Topcu \(2018\)Safe reinforcement learning via shielding\.InProceedings of the AAAI Conference on Artificial Intelligence,External Links:[Link](https://arxiv.org/abs/1708.08611)Cited by:[Database cost control and runtime safety\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px3.p1.1)\.
- S\. Bae, J\. Hong, M\. Y\. Lee, H\. Kim, J\. Nam, and D\. Kwak \(2026\)Online difficulty filtering for reasoning oriented reinforcement learning\.InProceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics,External Links:2504\.03380,[Link](https://arxiv.org/abs/2504.03380)Cited by:[Training\.](https://arxiv.org/html/2608.02876#Sx4.SS0.SSS0.Px4.p1.1)\.
- A\. Biswal, C\. Lei, X\. Qin, A\. Li, B\. Narayanaswamy, and T\. Kraska \(2026\)AgentSM: semantic memory for agentic text\-to\-SQL\.arXiv preprint arXiv:2601\.15709\.External Links:[Link](https://arxiv.org/abs/2601.15709)Cited by:[Database cost control and runtime safety\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px3.p1.1)\.
- Y\. Dai, W\. Xie, X\. Zhuang, T\. Yang, Y\. Yang, H\. Yang, Y\. Zhao, P\. Chao, and W\. Jiang \(2025\)ReEx\-SQL: reasoning with execution\-aware reinforcement learning for text\-to\-SQL\.arXiv preprint arXiv:2505\.12768\.External Links:[Link](https://arxiv.org/abs/2505.12768)Cited by:[SQL reinforcement learning and interactive text\-to\-SQL\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px1.p1.1)\.
- S\. Deochake and D\. Mukhopadhyay \(2025\)Cost trade\-offs of reasoning and non\-reasoning large language models in text\-to\-SQL\.arXiv preprint arXiv:2512\.22364\.External Links:[Link](https://arxiv.org/abs/2512.22364)Cited by:[Database cost control and runtime safety\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px3.p1.1)\.
- T\. Han, Z\. Wang, C\. Fang, S\. Zhao, S\. Ma, and Z\. Chen \(2025\)Token\-budget\-aware LLM reasoning\.arXiv preprint arXiv:2412\.18547\.External Links:[Link](https://arxiv.org/abs/2412.18547)Cited by:[Introduction](https://arxiv.org/html/2608.02876#Sx1.p2.1),[Budget\-aware agents and adaptive computation\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px2.p1.1)\.
- T\. D\. Hoang, T\. T\. Huynh, M\. Weidlich, T\. T\. Nguyen, T\. Chen, H\. Yin, and Q\. V\. H\. Nguyen \(2026\)Boosting small language models for text\-to\-SQL with fine\-grained execution feedback and cost\-efficient rewards\.InProceedings of the IEEE International Conference on Data Engineering,External Links:[Link](https://arxiv.org/abs/2605.03465)Cited by:[Strong\-backbone transfer\.](https://arxiv.org/html/2608.02876#Sx5.SS0.SSS0.Px6.p1.1)\.
- E\. J\. Hu, Y\. Shen, P\. Wallis, Z\. Allen\-Zhu, Y\. Li, S\. Wang, L\. Wang, and W\. Chen \(2021\)LoRA: low\-rank adaptation of large language models\.arXiv preprint arXiv:2106\.09685\.External Links:[Link](https://arxiv.org/abs/2106.09685)Cited by:[Training\.](https://arxiv.org/html/2608.02876#Sx4.SS0.SSS0.Px4.p1.1)\.
- H\. Hua, Z\. Han, Z\. Shen, M\. Lee, S\. Guan, Q\. Zhu, S\. Jeoung, Y\. Chen, Y\. Bai, S\. Wang, V\. N\. Ioannidis, and H\. Rangwala \(2026\)SQL\-Trail: multi\-turn reinforcement learning with interleaved feedback for text\-to\-SQL\.InProceedings of the 64th Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 36224–36246\.External Links:[Document](https://dx.doi.org/10.18653/v1/2026.acl-long.1677),[Link](https://arxiv.org/abs/2601.17699)Cited by:[Introduction](https://arxiv.org/html/2608.02876#Sx1.p2.1),[SQL reinforcement learning and interactive text\-to\-SQL\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px1.p1.1)\.
- N\. Huo, X\. Xu, J\. Li, P\. Jacobsson, S\. Lin, B\. Qin, B\. Hui, X\. Li, G\. Qu, S\. Si, L\. Han, E\. Alexander, X\. Zhu, R\. Qin, R\. Yu, Y\. Jin, F\. Zhou, W\. Zhong, Y\. Chen, H\. Liu, C\. Ma, F\. Ozcan, Y\. Papakonstantinou, and R\. Cheng \(2025\)BIRD\-INTERACT: re\-imagining text\-to\-SQL evaluation for large language models via lens of dynamic interactions\.arXiv preprint arXiv:2510\.05318\.External Links:[Link](https://arxiv.org/abs/2510.05318)Cited by:[SQL reinforcement learning and interactive text\-to\-SQL\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px1.p1.1)\.
- H\. Jiang, Q\. Wu, C\. Lin, Y\. Yang, and L\. Qiu \(2023\)LLMLingua: compressing prompts for accelerated inference of large language models\.InProceedings of the 2023 Conference on Empirical Methods in Natural Language Processing,pp\. 13358–13376\.External Links:[Document](https://dx.doi.org/10.18653/v1/2023.emnlp-main.825),[Link](https://aclanthology.org/2023.emnlp-main.825/)Cited by:[Budget\-aware agents and adaptive computation\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px2.p1.1)\.
- J\. Jiang, S\. Shen, H\. Xie, Y\. Li, Y\. Shen, D\. Huang, B\. Qian, Y\. Wu, W\. Zhang, B\. Cui, and P\. Chen \(2025\)SQLGovernor: an LLM\-powered SQL toolkit for real world application\.arXiv preprint arXiv:2509\.08575\.External Links:[Link](https://arxiv.org/abs/2509.08575)Cited by:[Database cost control and runtime safety\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px3.p1.1)\.
- B\. Jin, H\. Zeng, Z\. Yue, J\. Yoon, S\. Arik, D\. Wang, H\. Zamani, and J\. Han \(2025\)Search\-R1: training LLMs to reason and leverage search engines with reinforcement learning\.arXiv preprint arXiv:2503\.09516\.External Links:[Link](https://arxiv.org/abs/2503.09516)Cited by:[Budget\-aware agents and adaptive computation\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px2.p1.1)\.
- A\. Kipf, T\. Kipf, B\. Radke, V\. Leis, P\. Boncz, and A\. Kemper \(2019\)Learned cardinalities: estimating correlated joins with deep learning\.InProceedings of the Conference on Innovative Data Systems Research,External Links:[Link](https://arxiv.org/abs/1809.00677)Cited by:[Database cost control and runtime safety\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px3.p1.1)\.
- H\. Lan, Z\. Bao, and Y\. Peng \(2021\)A survey on advancing the DBMS query optimizer: cardinality estimation, cost model, and plan enumeration\.Data Science and Engineering\.External Links:[Document](https://dx.doi.org/10.1007/s41019-020-00149-7),[Link](https://arxiv.org/abs/2101.01507)Cited by:[Database cost control and runtime safety\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px3.p1.1)\.
- J\. Li, B\. Hui, G\. Qu, J\. Yang, B\. Li, B\. Li, B\. Wang, B\. Qin, R\. Cao, R\. Geng, N\. Huo, X\. Zhou, C\. Ma, G\. Li, K\. C\. C\. Chang, F\. Huang, R\. Cheng, and Y\. Li \(2023\)Can LLM already serve as a database interface? a BIg bench for large\-scale database grounded text\-to\-SQLs\.InAdvances in Neural Information Processing Systems,External Links:2305\.03111,[Link](https://arxiv.org/abs/2305.03111)Cited by:[SQL reinforcement learning and interactive text\-to\-SQL\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px1.p1.1),[Data\.](https://arxiv.org/html/2608.02876#Sx5.SS0.SSS0.Px2.p1.1)\.
- Y\. Lin, Z\. Wang, M\. Liu, Y\. Shan, L\. Bai, J\. Zhang, X\. Jin, B\. Chen, J\. Su, X\. Wang, J\. Pei, and M\. Li \(2026\)BAGEN: are LLM agents budget\-aware?\.arXiv preprint arXiv:2606\.00198\.External Links:[Link](https://arxiv.org/abs/2606.00198)Cited by:[Budget\-aware agents and adaptive computation\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px2.p1.1)\.
- P\. Ma, X\. Zhuang, C\. Xu, X\. Jiang, R\. Chen, and J\. Guo \(2025\)SQL\-R1: training natural language to SQL reasoning model by reinforcement learning\.arXiv preprint arXiv:2504\.08600\.External Links:[Link](https://arxiv.org/abs/2504.08600)Cited by:[Introduction](https://arxiv.org/html/2608.02876#Sx1.p2.1),[SQL reinforcement learning and interactive text\-to\-SQL\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px1.p1.1)\.
- C\. Packer, S\. Wooders, K\. Lin, V\. Fang, S\. G\. Patil, I\. Stoica, and J\. E\. Gonzalez \(2023\)MemGPT: towards LLMs as operating systems\.arXiv preprint arXiv:2310\.08560\.External Links:[Link](https://arxiv.org/abs/2310.08560)Cited by:[Database cost control and runtime safety\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px3.p1.1)\.
- Qwen Team \(2026\)Qwen3\.5\-4B model card\.Note:Hugging Face model releaseExternal Links:[Link](https://huggingface.co/Qwen/Qwen3.5-4B)Cited by:[Budgets and models\.](https://arxiv.org/html/2608.02876#Sx5.SS0.SSS0.Px3.p1.1)\.
- Z\. Shao, P\. Wang, Q\. Zhu, R\. Xu, J\. Song, X\. Bi, H\. Zhang, M\. Zhang, Y\. K\. Li, Y\. Wu, and D\. Guo \(2024\)DeepSeekMath: pushing the limits of mathematical reasoning in open language models\.arXiv preprint arXiv:2402\.03300\.External Links:[Link](https://arxiv.org/abs/2402.03300)Cited by:[RL objective and configuration\.](https://arxiv.org/html/2608.02876#Sx4.SS0.SSS0.Px5.p1.9)\.
- C\. Wang, K\. Tatwawadi, M\. Brockschmidt, P\. Huang, Y\. Mao, O\. Polozov, and R\. Singh \(2018\)Robust text\-to\-SQL generation with execution\-guided decoding\.arXiv preprint arXiv:1807\.03100\.External Links:[Link](https://arxiv.org/abs/1807.03100)Cited by:[SQL reinforcement learning and interactive text\-to\-SQL\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px1.p1.1)\.
- H\. Wang, C\. Qian, W\. Zhong, X\. Chen, J\. Qiu, S\. Huang, B\. Jin, M\. Wang, K\. Wong, and H\. Ji \(2025\)Acting less is reasoning more\! teaching model to act efficiently\.arXiv preprint arXiv:2504\.14870\.External Links:[Link](https://arxiv.org/abs/2504.14870)Cited by:[Introduction](https://arxiv.org/html/2608.02876#Sx1.p2.1),[Budget\-aware agents and adaptive computation\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px2.p1.1),[RL objective and configuration\.](https://arxiv.org/html/2608.02876#Sx4.SS0.SSS0.Px5.p1.9)\.
- Y\. Wu, Y\. Zheng, T\. Xu, Z\. Zhang, Y\. Yu, J\. Zhu, C\. Ma, B\. Lin, B\. Dong, H\. Zhu, R\. Huang, and G\. Yu \(2026\)ContextBudget: budget\-aware context management for long\-horizon search agents\.arXiv preprint arXiv:2604\.01664\.External Links:[Link](https://arxiv.org/abs/2604.01664)Cited by:[Introduction](https://arxiv.org/html/2608.02876#Sx1.p2.1),[Budget\-aware agents and adaptive computation\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px2.p1.1)\.
- V\. Xiang, C\. Blagden, R\. Rafailov, N\. Lile, S\. Truong, C\. Finn, and N\. Haber \(2025\)Just enough thinking: efficient reasoning with adaptive length penalties reinforcement learning\.arXiv preprint arXiv:2506\.05256\.External Links:[Link](https://arxiv.org/abs/2506.05256)Cited by:[Introduction](https://arxiv.org/html/2608.02876#Sx1.p2.1),[Budget\-aware agents and adaptive computation\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px2.p1.1)\.
- Z\. Xu, S\. Xia, C\. Yue, J\. Chai, M\. Tian, X\. Wang, W\. Lin, H\. Li, and G\. Yin \(2025\)MTIR\-SQL: multi\-turn tool\-integrated reasoning reinforcement learning for text\-to\-SQL\.arXiv preprint arXiv:2510\.25510\.External Links:[Link](https://arxiv.org/abs/2510.25510)Cited by:[Introduction](https://arxiv.org/html/2608.02876#Sx1.p2.1),[SQL reinforcement learning and interactive text\-to\-SQL\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px1.p1.1)\.
- H\. Yang, J\. Zhang, Z\. He, A\. Zhou, and Y\. R\. Fung \(2025\)MARS\-SQL: a multi\-agent reinforcement learning framework for text\-to\-SQL\.arXiv preprint arXiv:2511\.01008\.External Links:[Link](https://arxiv.org/abs/2511.01008)Cited by:[SQL reinforcement learning and interactive text\-to\-SQL\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px1.p1.1)\.
- Q\. Yu, Z\. Zhang, R\. Zhu, Y\. Yuan, X\. Zuo, Y\. Yue, W\. Dai, T\. Fan, G\. Liu, L\. Liu,et al\.\(2025\)DAPO: an open\-source LLM reinforcement learning system at scale\.arXiv preprint arXiv:2503\.14476\.External Links:[Link](https://arxiv.org/abs/2503.14476)Cited by:[RL objective and configuration\.](https://arxiv.org/html/2608.02876#Sx4.SS0.SSS0.Px5.p1.9)\.
- H\. Zhang, C\. Mayer, M\. Abo Khamis, D\. Olteanu, and D\. Suciu \(2025a\)LpBound: pessimistic cardinality estimation usingℓp\\ell\_\{p\}\-norms of degree sequences\.arXiv preprint arXiv:2502\.05912\.External Links:[Link](https://arxiv.org/abs/2502.05912)Cited by:[Database cost control and runtime safety\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px3.p1.1)\.
- Y\. Zhang, M\. Fan, J\. Fan, M\. Yi, Y\. Luo, G\. Li, B\. Wu, and W\. Zhou \(2025b\)Reward\-SQL: boosting text\-to\-SQL via stepwise execution\-aware reasoning and process\-supervised rewards\.arXiv preprint arXiv:2505\.04671\.External Links:[Link](https://arxiv.org/abs/2505.04671)Cited by:[Introduction](https://arxiv.org/html/2608.02876#Sx1.p2.1),[SQL reinforcement learning and interactive text\-to\-SQL\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px1.p1.1)\.
- Y\. Zhu, R\. Jiang, B\. Li, N\. Tang, and Y\. Luo \(2025\)EllieSQL: cost\-efficient text\-to\-SQL with complexity\-aware routing\.arXiv preprint arXiv:2503\.22402\.External Links:[Link](https://arxiv.org/abs/2503.22402)Cited by:[Database cost control and runtime safety\.](https://arxiv.org/html/2608.02876#Sx2.SS0.SSS0.Px3.p1.1)\.Similar Articles
Learning When to Reason for Text-to-SQL via SFT and DPO
Proposes AutoThinkSQL, a framework that integrates an auto-thinking mechanism into SFT and DPO for Text-to-SQL, enabling the model to dynamically skip reasoning for simple queries and invoke deep CoT for complex ones, achieving gains on Spider and BIRD benchmarks while reducing output tokens by 24.6% and latency by 17.1%.
EXPO-SQL: Execution-based Clause-level Policy Optimization for Text-to-SQL
EXPO-SQL proposes a fine-grained clause-level policy optimization method for Text-to-SQL, using execution feedback to assign rewards per clause rather than per query, significantly improving performance over existing supervised fine-tuning and RL approaches.
SERL-SQL: Selective Hindsight Distillation for Text-to-SQL Reinforcement Agentic Learning
SERL-SQL proposes a selective execution-grounded reinforcement learning framework for multi-turn Text-to-SQL agents, using teacher-student likelihood gaps to reweight GRPO advantages on SQL action tokens. It achieves strong results on BIRD and Spider benchmarks.
Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
This paper proposes CoTE-SQL, a self-enhanced fine-tuning framework for text-to-SQL that integrates self-reasoning traces, structured chain-of-thought prompting, and execution feedback to achieve state-of-the-art performance on Spider and Bird benchmarks.
The Nuts and Bolts of Natural Language to SQL Translation: A Systematic Analysis of Model Pipeline Optimisation Approaches and their Interactions
This paper systematically analyzes multiple pipeline extension components for Natural Language to SQL translation, including intermediate representations, synthetic data, preprocessing, and a reranker, using SmBoP and RASAT architectures, and finds that their interactions matter more than simply combining all components.