arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.19292cs.AI
收藏

轮到谁了?面向有状态智能体的上下文引导模型路由

Whose turn is it? Context-guided model routing for stateful agents

Microsoft(微软)

Anikesh Parashar, Avik Dutta, Vashu Chauhan, Sumit Gulwani, Priyanshu Gupta, Hosein Hasanbeig, Vu Le, Ashish Tiwari, Jack Williams

AI总结:

该研究针对有状态智能体的模型路由问题,通过在SheetCopilot和SpreadsheetBench 2多轮版本上评估,发现感知会话历史的路由机制可提升任务通过率,且模型切换存在非对称成本。

摘要:

模型路由通过将更简单的请求分配给更廉价的模型,同时不牺牲响应质量,可降低大语言模型(LLM)应用的成本。然而,大多数路由机制将请求视为独立的,而有状态智能体并不遵循这一假设:用户轮次可能需要多次模型和工具调用,其难度取决于之前轮次产生的状态,且更换模型可能会牺牲对话提示缓存的复用性。我们研究用户轮次边界处的零样本、成本感知路由,系统改变路由规则、会话历史访问权限、在规模、推理工作量或模型提供商方面存在差异的候选模型,以及提示缓存行为。我们在 SheetCopilot 和 SpreadsheetBench 2 的多轮版本上进行评估,其中持久工作簿和跨轮依赖关系使得孤立的路由决策尤为脆弱。在匹配的分流率下,为路由提供会话历史可提升任务通过率,优于无历史的相同路由机制,且对每一组模型对均有增益;感知历史的路由机制的表现与始终使用昂贵模型的差距保持在1个百分点以内。我们还发现,成本取决于执行动态而非仅令牌价格:在更长的会话中,更廉价模型的每任务成本优势从6.8倍缩小至3.2倍。闭式缓存分析进一步表明,向下切换(从昂贵模型到廉价模型)可在两次LLM调用内收回缓存成本,而向上切换在评估条件下无法实现收支平衡。这些结果共同表明,智能体路由是一个序列决策问题:有效的策略必须考虑会话中之前发生的情况以及模型切换的非对称成本。

英文摘要:

Model routing can reduce the cost of LLM applications by assigning simpler requests to cheaper models without sacrificing the quality of the response. However, most routers treat requests as independent. Stateful agents do not operate under this assumption: a user turn may require multiple model and tool calls, its difficulty depends on the state produced by earlier turns, and changing models can sacrifice reuse of the conversational prompt cache. We study zero-shot, cost-aware routing at the user-turn boundary, systematically varying the routing rule, access to session history, candidate models that differ in size, reasoning effort, or model provider, and prompt-cache behavior. We evaluate on multi-turn versions of SheetCopilot and SpreadsheetBench 2, where persistent workbooks and cross-turn dependencies make isolated routing decisions especially brittle. At a matched offloading rate, giving the router session history improves task pass rate over the same router without history, with gains for every model pair; history-aware routing remains within one point of always using the expensive model. We also found that cost depends on execution dynamics rather than token prices alone: the cheaper model's per-task cost advantage narrows from 6.8x to 3.2x on longer sessions. A closed form cache analysis further shows that downward switches (expensive to cheap) recover their cache cost within two LLM calls, whereas upward switches do not break even under the evaluated conditions. Together, these results show that agent routing is a sequential decision problem: effective policies must account for what happened earlier in the session and for the asymmetric cost of switching models.

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

↑