Files
nexus/wiki/concepts/共识投票.md

32 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "共识投票"
type: concept
tags: []
---
## Definition
多智能体系统中 N 个独立 LLM 对同一任务生成答案,取出现最频繁的结果作为最终输出的模式。核心机制是利用 LLM 随机性,让不同运行的噪声相互抵消。
## Mathematical Basis
- 假设单模型幻觉率 = 20%P_hallucination = 0.2
- N 个模型同时产生相同幻觉的概率 = P_hallucination^N
- N = 3 时0.2³ = 0.008 = 0.8%
- 该公式与 SRE 中的 composite SLO 原理相同
## Implementation
1. Spawn N LLMsN 需要在成本和可靠性之间找到平衡)
2. Fan out给所有模型分配完全相同的任务
3. Fan in选取出现最频繁的答案
## Diversity Requirement
- 各 Agent 最好使用不同模型(同质化噪声会放大而非抵消)
- 确保参与者之间无反馈回路(防止群体思维和从众效应)
- 实验应像盲测一样运行
## Best For
- 事实核查
- 分类任务(如"这是垃圾邮件吗?"
## Sources
- [[Multi-Agent-System-Reliability.md]]