MASS: Multi-Agent System Search

https://arxiv.org/pdf/2502.02533

“Multi-Agent Design: Optimizing Agents with Better Prompts and Topologies” by Google

Abstract

This article introduces the Multi-Agent System Search (MASS) framework proposed by Google, which optimizes Multi-Agent Systems (MAS) by alternating between prompt and topology optimization, significantly enhancing performance in various complex tasks.

The article presents the Multi-Agent System Search, an optimization framework for multi-agent systems that effectively utilizes the complex design space of multi-agent systems through alternating optimization phases from local to global and from prompts to topologies in three stages:

  1. Block-level prompt optimization;

  2. Workflow topology optimization;

  3. Workflow-level prompt optimization.

Each stage conditions on the prompts/topologies optimized in the previous stage.

MASS Framework

The proposed Multi-Agent System Search (MASS) framework discovers effective multi-agent system designs by alternating between prompt optimization and topology optimization within a customizable multi-agent design space (with optimized topologies and optimized prompts, as shown on the right) (key components as shown on the left).

MASS: Multi-Agent System SearchPrompt Optimization Space

  1. Instruction Optimization (IO);

  2. Exemplar Selection (ES).

Multi-Agent Design Space

Aggregate: Agents can collaborate in parallel to make diverse predictions, and then obtain the most consistent predictions through an aggregator. The aggregation block can be parameterized by Na parallel agents. Majority Vote and Self-consistency belong to this topology.

Reflect: Agents can act as validators, providing critiques and suggestions for improvement based on previous predictions. Feedback is then relayed back to the predictor or the reflector itself for iterative improvement. Similarly, the parameter Nr can define the number of self-reflections. Self-refine and Reflexion represent this module.

Debate: Compared to single-agent predictions, agents in a debate can arrive at more accurate predictions, where each debating agent gathers opinions from all other agents and provides updated responses. This topology involves multiple agents, with Nd defining the number of debate rounds.

Custom: While the first three forms of agents represent the vast majority of agent topologies, more agent definitions can be inserted into the multi-agent design space. For specific task use cases, we introduce an agent for summarization to enhance long-context capabilities within the customizable design space.

Tool-use: To establish effective multi-agent systems, it is crucial for agents to utilize tools to access external information, such as using a retriever in RAG or an executor with test cases in coding. We treat tool use as an optimizable binary “insertion” decision NT ∈ {0, 1}.

MASS: Multi-Agent System Search

MASS: Multi-Agent System SearchThe multi-agent search space includes prompts (instructions, examples) and configurable agent modules (summarization, reflection, debate, summarization, and tool use):1) Block-level prompt optimization: Block-level prompt optimization is performed separately for each agent module (represented by </>);2) Workflow topology optimization: Based on the best prompts discovered in the first stage for each agent block, MASS extracts effective configurations from the influence-weighted design space while integrating the prompts of each component from the first stage;3) Workflow-level prompt optimization: Based on the best workflow discovered in the second stage, we again perform workflow-level prompt optimization for the best multi-agent system (MAS) identified.(Topology visualization for reference only)

Leave a Comment