提前路由筛选工具调用候选集,显著提升大模型效率与成功率。
AgentWeave: Routing Before Reasoning for Efficient Function Calling in Tool-Rich Language Models
- 构建确定性预推理路由层,基于可用性、需求等信号压缩候选动作空间。
- 在48个任务中实现12.5%成功率达基准0%,减少70%工具和62%输入token。
- 适合研究高效工具调用、降低推理延迟的系统优化方向从业者。
大型语言模型越来越多地依赖大量工具、函数、API和专用代理。随着可选动作空间增大,函数调用模型需处理更多模式、消耗更多提示词,并区分日益相似或无关的选项。本文提出一种互补系统策略:在模型推理前缩小候选集,保持下游模型不变。引入AgentWeave,一个确定性的预推理路由层,利用可用性、需求、能力及路由信号构建有限的模型可见动作空间。在公开的MadeAgents/Hammer2.1-1.5b模型上,采用冻结的BFCL衍生路由压力协议进行评估。在48个新生成的BFCL V4多函数任务中,AgentWeave实现6/48(12.5%)的原生BFCL成功,而所有工具、确定性随机前8和语义前8基线均为0/48。配对成功率差异为+12.5个百分点,95%置信区间为+4.17至+22.92,精确McNemar检验p=0.03125。相较于全工具暴露,AgentWeave减少70.18%工具,节省61.70%输入token,平均本地模型延迟降低50.95%。结果虽聚焦于BFCL衍生的路由压力测试,非正式完整榜单,且绝对成功率仍低,但表明候选空间构造能显著影响固定模型的函数调用行为,支持将路由作为独立于模型推理的前置阶段进行评估。
原文摘要 · Abstract (English)
Large language models increasingly operate over large collections of tools, functions, APIs, and specialized agents. As the candidate action space grows, a function-calling model must process more schemas, consume more prompt tokens, and distinguish among increasingly similar or irrelevant alternatives. We study a complementary systems strategy: reduce the candidate set before language-model inference while leaving the downstream model unchanged. We introduce AgentWeave, a deterministic pre-inference routing layer that constructs a bounded model-visible action space using eligibility, requirement, capability, and routing signals. We evaluate AgentWeave with a frozen BFCL-derived routing-pressure protocol using the public MadeAgents/Hammer2.1-1.5b model. On 48 fresh BFCL V4 multiple-function tasks, AgentWeave achieves 6/48 (12.5%) native BFCL successes, whereas all-tools, deterministic random top-8, and semantic top-8 baselines each achieve 0/48. The paired success difference is +12.5 percentage points with a 10,000-resample paired bootstrap 95% confidence interval of +4.17 to +22.92 points and exact McNemar p=0.03125. Relative to all-tools exposure, AgentWeave presents 70.18% fewer tools, uses 61.70% fewer input tokens, and exhibits 50.95% lower mean local-model latency. The result is deliberately narrow: this is a BFCL-derived routing-pressure study rather than an official full BFCL leaderboard score, and absolute task success remains low. The evidence nevertheless shows that candidate-space construction can materially affect a fixed model's function-calling behavior and motivates evaluating routing as a distinct stage before model reasoning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。