arXiv:2608.02876cs.AI2026-08被引 2

让智能体主动规划观察,省钱省力地完成文本转SQL任务。

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

论文配图:BAP-SQL: Budget-Aware Observation Planning for Agentic Text-to-SQL
图 1 · 摘自论文原文
  • 用预算控制机制预判查询风险,动态重写SQL
  • 在紧预算下成功率提升3.4~3.6个百分点,少用4.5%~5.0%令牌
  • 适合资源受限的高复杂度文本转数据库场景

工具使用型智能体不仅被动接收观察,其行为还决定后续信息的生成。在文本转SQL任务中,宽泛查询可能在有效证据出现前就耗尽上下文与数据库资源,而事后压缩无法弥补丢失的行或已消耗的工作。我们提出BAP-SQL,将观察生成视为预算控制阶段:它评估查询风险,在必要时重写SQL,并将硬性限制交由独立运行时防护器执行。在通用4B、专用FINER-SQL 4B及7B模型上,BAP-SQL在紧预算条件下显著提升成功率。在主用BIRD衍生设置中,相比匹配的SFT模型,成功率达3.4/3.6个百分点提升,同时减少4.5/5.0%的令牌使用量。匹配重训练与任务级迁移分析表明,收益源于策略可见的规划与预算敏感的救援机制。随着模型能力与预算放宽,收益减弱,最宽松设置下甚至逆转,且不减少数据库实际工作量。

原文摘要 · Abstract (English)

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.

文本转SQL智能体预算控制高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。