85 / 90

第 85 天:綜合專案章程 —— 問題、範圍與模型選型

將先前已驗證的專案整合為一個有邊界的綜合專案:定義問題與使用者,凍結驗收契約,並基於真實證據論證模型選擇。

AI Agent 與工程實踐 480 分鐘有效學習時間(8 小時)
01 120 分鐘

綜合專案章程:問題、使用者與有界範圍

Agent 輔助工程檢查

前置要求

第 82-84 天的科學化 Agent 評測;projects/agent_learning 中的有界 Agent 學習專案及其四語言指南。

學習目標

撰寫一頁綜合專案章程,把具體問題、具名使用者、明確的範圍邊界與非目標綁定在一起,重用先前已驗證的有界 Agent,而不是在綜合專案內部偷藏一個新的無界系統。

操作指引

1. 重讀 projects/agent_learning/README.md 與 agent.py,列出已註冊的有界工具(list_notes、read_note、write_report)與 fixture 任務 summarize-notes。
2. 撰寫問題陳述:綜合專案在已驗證的「筆記到報告」Agent 基礎上,恰好新增一個有界工具(例如 count_words 或 list_deadlines)與一個額外的固定任務,仍由既有的獨立評分器評分。
3. 具名使用者(把學習筆記整理成報告的學習者)與使用情境(本機、離線優先的一次性 fixture 工作區)。
4. 劃出範圍界線。範圍內:確定性適配器、已註冊的有界工具、固定 fixture、步數/重試預算。範圍外:開放網頁瀏覽、任意 shell 執行、無界重試、生產環境自主運作。
5. 宣告非目標:在工單 23 授權門核准之前不作任何真機模型聲明;不新建 Agent 框架;不做隱藏的網路呼叫。
6. 將草案儲存為 capstone_charter.md。

自主實作與記錄

起草包含 Problem、User、In-Scope、Out-of-Scope、Non-Goals 各節的 capstone_charter.md,然後把三個功能請求分類為範圍內或範圍外:(a)「讀取 fixture 中的第三個筆記」;(b)「允許 Agent 任意 pip-install 任何套件」;(c)「新增一個有界的字數統計工具」。

獨立掌握標準

產出的章程中每個範圍內事項都能對映到已宣告的約束,且非目標明確排除至少三項能力(如網頁瀏覽、任意程式碼執行、無界重試)。

權威來源資源與權利證明

linking Open Access / CC BY 4.0

ReAct: Synergizing Reasoning and Acting in Language Models

作者 / 機構: Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao | 原始出處連結 ↗

對應章節 / 時間戳: Sections 2-4: interleaved reasoning/action protocol; Figure 1 trace format

驗證版本與日期: ICLR 2023 / arXiv:2210.03629v3 (Verified: 2026-10-30)

入選理由:

Primary literature for interleaving explicit reasoning steps with bounded tool actions; anchors the capstone's requirement that every step produces an inspectable observation inside a budgeted loop.

來源前置條件:

Language-model prompting, tool-call loops, and basic action/observation traces.

安全回退方案(離線彈性):

The curriculum restates the action/observation loop and reimplements a deterministic three-tool agent locally; no paper text is imported.

對比候選資源與選型分析 (2)

Pure reasoning traces without tool actions; ReAct adds the observable action/observation protocol that the capstone harness enforces.

Embodied closed-loop planning for robotics; ReAct's text-domain tool protocol maps directly onto the capstone's bounded tools.

linking arXiv non-exclusive license / Open Access

Model Cards for Model Reporting

作者 / 機構: Margaret Mitchell, Simone Wu, Andrew Zaldivar, Parker Barnes, Lucy Vasserman, Ben Hutchinson, Elena Spitzer, Inioluwa Deborah Raji, Timnit Gebru | 原始出處連結 ↗

對應章節 / 時間戳: Section 4 Model Card Sections (4.1-4.9)

驗證版本與日期: FAT* 2019 / arXiv:1810.03993v3 (Verified: 2026-10-30)

入選理由:

Standard framework for disclosing a model's intended use, evaluation conditions, and limitations; supplies the capstone's model-choice and provenance documentation pattern.

來源前置條件:

