arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.27233cs.AIcs.LGcs.MA
收藏

强化代理:推理时间的工具调用反馈

Reinforced Agent: Inference-Time Feedback for Tool-Calling Agents

Apple(苹果公司)

Anh Ta, Junjie Zhu, Shahin Shayandeh

AI总结:

本文提出在推理时引入反馈机制,通过分离执行与审查任务,提升工具调用代理的实时纠错能力,并通过帮助性与危害性指标评估审查模型效果。

摘要:

工具调用代理在工具选择、参数准确性和范围识别方面进行评估,但LLM轨迹评估仍具有后验性。脱离主动执行循环的评估通常通过提示微调或重新训练解决,无法实时纠正代理。为此,本文将评估引入到推理时的执行循环中:专门的审查代理在执行前评估暂定的工具调用,将范式从后验恢复转向主动评估和错误缓解。在实践中,这种架构建立了执行代理和审查代理之间的明确职责分离。审查代理可能引入新错误同时纠正其他错误,但此前无系统测量此权衡。为量化此权衡,本文引入帮助性-危害性指标:帮助性衡量基础代理错误中反馈纠正的百分比;危害性衡量正确响应中反馈降级的百分比。这些指标直接指导审查设计,揭示给定模型或提示是否提供净正价值。本文在BFCL(单轮)和Tau2-Bench(多轮状态性场景)上评估,实现相关性检测+5.5%和多轮任务+7.1%。指标显示审查模型选择至关重要:推理模型o3-mini实现3:1的收益-风险比,而GPT-4o为2.1:1。通过GEPA自动提示优化提供额外+1.5-2.8%。共同,这些结果展示了分离执行与审查的核心优势:审查可通过模型选择和提示优化系统改进,无需重新训练基础代理。

英文摘要:

Tool-calling agents are evaluated on tool selection, parameter accuracy, and scope recognition, yet LLM trajectory assessments remain inherently post-hoc. Disconnected from the active execution loop, such assessments identify errors that are usually addressed through prompt-tuning or retraining, and fundamentally cannot course-correct the agent in real time. To close this gap, we move evaluation into the execution loop at inference time: a specialized reviewer agent evaluates provisional tool calls prior to execution, shifting the paradigm from post-hoc recovery to proactive evaluation and error mitigation. In practice, this architecture establishes a clear separation of concerns between the primary execution agent and a secondary review agent. As with any multi-agent system, the reviewer can introduce new errors while correcting others, yet no prior work to our knowledge has systematically measured this tradeoff. To quantify this tradeoff, we introduce Helpfulness-Harmfulness metrics: helpfulness measures the percentage of base agent errors that feedback corrects; harmfulness measures the percentage of correct responses that feedback degrades. These metrics directly inform reviewer design by revealing whether a given model or prompt provides net positive value. We evaluate our approach on BFCL (single-turn) and Tau2-Bench (multi-turn stateful scenarios), achieving +5.5% on irrelevance detection and +7.1% on multi-turn tasks. Our metrics reveal that reviewer model choice is critical: the reasoning model o3-mini achieves a 3:1 benefit-to-risk ratio versus 2.1:1 for GPT-4o. Automated prompt optimization via GEPA provides an additional +1.5-2.8%. Together, these results demonstrate a core advantage of separating execution and review: the reviewer can be systematically improved through model selection and prompt optimization, without retraining the base agent.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