Multi-Agent Design: Optimizing Agents with Better Prompts and Topologies
作者: Han Zhou, Xingchen Wan, Ruoxi Sun, Hamid Palangi, Shariq Iqbal, Ivan Vulić, Anna Korhonen, Sercan Ö. Arık
分类: cs.LG, cs.AI, cs.CL, cs.MA
发布日期: 2025-02-04
备注: 11 pages, 7 figures, 1 table (30 pages, 9 figures, 5 tables including references and appendices)
💡 一句话要点
提出MASS框架,通过优化提示词和拓扑结构,自动设计高效的多智能体系统。
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 多智能体系统 提示词工程 拓扑优化 自动化设计 语言模型
📋 核心要点
- 多智能体系统的设计面临提示词和拓扑结构选择的复杂性,现有方法缺乏自动化优化手段。
- MASS框架通过交错优化提示词和拓扑结构,从局部到全局地搜索最优多智能体系统设计。
- 实验表明,MASS优化的系统性能显著优于现有方法,并总结了有效多智能体系统的设计原则。
📝 摘要(中文)
本文提出了一种多智能体系统搜索(MASS)框架,旨在自动化多智能体系统的设计过程。该框架通过深入分析设计空间,揭示了提示词和拓扑结构在构建有效多智能体系统中的关键作用。MASS通过交错优化阶段,从局部到全局,从提示词到拓扑结构,高效地探索复杂的设计空间。具体包括:1) 块级(局部)提示词优化;2) 工作流拓扑优化;3) 工作流级(全局)提示词优化。每个阶段都以前面阶段迭代优化的提示词/拓扑结构为条件。实验结果表明,MASS优化的多智能体系统显著优于现有方法。最后,基于MASS发现的系统,总结了构建有效多智能体系统的设计原则。
🔬 方法详解
问题定义:论文旨在解决多智能体系统(MAS)设计中提示词(prompts)和拓扑结构(topologies)的手动配置问题。现有方法依赖人工经验,难以在庞大的设计空间中找到最优解,导致系统性能受限。痛点在于缺乏自动化的搜索和优化机制,无法充分挖掘多智能体协作的潜力。
核心思路:论文的核心思路是将多智能体系统的设计问题转化为一个搜索优化问题,通过自动化的方式寻找最优的提示词和拓扑结构组合。这种方法避免了人工设计的局限性,能够更全面地探索设计空间,从而发现更有效的多智能体系统。
技术框架:MASS框架包含三个主要阶段:1) 块级(局部)提示词优化:针对每个智能体,独立优化其提示词,使其更好地完成局部任务。2) 工作流拓扑优化:确定智能体之间的交互方式,例如线性、星型、树状等,优化信息传递的效率。3) 工作流级(全局)提示词优化:在确定的拓扑结构下,对所有智能体的提示词进行全局优化,以提升整体协作效果。每个阶段的优化都以前一个阶段的结果为基础,迭代进行。
关键创新:MASS的关键创新在于其交错优化策略,将提示词和拓扑结构的优化解耦,并分阶段进行。这种方法降低了搜索空间的复杂度,提高了优化效率。与现有方法相比,MASS能够更有效地探索复杂的设计空间,找到更优的多智能体系统配置。
关键设计:论文中未明确给出具体的参数设置、损失函数或网络结构等技术细节。但是,可以推断,提示词优化可能采用基于梯度下降或强化学习的方法,拓扑优化可能采用进化算法或图神经网络等技术。具体的实现细节可能因任务而异,需要根据实际情况进行调整。
🖼️ 关键图片
📊 实验亮点
实验结果表明,MASS优化的多智能体系统在多个任务上显著优于现有方法。具体性能提升幅度未知,但摘要中强调了“substantial margin”,表明性能提升显著。MASS框架能够自动发现有效的多智能体系统设计,为构建高性能的协作式人工智能系统提供了新的思路。
🎯 应用场景
该研究成果可应用于各种需要多智能体协作的复杂任务,例如:自动驾驶、智能客服、金融交易、医疗诊断等。通过自动优化智能体的行为和交互方式,可以显著提升系统的性能和效率,降低人工干预的成本。未来,该技术有望推动多智能体系统在更多领域的应用。
📄 摘要(原文)
Large language models, employed as multiple agents that interact and collaborate with each other, have excelled at solving complex tasks. The agents are programmed with prompts that declare their functionality, along with the topologies that orchestrate interactions across agents. Designing prompts and topologies for multi-agent systems (MAS) is inherently complex. To automate the entire design process, we first conduct an in-depth analysis of the design space aiming to understand the factors behind building effective MAS. We reveal that prompts together with topologies play critical roles in enabling more effective MAS design. Based on the insights, we propose Multi-Agent System Search (MASS), a MAS optimization framework that efficiently exploits the complex MAS design space by interleaving its optimization stages, from local to global, from prompts to topologies, over three stages: 1) block-level (local) prompt optimization; 2) workflow topology optimization; 3) workflow-level (global) prompt optimization, where each stage is conditioned on the iteratively optimized prompts/topologies from former stages. We show that MASS-optimized multi-agent systems outperform a spectrum of existing alternatives by a substantial margin. Based on the MASS-found systems, we finally propose design principles behind building effective multi-agent systems.