BAP-SQL: Budget-Aware Observation Planning for Agentic Text-to-SQL

📅 2026-08-03
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the inefficiencies in agent-based text-to-SQL tasks, where blind query execution often wastes contextual and database resources, and post-hoc compression struggles to recover critical information. To mitigate these issues, the study introduces budget-aware planning into SQL generation for the first time, dynamically rewriting queries based on risk assessment and integrating a standalone runtime safeguard. This approach enables policy-interpretable observation planning and budget-sensitive remediation under constrained resources. The method is compatible with language models of varying scales (4B/7B) and achieves a 3.4–3.6 percentage point improvement in accuracy over supervised fine-tuned baselines on a BIRD-derived benchmark, while simultaneously reducing token consumption by 4.5–5.0%.
📝 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.
Problem

Research questions and friction points this paper is trying to address.

text-to-SQL
observation planning
budget-aware
tool-using agents
resource efficiency
Innovation

Methods, ideas, or system contributions that make the work stand out.

Budget-aware planning
Agentic Text-to-SQL
Observation formation
Query rewriting
Runtime shielding