How to best design prompts and topologies for effective LLMs?
Multi-Agent Design: Optimizing Agents with Better Prompts and Topologies
February 5, 2025
https://arxiv.org/pdf/2502.02533This paper explores the automated design of multi-agent systems (MAS) driven by large language models (LLMs). It aims to optimize both the individual agent prompts (instructions) and the overall system topology (how agents interact) for better performance.
Key points for LLM-based multi-agent systems:
- Prompt optimization is crucial: Optimizing individual agent prompts is more effective than simply scaling the number of agents with default prompts. Local prompt optimization (per agent) should be done before optimizing the overall system. A final workflow-level prompt optimization further refines the system after the topology is determined.
- Topology matters, but not all topologies are equal: Some agent interaction structures are more beneficial than others. The research introduces a method to identify and focus on the most influential topologies, simplifying the search for optimal designs.
- Automated design outperforms manual design: The proposed multi-stage optimization framework (MASS) automatically finds better-performing multi-agent system designs than manually crafted or other existing automated approaches. MASS interleaves prompt and topology optimization in multiple stages.
- Guidelines for effective MAS design: The research suggests prioritizing individual agent prompt optimization, focusing on influential topologies, and considering the interdependence between agents when designing multi-agent systems.