Files
nexus/wiki/concepts/验证器模式.md

26 lines
1.1 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
多智能体系统中 Validator验证器检查 Worker 输出质量不合格则退回的机制。验证器可以是确定性代码单元测试、JSON Schema 验证)或 LLM 本身。
## Validation Methods
- **确定性代码验证**单元测试、JSON Schema 验证、正则表达式匹配
- **LLM 验证**:单独训练或提示的验证模型判断输出质量
- **双模式**:可单独验证每个 Worker 输出,或在汇总所有结果后整体验证
## Placement in Multi-Agent Patterns
- [[层级结构]]HierarchyValidator 是关键角色,位于 Planner → Worker → Validator 链路的末端
- [[淘汰制]]Knock-outValidator 决定哪些 Agent 被淘汰
- [[对抗辩论]]Adversarial DebateWatchdog确定性代码打破辩论死循环
## Best Practice
- Validator 最好使用与 Generator/Worker 不同的模型(提高质量和客观性)
- 验证器可以在同一 LLM 会话中与规划器协作PLAN → VALIDATION loop
## Sources
- [[Multi-Agent-System-Reliability.md]]