AI 中文总结
针对LLM智能体工具获取的异构成本问题,提出CAM-DF及其轻量变体,通过训练停止决策的离线差距实现成本感知停止,在1343个任务上验证其优于基线,减少工具接触量的同时保持任务成功率。
AI 中文摘要
随着大语言模型(LLM)智能体越来越依赖搜索引擎、数据库、连接器等多样化外部服务,智能体框架面临一个根本性的工具选择挑战:获取的工具过少会导致任务信息不足,而过多的工具则会增加成本、上下文负载和隐私暴露。路由器和检索器可按相关性对候选工具进行排名,但仅靠排名无法确定值得选择的工具数量,现有方法未解决异构成本下的工具获取问题。我们将该决策表述为对已排名工具前缀的成本感知边际决策聚焦停止(CAM-DF),其中CAM-DF-lite是一种紧凑可解释的变体。我们直接基于“立即停止与最佳后续操作之间的离线差距”进行训练:差距的符号标记决策,其幅度根据面临的收益对每个误差进行加权。我们证明该目标与停止目标贝叶斯对齐,且仅使用分数的规则在异构成本下次优。我们在五个工具使用领域的1343个任务上进行评估:在τ-bench零售任务中,CAM-DF在可部署方法中获得最高收益,在所有五个排名来源和两种成本机制下均优于“先预测再阈值”基线;在异构成本和高成本压力下,我们的方法达到当前最优水平,在排名较弱时增益更大;在实际执行中,CAM-DF使智能体接触的工具比完全访问时减少37%,同时保持相当的任务成功率。CAM-DF系列是一种轻量级预执行插件,可将现有工具排名转化为更低成本的获取决策,无需微调底层LLM。
英文摘要
As LLM agents increasingly depend on diverse external services such as search engines, databases, and connectors, agent harnesses face a fundamental tool-selection challenge: acquiring too few tools leaves the task under-informed, while too many adds cost, context load, and privacy exposure. Routers and retrievers can rank candidate tools by relevance, but a ranking alone does not determine how many are worth selecting. Existing approaches leave acquisition under heterogeneous costs unaddressed. We formulate this decision as cost-aware marginal decision-focused stopping (CAM-DF) over ranked tool prefixes, with CAM-DF-lite as a compact interpretable variant. We train directly on the offline gap between stopping now and the best continuation: its sign labels the decision, its magnitude weights each error by the payoff at stake. We prove this objective is Bayes-aligned with the stopping target and that score-only rules are suboptimal under heterogeneous costs. We evaluate on 1,343 tasks across five tool-use domains. On $τ$-bench Retail, CAM-DF attains the highest payoff among deployable methods, with gains over a predict-then-threshold baseline across all five ranking sources and two cost regimes. Our approach is state-of-the-art under heterogeneous costs and high cost pressure, with larger gains under weaker rankings. In live execution, CAM-DF exposes the agent to 37\% fewer tools than full access while maintaining comparable task success. The CAM-DF family is a lightweight pre-execution plugin that turns existing tool rankings into lower-cost acquisition decisions without fine-tuning the underlying LLM.