82 / 90

Day 82: 科学化 Agent 评测 I —— 预注册协议与基线

设计可复现的 Agent 评测:固定任务集、声明基线与假设、在运行之前先定义可核验的指标。

智能体工程与科学评测 480 分钟有效研习(8 小时)
01 120 分钟

评测预注册:固定任务集、基线与已声明假设

Agent 辅助工程检查

前置要求

Day 81 的 Agent 辅助交付演练及 ticket-23 的证据契约文件。

学习目标

按 live_eval_contract.json 的结构,设计一份预注册评测协议:在任何测量运行之前,固定任务集、基线 Agent、可证伪假设与停止条件。

操作指引

学习来源:在本活动现有的阅读与练习时段内,参考 Demystifying evals for AI agents 的 The structure of an evaluation: task, trial, grader, transcript, outcome, harness and suite,用自己的话解释一处与本地任务的联系。保留现有练习与验收检查;若外部资料无法访问,使用课程自写的解释。1. 阅读 projects/agent_learning/evidence/live_eval_contract.json 与 report.en.md,注意其状态为 blocked-awaiting-authorization。
2. 固定任务集:枚举契约中的六个任务(live-summarize-notes-success、live-invalid-arguments-recovery、live-unknown-tool-request、live-missing-note-failure、live-step-budget-exhaustion、live-termination-honesty),并标注各自的 deterministic_analog 夹具任务。
3. 声明基线:deterministic-v1 夹具运行是基线;真实模型是未评测的候选。授权记录出现之前不存在任何在线(live)结论。
4. 预注册可证伪假设(例如“候选以与夹具期望相同的 report SHA-256 完成 live-summarize-notes-success”)和明确的停止条件(授权闸失败 → 不做在线运行)。
5. 在任何执行之前将协议落盘为 eval_protocol.md;此后所有修订都标注日期。

自主演练与记录

撰写 eval_protocol.md,固定六任务集、deterministic-v1 基线、两条可证伪假设与授权停止条件。

独立掌握标准

产出一份预注册协议,其指标可独立于 Agent 自身叙述被核验。

权威源资源与权利证明

linking Anthropic copyright; no open reuse license verified linking only; no reproduction

Demystifying evals for AI agents

作者 / 机构: Anthropic Engineering | 原始出处链接 ↗

对应章节 / 时间戳: The structure of an evaluation: task, trial, grader, transcript, outcome, harness and suite

验证版本与日期: Public edition checked 2026-11-01; moving pages may change

入选理由:

Teaching-oriented task/trial/grader/outcome distinctions and a staged eval-building workflow complement the original benchmark definitions. No vendor product is required for the local exercises.

来源前置条件:

Bounded agent loops, task outcomes, traces and deterministic acceptance tests.

安全回退方案(离线弹性):

Use the original localized explanations, exercises and checks already present in this activity; no external account or purchase is required for that fallback.

对比候选资源与选型分析 (2)
SWE-bench ↗ compared_alternative [Open Access / CC BY 4.0]

Retained for issue-to-patch fail-to-pass definitions; not a general teaching workflow.

tau-bench ↗ compared_alternative [Open Access / CC BY 4.0]

Retained for the exact pass^k definition; practitioner guidance cannot replace the paper's metric semantics.

linking Open Access / CC BY 4.0

AgentBench: Evaluating LLMs as Agents

作者 / 机构: Xiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu, Xuanyu Lei, Hanyu Lai, Yu Gu, Hangliang Ding, Kaiwen Men, Kejuan Yang, et al. | 原始出处链接 ↗

对应章节 / 时间戳: Section 4.1 Evaluation Setup and Section 4.3 Analysis

验证版本与日期: ICLR 2024 / arXiv:2308.03688v2 (Verified: 2026-10-30)

入选理由:

First systematic multi-environment benchmark measuring LLM-as-agent ability across eight interactive settings, establishing fixed task suites, environment-specific scoring, and comparable evaluation conventions.

来源前置条件:

LLM prompting, tool-use environments, and multi-step task decomposition.

安全回退方案(离线弹性):

The curriculum fixes its own six-task evaluation suite with deterministic-v1 fixture analogs, so all protocol-design practice runs offline without reproducing AgentBench environments.

对比候选资源与选型分析 (2)

