83 / 90

Day 83: 科學化 Agent 評測 II —— 混雜因素、失敗歸因與誠實解讀

正確解讀測量證據:隔離混雜變數、把失敗歸因於可觀察原因、報告不確定性而非排名。

智能體工程與科學評測 480 分鐘有效研習(8 小時)
01 120 分鐘

混雜分析:模型、Harness、配置與樣本量上限

Agent 輔助工程檢查

前置要求

Day 82 的註冊協議文件。

學習目標

列舉並控制混雜變數——模型身分與固定 revision、解碼配置、Harness 與工具面、提示上下文、樣本量——使觀察到的差異不被錯誤歸因於單一原因。

操作指引

學習來源:在本活動現有的閱讀與練習時段內,參考 Demystifying evals for AI agents 的 Types of graders for agents; capability vs. regression evals; repeated-trial reliability,用自己的話解釋一處與本地任務的聯繫。保留現有練習與驗收檢查;若外部資料無法存取,使用課程自寫的解釋。1. 建立混雜變數登記表,欄位:變數、觀測值、受控/自由、估計影響方向。須包含模型 ID+revision、temperature/seed、上下文長度、工具 schema 版本、重試策略、執行時間波動。
2. 量化樣本量上限:在 6 個任務的套件上,一個結果翻轉會使成功率移動約 17 個百分點;計算 6/6 的 Wilson 區間,看看誠實範圍有多寬。
3. 寫出報告規則:n 小時報告原始計數與區間,絕不做絕對工具排名。
4. 用雙軸對比表把 Harness 效應與模型效應分開;無法隔離的格子標「混雜(confounded)」,不要猜。

自主實作與記錄

產出 confounder_register.md:至少列出六個變數的受控/自由狀態,並附樣本量計算說明為何 6 個任務撐不起排名結論。

獨立掌握標準

說明一次比較控制了哪些變數、放開了哪些變數,並拒絕樣本撐不住的排名結論。

權威來源資源與權利證明

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

Demystifying evals for AI agents

作者 / 機構: Anthropic Engineering | 原始出處連結 ↗

對應章節 / 時間戳: Types of graders for agents; capability vs. regression evals; repeated-trial reliability

驗證版本與日期: 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

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.

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.

02 120 分鐘

基於 Action/Observation 軌跡的失敗歸因分類法

獨立掌握檢查(無 AI 輔助)

前置要求

Day 83 Activity 1 的混雜登記表。

學習目標

用已記錄的 action/observation 軌跡把每個失敗歸因到可觀察原因類——絕不靠對隱藏推理的猜測——並把每個上線任務映射到其確定性對照的期望契約。

操作指引

1. 定義分類類目:工具 schema 違規、未註冊工具呼叫、資源缺失、權限拒絕、重試/步數預算耗盡、過早終止、不誠實終止。
2. 對六個上線任務逐一寫下 deterministic_analog 的期望值與觀察到的軌跡欄位(status、steps、retries、termination_reason)。
3. 把每個失敗恰好歸因到一個主類,並附上能證明該歸因的軌跡證據指標。
4. 歸因模糊的標「未決(unresolved)」,不要硬貼標籤;未決項轉為下次協議修訂的問題清單。
5. 輸出 failure_taxonomy.json:逐任務類目、證據指標與歧義標記。

自主實作與記錄

編寫 failure_taxonomy.json,將每個契約任務的結果歸因到一個分類類目,附軌跡證據指標;證據不足時誠實標註 unresolved。

獨立掌握標準

按可觀察軌跡證據分類失敗,證據不足的案例誠實地保持未決。

權威來源資源與權利證明

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 | 原始出處連結 ↗

對應章節 / 時間戳: N/A

驗證版本與日期: 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 MIT

OpenAI Evals: Framework for Evaluating LLMs and Contamination Checks

作者 / 機構: OpenAI Research | 原始出處連結 ↗

對應章節 / 時間戳: N/A

驗證版本與日期: 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.

03 120 分鐘

成本、重試與延遲核算及工具行為稽核

Agent 輔助工程檢查

前置要求

Day 83 Activity 2 的失敗分類法。

學習目標

測量逐任務成本面——步數、重試、執行時間、可用時的 token 數、僅授權時的費用——並獨立於任務結果稽核工具呼叫正確性。

操作指引

1. 建立成本台帳,欄位:task_id、status、steps、retries、elapsed_s、tokens_in、tokens_out、cost_usd、termination_reason。
2. 確定性數值取自治具執行;因無授權上線呼叫,token 與費用欄位記 null。
3. 斷言每個任務都遵守已宣告的步數與重試上限;即使任務成功,任何無界重試迴圈也記為預算失敗。
4. 單獨稽核工具行為:核驗每個已記錄 action 名都在 allowed_tools 中、每個 arguments 酬載都是 JSON 物件;該結果獨立於 outcome_passed 報告。
5. 說明為什麼「工具正確、任務失敗」與「工具違規、僥倖通過」都必須出現在誠實的報告裡。

自主實作與記錄

產出 cost_ledger.csv 與一行工具稽核結論,對每個已記錄任務區分任務結果與工具正確性。

獨立掌握標準

把成本與工具行為當作一等指標核算,與裸任務成功率分離。

權威來源資源與權利證明

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.

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.

04 120 分鐘

評估:附不確定性揭露的資料解讀備忘

獨立掌握檢查(無 AI 輔助)

前置要求

Day 83 Activities 1-3。

學習目標

交付解讀備忘:報告確定性基準、混雜登記表、分類計數與顯式不確定性——不做絕對工具排名,不在無受控消融的情況下做 Harness 對模型的歸因。

操作指引

1. 撰寫 memo.md,章節:已測證據、混雜變數、失敗分類計數、成本核算、宣告的不主張事項。
2. 精確報告 Day 82 重算的確定性基準指標;上線結果描述為待授權不可得。
3. 陳述不確定性論證:n 小、區間寬、一次翻轉顯著改變比率——因此報計數而非排名。
4. 列出宣告的不主張事項:無「工具 X 勝過工具 Y」、無受控消融不做「Harness 導致失敗」歸因、不以自報聲稱成功。
5. 備忘中每個數字都要附產物路徑。

自主實作與記錄

提交 memo.md:包含重算的基準指標、混雜登記表、分類計數、一段不確定性論述,以及至少三條顯式不主張事項。

獨立掌握標準

獨立撰寫解讀備忘,其主張嚴格限定在已測證據之內。

權威來源資源與權利證明

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 | 原始出處連結 ↗

對應章節 / 時間戳: N/A

驗證版本與日期: 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.