Evaluation harness
Evaluation harness 指把 agent eval 端到端跑起来的基础设施层:它负责提供任务、注入工具和环境、执行 trial、记录 transcript、调用 graders、汇总结果,并尽量保证每次试验在稳定且隔离的条件下进行。
- 这个概念之所以重要,是因为评测 agent 时,分数不仅取决于任务和 grader,也取决于 harness 本身是否稳定、是否隔离、是否忠实反映生产中的 agent 运行方式。
- Anthropic 区分了
evaluation harness和agent harness。前者负责“怎么评”,后者负责“agent 怎么跑”;当我们说“在评一个 agent”时,实际上常常是在评两层 harness 与模型一起组成的系统。 - 一个好的 evaluation harness 至少要解决几件事:任务调度、多 trial 运行、环境重置、transcript 记录、grader 调用、指标聚合,以及对噪声来源的控制。
- 对 agent 来说,环境隔离尤其关键。若 trials 之间共享缓存、git 历史、文件残留或资源瓶颈,评测结果就可能反映基础设施噪声,而不是 agent 真正能力。
- 《Quantifying infrastructure noise in agentic coding evals》把这一点量化到了资源层:不仅 trial 污染会制造噪声,容器的 resource floor、kill threshold、并发条件和 cluster 健康度也会把 Infrastructure noise in evals 直接注入最终分数。
- 《How we built our multi-agent research system》补充了多智能体场景下的一个关键点:evaluation 不应假设存在唯一“正确路径”,因为不同 subagent 组合可能用完全不同但仍合理的方式完成任务。
- 这使得 research agent 更适合 outcome-based judging。Anthropic 倾向于看 factual accuracy、citation accuracy、completeness、source quality 和 tool efficiency,而不是逐步检查它是否执行了预设脚本。
- 这篇文章也补充了实践顺序:在 agent 早期迭代阶段,应尽快用小样本 eval 开始,而不是等大规模 benchmark;当 effect size 很大时,二十个左右的真实查询就足以暴露大量问题。
- 对会持续改变环境状态的 agent,文章还建议更多采用 end-state evaluation 或分 checkpoint 的状态评估,而不是强行验证每个中间步骤。
- 这个概念和 Agentic coding evals 直接相关,因为 coding agent、research agent、computer use agent 的很多评测难点,本质上都来自 harness 是否足够稳、是否公平、是否不会意外奖励投机路径。
- 这也意味着一个好的 evaluation harness 不应只记录任务配置,还应明确资源 enforcement 方法学;否则 benchmark 看起来像在测模型,实际却在测 VM 和容器策略。
ℹ️ Conflict:
- 更复杂的 evaluation harness 不自动等于更好。若 harness 太脆弱、太难维护或和真实生产路径脱节,它反而会制造额外噪声和虚假信心。
- 评测 harness 与生产 harness 不需要完全相同,但若差异过大,eval 分数就很容易失去外部效度。
- 过于严格的资源上限并不一定更“公平”;如果它把瞬时峰值都变成 OOM kill,就可能只是把基础设施脆弱性伪装成模型失败。
- Demystifying evals for AI agents
- Quantifying infrastructure noise in agentic coding evals
- How we built our multi-agent research system
- Agentic coding evals
- Infrastructure noise in evals
- Multi-agent research systems
- Anthropic
- Anthropic, “Demystifying evals for AI agents”, 2026-01-09: https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents
- 原文摘录:[llm-wiki/raw/anthropic/Demystifying evals for AI agents](/raw/anthropic/Demystifying evals for AI agents.md)
- Anthropic, “Quantifying infrastructure noise in agentic coding evals”, 发布日期未在 raw 摘录中标明。
- 原文摘录:[llm-wiki/raw/anthropic/Quantifying infrastructure noise in agentic coding evals](/raw/anthropic/Quantifying infrastructure noise in agentic coding evals.md)
- Anthropic, “How we built our multi-agent research system”, 2025-06-13.
- 原文摘录:[llm-wiki/raw/anthropic/How we built our multi-agent research system](/raw/anthropic/How we built our multi-agent research system.md)