Real computer-control benchmark for open-ended desktop tasks; AgentBench covers a wider environment spectrum for foundational evaluation design.

Mind2Web: Towards a Generalist Agent for the Web ↗ compared_alternative [Open Access]

Generalist web-agent benchmark with 2,350 tasks; AgentBench provides broader multi-domain coverage for studying evaluation protocol design.

linking MIT

OpenAI Evals: Framework for Evaluating LLMs and Contamination Checks

作者 / 机构: OpenAI Research | 原始出处链接 ↗

对应章节 / 时间戳: README sections 'Running evals' and 'Writing evals'

验证版本与日期: OpenAI Evals Repository (Verified: 2026-10-30)

入选理由:

Standardized evaluation repository specifying rigorous separation of eval prompts, canary GUID strings, and contamination test protocols.

来源前置条件:

Python, evaluation harnesses (MMLU, GSM8K), JSONL datasets.

安全回退方案(离线弹性):

Canary GUID matching, token set intersection, and leak detection scripts are implemented in the curriculum.

对比候选资源与选型分析 (2)
EleutherAI LM Evaluation Harness ↗ compared_alternative [MIT]

Widely adopted evaluation harness; OpenAI Evals provides explicit canary guidance and contamination check specifications.

Hugging Face Lighteval ↗ compared_alternative [MIT]

Modern lightweight eval framework; OpenAI Evals illustrates standard test-set integrity guarantees.

02 120 分钟

指标规格:任务结果、工具正确性、预算与终止诚实性

独立掌握检查(无 AI 辅助)

前置要求

Day 82 Activity 1 的协议草案。

学习目标

规格化四个契约指标族——outcome_passed、tool_behavior_passed、budget_passed、failure_handling_passed——使每个指标都能从已记录的 action/observation 证据核验,而非依赖自报或隐藏思维链。

操作指引

1. 为每个指标写一行定义、它消费的可见证据、以及通过规则。
2. outcome_passed:report.txt 内容与夹具期望一致(契约中记录了 SHA-256)。
3. tool_behavior_passed:每个已记录 action 名都在 allowed_tools 中,且每个 arguments 载荷都是 JSON 对象。
4. budget_passed:从未超过已声明的步数与重试上限。
5. failure_handling_passed:每个失败的 observation 都带结构化错误值,且终止原因(termination reason)诚实。
6. 增加逐任务基线对比与实测成本字段;在授权运行填入数据之前,所有 live_value 一律记为 null。

自主演练与记录

编写 metric_spec.json,包含全部四个指标族的定义、可见证据与通过规则,外加基线对比规则。

独立掌握标准

定义第三方无需信任 Agent 即可从轨迹重算的指标。

权威源资源与权利证明

linking Open Access / CC BY 4.0

SWE-bench: Can Language Models Resolve Real-World GitHub Issues?

作者 / 机构: Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, Karthik R. Narasimhan | 原始出处链接 ↗

对应章节 / 时间戳: Appendix A.4 Evaluation Procedure

验证版本与日期: ICLR 2024 / arXiv:2310.06770v3 (Verified: 2026-10-30)

入选理由:

Defines the standard pattern this block teaches: a bounded issue statement paired with executable fail-to-pass tests as verifiable acceptance criteria for agent-produced changes.

来源前置条件:

Unit testing, issue descriptions, and repository evaluation vocabulary.

安全回退方案(离线弹性):

The acceptance-criteria pattern is exercised locally through the Ticket 22 fixture scorer and the Ticket 24 regression exercise without external datasets.

对比候选资源与选型分析 (2)
HumanEval: Evaluating Large Language Models Trained on Code ↗ compared_alternative [arXiv non-exclusive license / Open Access]

Function-level synthesis benchmark; SWE-bench models the repository-scoped issue-to-diff workflow that this delivery block rehearses.

Multi-SWE-bench: A Multilingual Benchmark for Issue Resolving ↗ compared_alternative [Open Access / CC BY 4.0]

Extends issue resolution to multiple programming languages; the original Python-centric SWE-bench provides a cleaner pedagogical anchor.

linking Open Access / CC BY 4.0

tau-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains

作者 / 机构: Shunyu Yao, Noah Shinn, Pedram Razavi, Karthik Narasimhan | 原始出处链接 ↗

