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

LLM 代理中功能等价工具的延迟-质量路由

Latency-Quality Routing for Functionally Equivalent Tools in LLM Agents

University of Connecticut(康涅狄格大学)

Kexin Chu, Dawei Xiang, Wei Zhang

AI总结:

针对LLM代理中多个功能等价工具提供者的路由问题,提出LQM-ContextRoute上下文强盗路由器,通过延迟-质量匹配和查询特定质量估计,在运行时负载下实现延迟与质量的权衡,在多个基准上优于SW-UCB。

摘要:

工具增强的LLM代理越来越多地通过多个功能等价的提供者访问同一工具类型,例如共享接口背后的网络搜索API、检索器或LLM后端。这在运行时负载下产生了提供者路由问题:路由器必须在延迟、可靠性和答案质量上存在差异的提供者之间进行选择,通常在部署时没有黄金标签。我们引入了LQM-ContextRoute,一种用于同功能工具提供者的上下文强盗路由器。其关键设计是延迟-质量匹配:不是让低延迟在加性奖励中抵消差答案,而是路由器根据每个服务周期的预期答案质量对提供者进行排序。它将这种容量感知得分与查询特定质量估计和LLM作为评判的反馈相结合,使其能够在线适应负载变化和提供者质量差异。在主要的网络搜索负载基准上,LQM-ContextRoute在保持延迟-质量前沿的同时,F1比SW-UCB提高了2.18个百分点。在高异质性的StrategyQA设置中,LQM-ContextRoute避免了加性奖励崩溃,准确率比SW-UCB提高了18个百分点;在异质性检索器池上,NDCG比SW-UCB提高了2.91--3.22个百分点。这些结果表明,同功能工具路由受益于将延迟视为服务容量,特别是在运行时压力与提供者质量异质性共存时。

英文摘要:

Tool-augmented LLM agents increasingly access the same tool type through multiple functionally equivalent providers, such as web-search APIs, retrievers, or LLM backends exposed behind a shared interface. This creates a provider-routing problem under runtime load: the router must choose among providers that differ in latency, reliability, and answer quality, often without gold labels at deployment time. We introduce LQM-ContextRoute, a contextual bandit router for same-function tool providers. Its key design is latency-quality matching: instead of letting low latency offset poor answers in an additive reward, the router ranks providers by expected answer quality per service cycle. It combines this capacity-aware score with query-specific quality estimation and LLM-as-judge feedback, allowing it to adapt online to both load changes and provider-quality differences. On the main web-search load benchmark, LQM-ContextRoute improves F1 by +2.18 pp over SW-UCB while staying on the latency-quality frontier. In a high-heterogeneity StrategyQA setting, LQM-ContextRoute avoids additive-reward collapse and improves accuracy by up to +18 pp over SW-UCB; on heterogeneous retriever pools, it improves NDCG by +2.91--+3.22 pp over SW-UCB. These results show that same-function tool routing benefits from treating latency as service capacity, especially when runtime pressure and provider-quality heterogeneity coexist.

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

↑