让AI自动选最合适的模型和工具处理复杂任务
Towards Generalized Routing: Model and Agent Orchestration for Adaptive and Efficient Inference
- 融合大模型与智能体,动态匹配任务与执行单元
- 在多个测试集上降低30%以上推理成本,效率提升显著
- 适合需要跨领域协作的高复杂度AI服务系统
大语言模型(LLMs)和领域专用AI智能体的快速发展极大地扩展了AI服务生态。然而,用户查询类型多样且常跨越多个领域和任务类型,形成了复杂异构的环境。这种多样性带来了根本性的路由挑战:如何准确将每项查询导向合适的执行单元,同时优化性能与效率。为此,我们提出MoMA(Mixture of Models and Agents),一个集成大模型与基于智能体的路由框架。基于对模型与智能体能力的深入理解,MoMA通过精准意图识别与自适应路由策略,实现效率与成本的最佳平衡。具体而言,我们构建了详尽的训练数据集,用于刻画不同路由结构下各类大模型的能力表现,识别出各模型最适配的任务。推理时,查询被动态分配至成本-性能最优的大模型。此外,我们引入基于上下文感知状态机与动态掩码的高效智能体选择策略。实验结果表明,相比现有方法,MoMA路由器在成本效益与可扩展性方面均表现出色。
原文摘要 · Abstract (English)
The rapid advancement of large language models (LLMs) and domain-specific AI agents has greatly expanded the ecosystem of AI-powered services. User queries, however, are highly diverse and often span multiple domains and task types, resulting in a complex and heterogeneous landscape. This diversity presents a fundamental routing challenge: how to accurately direct each query to an appropriate execution unit while optimizing both performance and efficiency. To address this, we propose MoMA (Mixture of Models and Agents), a generalized routing framework that integrates both LLM and agent-based routing. Built upon a deep understanding of model and agent capabilities, MoMA effectively handles diverse queries through precise intent recognition and adaptive routing strategies, achieving an optimal balance between efficiency and cost. Specifically, we construct a detailed training dataset to profile the capabilities of various LLMs under different routing model structures, identifying the most suitable tasks for each LLM. During inference, queries are dynamically routed to the LLM with the best cost-performance efficiency. We also introduce an efficient agent selection strategy based on a context-aware state machine and dynamic masking. Experimental results demonstrate that the MoMA router offers superior cost-efficiency and scalability compared to existing approaches.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。