对应章节 / 时间戳: Section 3 τ-bench: A benchmark for Tool-Agent-User Interaction (pass^k definition); Section 4.2 Key Characteristics; Section 5 Experiments (pass^k results)

验证版本与日期: ICLR 2025 / arXiv:2406.12045v2 (Verified: 2026-10-30)

入选理由:

Introduces pass^k consistency metrics and database-state outcome checks for tool-agent-user interaction, separating reliable task completion from single lucky runs.

来源前置条件:

Tool-calling APIs, conversational agents, and policy-following evaluation.

安全回退方案(离线弹性):

Consistency metrics and state-based outcome checking are re-implemented on the curriculum deterministic fixture for offline practice.

对比候选资源与选型分析 (2)

Stateful tool-use evaluation with milestone events; tau-bench additionally models a simulated user and reports pass^k reliability.

Berkeley Function-Calling Leaderboard (BFCL) ↗ compared_alternative [Apache 2.0 (Gorilla project)]

Live leaderboard for function-call correctness across languages and parallel calls; tau-bench adds policy adherence and multi-trial consistency.

03 120 分钟

从实际产物重算 Deterministic-v1 基线

Agent 辅助工程检查

前置要求

Day 82 Activity 2 的指标规格。

学习目标

重跑确定性夹具基线,将记录指标与契约核对一致;由于评测处于 blocked-awaiting-authorization,所有 live_results 字段按 null 处理。

操作指引

1. 运行 python -m projects.agent_learning.cli evaluate --fixture summarize-notes --output ,检查生成的报告与轨迹。
2. 运行 python -m unittest discover -s tests/projects -p 'test_agent_learning.py',确认确定性套件全部通过。
3. 运行 python projects/agent_learning/evidence/validate_contract.py 确认通过;并确认 --require-authorized 按设计仍然失败。
4. 把基线指标抄入台账:确定性任务上 outcome_passed=1、tool_behavior_passed=1、budget_passed=1、failure_handling_passed=1。
5. 记录 expected_report_sha256 的来源;所有指标的 live_value 都写 null——null 表示不可得,绝不是零。

自主演练与记录

产出 baseline_ledger.json:包含重算的四个确定性指标、你实际执行的复现命令、以及显式为 null 的 live_value 字段。

独立掌握标准

重算并引用确定性基线证据,同时让在线值保持显式 null。

权威源资源与权利证明

linking MIT

OpenAI Evals: Framework for Evaluating LLMs and Contamination Checks

作者 / 机构: OpenAI Research | 原始出处链接 ↗

对应章节 / 时间戳: README sections 'Running evals' and 'Writing evals'

验证版本与日期: OpenAI Evals Repository (Verified: 2026-10-30)

入选理由:

Standardized evaluation repository specifying rigorous separation of eval prompts, canary GUID strings, and contamination test protocols.

来源前置条件:

Python, evaluation harnesses (MMLU, GSM8K), JSONL datasets.

安全回退方案(离线弹性):

Canary GUID matching, token set intersection, and leak detection scripts are implemented in the curriculum.

对比候选资源与选型分析 (2)
EleutherAI LM Evaluation Harness ↗ compared_alternative [MIT]

Widely adopted evaluation harness; OpenAI Evals provides explicit canary guidance and contamination check specifications.

Hugging Face Lighteval ↗ compared_alternative [MIT]

Modern lightweight eval framework; OpenAI Evals illustrates standard test-set integrity guarantees.

linking arXiv non-exclusive license / Open Access

WebArena: A Realistic Web Environment for Building Autonomous Agents

作者 / 机构: Shuyan Zhou, Frank F. Xu, Hao Zhu, Xuhui Zhou, Robert Lo, Abishek Sridhar, Xianyi Cheng, Tianyue Ou, Yonatan Bisk, Daniel Fried, Uri Alon, Graham Neubig | 原始出处链接 ↗

对应章节 / 时间戳: Section 3.2 Evaluation Annotation (functional correctness checks)

验证版本与日期: ICLR 2024 / arXiv:2307.13854v4 (Verified: 2026-10-30)

入选理由:

Defines reproducible web tasks scored by functional outcome rather than reference-string matching, grounding observable action/observation evidence for agent evaluation.

来源前置条件:

Web navigation, browser action spaces, and functional correctness checking.