Basic model evaluation vocabulary: dataset, metric, intended use.

安全回退方案(離線彈性):

The curriculum provides a local model-decision table template covering intended use, evaluation data, and caveats.

對比候選資源與選型分析 (2)
Gebru et al.: Datasheets for Datasets ↗ compared_alternative [Open Access]

Dataset-side documentation rather than model-side; used alongside Model Cards in the provenance table rather than as a replacement.

OpenAI GPT-4 System Card ↗ compared_alternative [All Rights Reserved (web publication)]

Vendor-specific safety disclosure; Model Cards provide the general reusable schema.

02 120 分鐘

驗收契約:固定任務、基準與上限

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

前置要求

第 85 天活動 1 的章程草案;projects/agent_learning/evidence/live_eval_contract.json 中的工單 23 契約模式。

學習目標

把章程轉化為可度量的驗收契約:固定任務集、確定性基準及其報告雜湊、指標定義、資源上限、失敗案例,以及評審者將檢查的確切提交證據。

操作指引

1. 仿照 projects/agent_learning/evidence/live_eval_contract.json 的模式建立 capstone_acceptance.json。
2. 綁定任務集:保留六個 live-eval 任務類別(成功、兩個畸形工具請求、輸入缺失、迴圈、預算耗盡),並加入章程中的一個新固定任務;在任何調校之前凍結。
3. 記錄基準:適配器 deterministic-v1,fixture summarize-notes,expected_report_sha256 = 9e8315034af750009a4b2cfb261a077428afe441bc45c602cb7ead32ac0fd787,以及基準指令 python -m projects.agent_learning.cli evaluate --fixture summarize-notes --output 。
4. 定義每個任務的指標:status、steps、retries、終止原因、報告雜湊一致性,對齊契約評分器的四個維度(結果、工具行為、預算、失敗處理)。
5. 設定資源上限:每任務最多 6 步、每故障最多 2 次重試、30 分鐘執行時間上限、任何已授權真機執行 5.00 美元費用上限,以及從契約複製的停止條件。
6. 列出提交證據:章程、本契約、基準台帳、逐任務結果、失敗日誌、出處表。

自主實作與記錄

撰寫包含全部九個必需元素(problem、user、scope、model_choice、baseline、evaluation_set、failure_cases、resource_limits、submission_evidence)的 capstone_acceptance.json,真機執行欄位明確設為 null 並標註 not-run-awaiting-authorization。

獨立掌握標準

產出一份契約,使評審者在任何執行之前即可預判每個任務的通過/失敗;真機執行欄位保持 null 並帶 not-run-awaiting-authorization 標註。

權威來源資源與權利證明

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.03688v4 (Verified: 2026-10-30)

入選理由:

Systematic multi-environment agent benchmark; supplies the capstone's fixed-task-set discipline and per-task scoring decomposition used by the acceptance contract.

來源前置條件:

Agent loops, tool use, and benchmark design fundamentals.

安全回退方案(離線彈性):

The capstone task set is fixed locally in the acceptance contract and does not require downloading the benchmark.

對比候選資源與選型分析 (2)

Deep single-domain web tasks with hosted infrastructure; AgentBench's multi-environment view better fits a general agent evaluation.

Assistant-level real-world questions; also cited by the capstone for outcome-level task design.

linking arXiv non-exclusive license / Open Access

GAIA: a benchmark for General AI Assistants

作者 / 機構: Gregoire Mialon, Clementine Fourrier, Craig Swift, Thomas Wolf, Yann LeCun, Thomas Scialom | 原始出處連結 ↗

對應章節 / 時間戳: Sections 3-4: level design, tooling requirements, human vs agent gap

驗證版本與日期: arXiv:2311.12983v3 (Verified: 2026-10-30)

入選理由:

Defines graded assistant tasks with unambiguous factual scoring; motivates the capstone's distinction between success tasks, malformed-request handling, and failure cases.

來源前置條件:

Agent capabilities, tool use, and evaluation metrics.

安全回退方案(離線彈性):

The capstone evaluation tasks are defined in the local acceptance contract and need no external download.

對比候選資源與選型分析 (2)
Liu et al.: AgentBench: Evaluating LLMs as Agents ↗ compared_alternative [Open Access / CC BY 4.0]

