面向工具使用智能体的轨迹级推测与语义验证

·

研究论文 · 2026/10/16

大型语言模型智能体通过长序列工具调用解决任务,主流设计让单一强模型生成每一步,尽管许多步骤对更小的模型来说足够常规。现有的工作分担方式仍将强模型作为生成器:路由器和协作智能体决定哪个模型处理每个查询或步骤,推测方法则逐步检查小模型的草稿,通常对照强模型自身的动作。我们提出 SpecAgent,一种协作协议,将强模型从每一步的作者转变为弱模型草拟步骤的审查者。弱模型在草拟时执行只读工具调用,使每一步都基于真实观察,并保留第一个会修改环境的动作。强模型随后在单次预填充中验证草拟片段,提交其判断为语义有效的最长前缀,并修复第一个被拒绝的步骤。由于验证用并行预填充替代自回归解码,强模型仅解码简短裁决和偶尔的修复,而非每一步。在 τ^2-Bench 上,SpecAgent 的成功率与强模型相差不到一个百分点,同时内存流量和墙钟时间大约减半;在 AutomationBench 和 VitaBench 上,它恢复了 44-75% 的质量差距,同时降低了这两者。在 MCP-Atlas 上使用三个云模型进行边缘-云部署时,它弥合了 53-75% 的弱-强质量差距,而强模型生成的 token 最多只有一半。这些结果表明,强模型不必编写智能体的每一步:审查有依据的草稿可保留其大部分质量,同时减少延迟和内存流量。

该研究提出了一种新的协作协议,让强模型仅审查弱模型基于真实工具观察生成的草稿,而非逐步生成,从而在保持接近强模型质量的同时显著降低延迟和内存流量,为高效部署工具使用智能体提供了实用方案。

Large language model agents solve tasks through long sequences of tool calls, and the prevailing design has a single strong model generate every step, although many steps are routine enough for a much smaller model. Existing ways of sharing this work keep the strong model as the generator: routers and collaborative agents decide which model handles each query or step, and speculative methods check a small model's drafts one step at a time, usually against the strong model's own action. We introduce SpecAgent, a collaboration protocol that turns the strong model from the author of each step into a reviewer of steps drafted by a weak model. The weak model executes read-only tool calls as it drafts, so that every step is grounded in real observations, and holds the first action that would modify the environment. The strong model then verifies the drafted segment in a single prefill pass, commits the longest prefix it judges semantically valid, and repairs the first rejected step. Because verification replaces autoregressive decoding with parallel prefill, the strong model decodes only short verdicts and occasional repairs rather than every step. On τ^2-Bench, SpecAgent comes within one point of the strong model's success rate while roughly halving memory traffic and wall time, and on AutomationBench and VitaBench it recovers 44-75% of the quality gap while lowering both. In an edge-cloud deployment on MCP-Atlas with three cloud models, it closes 53-75% of the weak-strong quality gap while the strong model generates at most half as many tokens. These results suggest that a strong model need not author every step of an agent: reviewing grounded drafts retains most of its quality while cutting both latency and memory traffic.

阅读原文

参与讨论