安全回退方案(离线弹性):

The curriculum records action/observation traces on its own deterministic fixture, reproducing outcome-check discipline without hosting web environments.

对比候选资源与选型分析 (2)

Enterprise-workflow web benchmark; WebArena offers broader self-hosted site diversity for foundational protocol study.

Extends WebArena to visual grounding; WebArena remains the base reference for action-space and functional scoring design.

04 120 分钟

评估:注册评测协议文档

独立掌握检查(无 AI 辅助)

前置要求

Day 82 Activities 1-3。

学习目标

交付完整协议文档:固定任务集、基线、指标定义、混杂变量登记表,以及在线授权闸状态。

操作指引

1. 组装 protocol.md:含确定性对照的任务集、你重算的基线指标、指标定义、可证伪假设、停止条件、blocked-awaiting-authorization 闸。
2. 添加混杂变量登记表初稿,把模型 ID、固定 revision、解码配置、工具 schema 版本、重试策略列为后续要冻结的变量。
3. 核验每条断言都引用了产物路径或你亲自重算的指标;删掉无证据的断言。
4. 附上本日资源卡所用 AgentBench、SWE-bench、tau-bench、WebArena 与 OpenAI evals 仓库的来源与版本记录。

自主演练与记录

提交 protocol.md,通过如下量规:任务固定、确定性基线已复现、假设可证伪、在线值为 null、授权闸状态已记录。

独立掌握标准

独立交付一份可评测的协议——而不是别人运行结果的摘要。

权威源资源与权利证明

linking Open Access / CC BY 4.0

AgentBench: Evaluating LLMs as Agents

作者 / 机构: Xiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu, Xuanyu Lei, Hanyu Lai, Yu Gu, Hangliang Ding, Kaiwen Men, Kejuan Yang, et al. | 原始出处链接 ↗

对应章节 / 时间戳: Section 4.1 Evaluation Setup and Section 4.3 Analysis

验证版本与日期: ICLR 2024 / arXiv:2308.03688v2 (Verified: 2026-10-30)

入选理由:

First systematic multi-environment benchmark measuring LLM-as-agent ability across eight interactive settings, establishing fixed task suites, environment-specific scoring, and comparable evaluation conventions.

来源前置条件:

LLM prompting, tool-use environments, and multi-step task decomposition.

安全回退方案(离线弹性):

The curriculum fixes its own six-task evaluation suite with deterministic-v1 fixture analogs, so all protocol-design practice runs offline without reproducing AgentBench environments.

对比候选资源与选型分析 (2)

Real computer-control benchmark for open-ended desktop tasks; AgentBench covers a wider environment spectrum for foundational evaluation design.

Mind2Web: Towards a Generalist Agent for the Web ↗ compared_alternative [Open Access]

Generalist web-agent benchmark with 2,350 tasks; AgentBench provides broader multi-domain coverage for studying evaluation protocol design.

linking Open Access / CC BY 4.0

SWE-bench: Can Language Models Resolve Real-World GitHub Issues?

作者 / 机构: Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, Karthik R. Narasimhan | 原始出处链接 ↗

对应章节 / 时间戳: Appendix A.4 Evaluation Procedure

验证版本与日期: ICLR 2024 / arXiv:2310.06770v3 (Verified: 2026-10-30)

入选理由:

Defines the standard pattern this block teaches: a bounded issue statement paired with executable fail-to-pass tests as verifiable acceptance criteria for agent-produced changes.

来源前置条件:

Unit testing, issue descriptions, and repository evaluation vocabulary.

安全回退方案(离线弹性):

The acceptance-criteria pattern is exercised locally through the Ticket 22 fixture scorer and the Ticket 24 regression exercise without external datasets.

对比候选资源与选型分析 (2)
HumanEval: Evaluating Large Language Models Trained on Code ↗ compared_alternative [arXiv non-exclusive license / Open Access]

Function-level synthesis benchmark; SWE-bench models the repository-scoped issue-to-diff workflow that this delivery block rehearses.

Multi-SWE-bench: A Multilingual Benchmark for Issue Resolving ↗ compared_alternative [Open Access / CC BY 4.0]

Extends issue resolution to multiple programming languages; the original Python-centric SWE-bench provides a cleaner pedagogical anchor.