Multi-environment execution benchmark; GAIA adds graded real-world assistance tasks, and both inform the fixed task taxonomy.

Zhou et al.: WebArena ↗ compared_alternative [Open Access]

Web-only task environment; GAIA covers general assistant capability beyond browsing.

03 120 分鐘

模型選型:自訓適配器 vs 現有模型

Agent 輔助工程檢查

前置要求

第 85 天活動 1-2;工單 19 的證據包與工單 21 的 LoRA 對比契約。

學習目標

透過檢視雲端預訓練證據包與 LoRA 對比契約,決定驅動綜合專案 Agent 的模型;當合適的現有模型對最終 Agent 表現更好時,允許選用現有模型。

操作指引

1. 開啟 curriculum/projects/docs/pretrain-cloud-evidence/evidence-package.json:注意 4 層/4 頭/64 維嵌入的 GPT 配方、tinyshakespeare 資料出處與 SHA-256,以及 run_status=blocked——預訓練工作教會的是資料到檢查點的完整迴路,並不產出可用模型。
2. 開啟 projects/lora/evidence/comparison_contract.json:注意 base_model openai-community/gpt2,LoRA r=8 alpha=16 作用於 q_proj/v_proj,seed 42,劃分 0.8/0.1/0.1,status=blocked-awaiting-authorization,以及只預先宣告方向的成功標準。
3. 閱讀 projects/agent_learning/evidence/model_selection_plan.md:一個推薦的本機開放權重候選,加三個供應商 API 備選,各自記錄版本、接入、資料用途與費用條件。
4. 建立決策表。候選:(a) 預訓練配方自訓 GPT;(b) LoRA 適配的 gpt2;(c) 推薦的現有開放模型。按已觀測證據(而非願望)給每個候選評分:確定性基準一致性、授權條款/再散布權、固定修訂、費用上限。
5. 如實記錄決策:deterministic-v1 適配器仍是離線評測基準;對於任何已授權的真機執行,推薦的開放權重模型是可接受的,因為自訓產物尚未被證明——預訓練與 LoRA 的結果指導設計,但不強制採用。
6. 將分析儲存為 model_decision.md,每個候選一列授權條款記錄。

自主實作與記錄

產出 model_decision.md:一張三列候選表(證據檔案、授權條款、結論),加一段說明,指名所選的真機執行候選,並解釋為何自訓方案指導了設計卻不驅動最終 Agent。

獨立掌握標準

以對全部三個證據產物的引用、每個候選的授權條款核查、以及零虛構量測,論證模型選擇。

權威來源資源與權利證明

linking arXiv non-exclusive license / Open Access

Datasheets for Datasets

作者 / 機構: Timnit Gebru, Jamie Morgenstern, Briana Vecchione, Jennifer Wortman Vaughan, Hanna Wallach, Hal Daumé III, Kate Crawford | 原始出處連結 ↗

對應章節 / 時間戳: Section 3 Questions and Workflow (3.1 Motivation through 3.7 Maintenance)

驗證版本與日期: Communications of the ACM 64(12) / arXiv:1803.09010v8 (Verified: 2026-10-30)

入選理由:

Standard questionnaire for documenting dataset origin, composition, rights, and maintenance; structures the capstone evidence package's data-provenance table.

來源前置條件:

Dataset provenance, splits, and licensing vocabulary.

安全回退方案(離線彈性):

The provenance table template in the capstone instructions restates the required disclosure fields locally.

對比候選資源與選型分析 (2)
Mitchell et al.: Model Cards for Model Reporting ↗ compared_alternative [Open Access]

Model-side reporting rather than dataset-side; the capstone provenance table cites both.

Bender & Friedman: Data Statements for Natural Language Processing ↗ compared_alternative [CC BY 4.0 (ACL Anthology, 2016 or later)]

NLP-specific demographic disclosure; Datasheets cover the general lifecycle needed for arbitrary capstone data.

linking arXiv non-exclusive license / Open Access

Model Cards for Model Reporting

