MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework

基本信息

摘要

Remarkable progress has been made on automated problem solving through societies of agents based on large language models (LLMs). Existing LLM-based multi-agent systems can already solve simple dialogue tasks. Solutions to more complex tasks, however, are complicated through logic inconsistencies due to cascading hallucinations caused by naively chaining LLMs. Here we introduce MetaGPT, an innovative meta-programming framework incorporating efficient human workflows into LLM-based multi-agent collaborations. MetaGPT encodes Standardized Operating Procedures (SOPs) into prompt sequences for more streamlined workflows, thus allowing agents with human-like domain expertise to verify intermediate results and reduce errors. MetaGPT utilizes an assembly line paradigm to assign diverse roles to various agents, efficiently breaking down complex tasks into subtasks involving many agents working together. On collaborative software engineering benchmarks, MetaGPT generates more coherent solutions than previous chat-based multi-agent systems. Our project can be found at https://github.com/geekan/MetaGPT

核心贡献

  1. 元编程(Meta Programming)框架: 提出了一种创新的元编程框架,将人类高效的工作流程(SOP,标准化操作流程)编码到 LLM 多智能体协作的提示序列中,使智能体能够按照结构化流程进行协作,而非简单地链式调用 LLM。

  2. SOP 编码机制: 将软件工程等领域的标准化操作流程(SOP)转化为可执行的提示序列,使每个智能体具备类人的领域专业知识,并能在中间结果阶段进行验证和纠错,从源头上减少了级联幻觉(Cascading Hallucinations)问题。

  3. 流水线(Assembly Line)范式: 引入了类似工业流水线的协作范式,将复杂任务分解为多个子任务,分配给具有不同角色的专业智能体(如产品经理、架构师、工程师、测试员等)高效协作完成。

  4. 中间结果验证机制: 智能体在执行过程中会验证中间产出的质量,通过结构化的文档传递(如需求文档、设计文档、API 设计等)确保上下游智能体之间的信息一致性,有效抑制了幻觉传播。

  5. 在软件工程基准上的优越性: 在协作式软件工程基准测试中,MetaGPT 生成的解决方案比现有基于聊天的多智能体系统更加连贯和可靠。

方法概述

MetaGPT 的核心方法包括以下几个关键组件:

实验结果

MetaGPT 在多个软件工程基准测试上进行了评估:

相关论文

相关概念

分析信息


导入时间: 2026-05-01 23:30 导入方式: url