AgentGrad:面向多智能体系统的干预引导提示优化
研究论文 · 2026/09/10
基于大语言模型(LLM)的多智能体系统(MAS)通过使用专门化的多个智能体实现强大性能,但其性能依赖于每个智能体的提示设计。对于MAS提示优化,利用自然语言反馈指导提示更新的文本梯度方法已成为主流范式。本文指出,现有文本梯度方法在梯度提取和梯度聚合两个阶段存在局限。在梯度提取中,先前工作选择目标提示时未验证修改该提示是否能解决失败,且在没有对相应智能体中间输出进行智能体级监督的情况下推导梯度。在梯度聚合中,单个梯度被随机分组并拼接,常混合不相关的失败模式,导致生成的提示无法泛化。为解决这些局限,我们提出AgentGrad,一种基于顺序干预和语义文本梯度抽象的多智能体系统提示优化框架。对于每个失败,顺序干预每次修改一个智能体的行为,以识别修改后能解决失败的目标智能体。目标智能体的修改后输出随后作为智能体级监督,用于提取细粒度梯度。语义文本梯度抽象对语义相似的梯度进行聚类,以防止混合不相关的失败模式,并将每个聚类抽象为一个泛化梯度,捕捉共享的纠正模式。实验结果表明,AgentGrad在五个MAS基准上达到最先进性能,并且与次快基线相比,平均减少2.5倍的挂钟优化时间。
该论文针对多智能体系统提示优化中的关键问题提出了创新性解决方案,并在多个基准上验证了其有效性和效率,对于相关领域的研究者和实践者具有重要参考价值。
Large language model (LLM)-based multi-agent systems (MAS) achieve strong performance by employing specialized multiple agents, yet their performance depends on the prompt design of each agent. For MAS prompt optimization, textual gradient methods that guide prompt updates using natural-language feedback have emerged as a leading paradigm. In this paper, we identify limitations in two stages of existing textual gradient approaches: gradient extraction and gradient aggregation. In gradient extraction, previous works select a target prompt without verifying whether modifying it resolves the failure, and derive gradients without agent-level supervision over the corresponding agent's intermediate output. In gradient aggregation, individual gradients are randomly grouped and concatenated, often mixing unrelated failure modes and producing prompts that fail to generalize. To address these limitations, we propose AgentGrad, a prompt optimization framework for multi-agent systems based on sequential intervention and semantic textual gradient abstraction. For each failure, sequential intervention modifies the behavior of one agent at a time to identify the target agent whose modification resolves the failure. The modified output of the target agent then serves as agent-level supervision for extracting a fine-grained gradient. Semantic textual gradient abstraction clusters semantically similar gradients to prevent mixing unrelated failure modes, and abstracts each cluster into a generalized gradient that captures the shared corrective pattern. Experimental results show that AgentGrad achieves state-of-the-art performance across five MAS benchmarks and reduces wall-clock optimization time by 2.5times on average compared to the next-fastest baseline.