作者 / 機構: Margaret Mitchell, Simone Wu, Andrew Zaldivar, Parker Barnes, Lucy Vasserman, Ben Hutchinson, Elena Spitzer, Inioluwa Deborah Raji, Timnit Gebru | 原始出處連結 ↗

對應章節 / 時間戳: Section 4 Model Card Sections (4.1-4.9)

驗證版本與日期: FAT* 2019 / arXiv:1810.03993v3 (Verified: 2026-10-30)

入選理由:

Standard framework for disclosing a model's intended use, evaluation conditions, and limitations; supplies the capstone's model-choice and provenance documentation pattern.

來源前置條件:

Basic model evaluation vocabulary: dataset, metric, intended use.

安全回退方案(離線彈性):

The curriculum provides a local model-decision table template covering intended use, evaluation data, and caveats.

對比候選資源與選型分析 (2)
Gebru et al.: Datasheets for Datasets ↗ compared_alternative [Open Access]

Dataset-side documentation rather than model-side; used alongside Model Cards in the provenance table rather than as a replacement.

OpenAI GPT-4 System Card ↗ compared_alternative [All Rights Reserved (web publication)]

Vendor-specific safety disclosure; Model Cards provide the general reusable schema.

04 120 分鐘

考核:章程評審門與範圍凍結

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

前置要求

第 85 天活動 1-3。

學習目標

對照固定的九元素清單,對章程與驗收契約執行結構化 go/no-go 評審,凍結範圍,並為任何未達標元素撰寫恢復計畫。

操作指引

1. 準備九元素清單:具體問題、具名使用者、範圍邊界、模型選擇、基準、評測集、失敗案例、資源上限、提交證據。
2. 逐元素為章程與契約評分;每個元素標為 PRESENT 或 MISSING,並附一列指向其定義位置的指標。
3. 若全部元素齊備,凍結範圍:記錄 scope_frozen=true 與凍結日期;此後的功能請求必須走複審。
4. 若有元素缺失,寫出 NO-GO 判定,指明缺失元素及修復它的具體活動(act-01、act-02 或 act-03)。
5. 對一個範圍蔓延請求(「加聊天介面」)做試跑,展示它無法通過範圍界線。
6. 將簽署的評審儲存為 charter_review.json。

自主實作與記錄

產出 charter_review.json:九條帶證據指標的清單判定、最終 GO 或 NO-GO,以及——無論判定如何——對「加聊天介面」的範圍蔓延裁定。

獨立掌握標準

完成一次評審門:每條判定都引用已存證據,範圍凍結或 NO-GO 決定明確且可重現。

權威來源資源與權利證明

linking Open Access / CC BY 4.0

ReAct: Synergizing Reasoning and Acting in Language Models

作者 / 機構: Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao | 原始出處連結 ↗

對應章節 / 時間戳: Sections 2-4: interleaved reasoning/action protocol; Figure 1 trace format

驗證版本與日期: ICLR 2023 / arXiv:2210.03629v3 (Verified: 2026-10-30)

入選理由:

Primary literature for interleaving explicit reasoning steps with bounded tool actions; anchors the capstone's requirement that every step produces an inspectable observation inside a budgeted loop.

來源前置條件:

Language-model prompting, tool-call loops, and basic action/observation traces.

安全回退方案(離線彈性):

The curriculum restates the action/observation loop and reimplements a deterministic three-tool agent locally; no paper text is imported.

對比候選資源與選型分析 (2)

Pure reasoning traces without tool actions; ReAct adds the observable action/observation protocol that the capstone harness enforces.

Embodied closed-loop planning for robotics; ReAct's text-domain tool protocol maps directly onto the capstone's bounded tools.

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.03688v4 (Verified: 2026-10-30)

入選理由:

Systematic multi-environment agent benchmark; supplies the capstone's fixed-task-set discipline and per-task scoring decomposition used by the acceptance contract.

來源前置條件:

Agent loops, tool use, and benchmark design fundamentals.

安全回退方案(離線彈性):

The capstone task set is fixed locally in the acceptance contract and does not require downloading the benchmark.

對比候選資源與選型分析 (2)

Deep single-domain web tasks with hosted infrastructure; AgentBench's multi-environment view better fits a general agent evaluation.

Assistant-level real-world questions; also cited by the capstone for outcome-level task design.