Files
nexus/wiki/concepts/多Agent可靠性模式.md

1.6 KiB
Raw Blame History

title, type, tags
title type tags
多Agent可靠性模式 concept

Definition

多智能体系统中用于克服 LLM 不可靠性(幻觉、逻辑谬误、上下文漂移)的四大架构模式:层级结构、共识、 adversarial debate 和淘汰制。

Four Patterns

1. 层级结构Hierarchy

  • 角色Planner规划器+ Worker工作者+ Validator验证器
  • 依赖图强制协作Worker 必须等待 Planner 分配任务且无法作弊Validator 会发现)
  • 适用场景:需要将上下文分开的复杂工作流程

2. 共识Consensus / Voting

  • 机制N 个 LLM 独立生成同一任务答案,取多数票
  • 数学基础3 个模型同时产生相同幻觉的概率 = 0.2³ = 0.8%(假设单模型幻觉率 20%
  • 适用场景:事实核查、分类任务

3. 对抗辩论Adversarial Debate

  • 角色Generator → Critic反对 → Judge裁决
  • 机制Truth survives the fight真理越辩越明
  • 适用场景:安全分析、代码审查、高风险内容审核

4. 淘汰制Knock-out

  • 类比SRE 中服务器是"cattle"(可替换)而非"pets"(独一无二)
  • 机制N 个 Agent 执行任务,最差者被淘汰;可选择用获胜者特征替换已淘汰者
  • 适用场景:迭代式 Agent 工程、开发调试

Core Insight

"Stop treating LLMs like magic chatbots. Start treating them like unreliable components in a distributed system."

Sources