内容
<p align="center">
<img src="assets/banner.svg" alt="AI Engineering from Scratch — 参考手册横幅" width="100%">
</p>
> Fork 自 [rohitg00/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch)。
<p align="center">
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-1a1a1a?style=flat-square&labelColor=fafaf5" alt="MIT License"></a>
<a href="ROADMAP.md"><img src="https://img.shields.io/badge/lessons-523-3553ff?style=flat-square&labelColor=fafaf5" alt="523 节课"></a>
<a href="#contents"><img src="https://img.shields.io/badge/phases-20-3553ff?style=flat-square&labelColor=fafaf5" alt="20 个 Phase"></a>
<a href="https://github.com/cluster1900/ai-engineering-from-scratch-zh/stargazers"><img src="https://img.shields.io/github/stars/cluster1900/ai-engineering-from-scratch-zh?style=flat-square&labelColor=fafaf5&color=3553ff" alt="GitHub stars"></a>
<a href="https://ai-learn.agent-buy.com"><img src="https://img.shields.io/badge/web-ai--learn.agent--buy.com-3553ff?style=flat-square&labelColor=fafaf5" alt="网站"></a>
</p>
### Sponsors
<p align="center">
<a href="https://serpapi.com/ai-engineering-from-scratch"><picture><source media="(min-width: 768px)" srcset="assets/sponsors/serpapi-banner-compact.png" width="48%"><img src="assets/sponsors/serpapi-banner-compact.png" alt="SerpApi. Web Search API for your AI apps. Available in Markdown and JSON for any integration." width="440"></picture></a>
<a href="https://nitrostack.ai/referral/aiengineeringfromscratch"><picture><source media="(min-width: 768px)" srcset="assets/sponsors/nitrostack-banner-equal.png" width="48%"><img src="assets/sponsors/nitrostack-banner-equal.png" alt="NitroStack. Build and deploy your MCP app in 10 minutes. Get your product into ChatGPT and Claude marketplaces with free cloud deployment." width="440"></picture></a>
</p>
<p align="center">
<sub><span>Your support keeps every lesson free and open source.</span> <a href="#supporters">See all supporters</a> · <a href="SPONSORS.md">Become a sponsor</a></sub>
</p>
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
> **84% 的学生已经在使用 AI 工具。只有 18% 认为自己已准备好以
> 专业方式使用它们。** 这套课程正是为了弥合这道差距。
>
> 523 lessons. 20 phases. (523 节课。20 个 Phase。约 342 小时。) Python、TypeScript、Rust、Julia。每节课都会产出
> 一个可复用 artifact:prompt、skill、agent、MCP server。免费、开源、MIT。
>
> 你不只是学习 AI。你会亲手构建它。端到端。从零开始。
<!-- STATS:START (generated from site/stats.json by build.js — do not edit by hand) -->
<p align="center"><sub><b>150,639</b> readers · <b>241,669</b> page views in the last 30 days · as of 2026-06-07</sub></p>
<!-- STATS:END -->
## 从这里开始:选择你想构建的内容
在开始之前,你不必通读全部 523 节课。选定一个目标即可。每个链接均可在 GitHub 或官方网站上打开同一套课程,两个版本采用完全一致的教学代码。
| 你的目标 | 在 GitHub 上学习 | 在网站上学习 |
|---|---|---|
| 我是新手,想要完整的 AI 工程基础 | [Phase 0: 环境准备与工具链](phases/00-setup-and-tooling/) | [开发环境配置](https://ai-learn.agent-buy.com/lesson.html?path=phases/00-setup-and-tooling/01-dev-environment) |
| 我懂 Python,想要数学与机器学习基础 | [Phase 1: 数学基础](phases/01-math-foundations/) | [线性代数直觉](https://ai-learn.agent-buy.com/lesson.html?path=phases/01-math-foundations/01-linear-algebra-intuition) |
| 我想构建生产级大模型应用 | [Phase 11: LLM 工程化](phases/11-llm-engineering/) | [Prompt 工程](https://ai-learn.agent-buy.com/lesson.html?path=phases/11-llm-engineering/01-prompt-engineering) |
| 我想构建 AI Agent | [Phase 14: Agent 工程](phases/14-agent-engineering/) | [Agent 循环](https://ai-learn.agent-buy.com/lesson.html?path=phases/14-agent-engineering/01-the-agent-loop) |
| 我想在真实代码库中使用编程 Agent | [编程 Agent 辅助工程路径](learning-paths/using-coding-agents.json) | [Agent 辅助工程](https://ai-learn.agent-buy.com/lesson.html?path=phases/14-agent-engineering/31-agent-workbench-why-models-fail&learningPath=using-coding-agents) |
| 我想在编码前确立正确的产品决策与需求框架 | [产品判断力与交付路径](learning-paths/shaping-the-build.json) | [产品判断力与交付](https://ai-learn.agent-buy.com/lesson.html?path=phases/14-agent-engineering/47-outcomes-before-output&learningPath=shaping-the-build) |
| 我想基于 Model Context Protocol (MCP) 进行构建 | [MCP 路线](phases/13-tools-and-protocols/README.md#model-context-protocol-mcp-path) | [Model Context Protocol (MCP) 路径](https://ai-learn.agent-buy.com/lesson.html?path=phases/13-tools-and-protocols/06-mcp-fundamentals&learningPath=model-context-protocol) |
| 我想编写并发布 Agent Skills | [Agent Skills 专修路线](phases/13-tools-and-protocols/README.md#agent-skills-fast-path) | [Agent Skills 路径](https://ai-learn.agent-buy.com/lesson.html?path=phases/13-tools-and-protocols/22-skills-and-agent-sdks&learningPath=agent-skills) |
| 我想备考 Claude 官方认证 | [认证上手指南](certifications/claude/GETTING_STARTED.md) | [认证学院](https://ai-learn.agent-buy.com/certifications.html) |
| 我想备考 MCP Associate (MCPA) 认证 | [MCPA 上手指南](certifications/mcpa/GETTING_STARTED.md) | [MCPA 认证路线](https://ai-learn.agent-buy.com/certification.html?id=mcpa-f) |
不确定自己适合从哪里开始?使用 [`start-learning` 水平评估导师](skills/start-learning/SKILL.md) 或参考 [网站先修指南](https://ai-learn.agent-buy.com/prereqs.html)。
在 [AI 工程学习路径](https://ai-learn.agent-buy.com/learning-paths.html) 中对比四个核心领域和六条职业方向。
### Use every lesson the same way · 用同样的方法学习每节课
1. **阅读** `docs/en.md`,并用你自己的话解释核心概念。
2. **动手敲代码并构建** 核心逻辑,不要把代码块当作装饰。
3. 从包含 `README.md` 和 `phases/` 的仓库根目录 **运行** 课程命令。
4. **保留证据**:命令、工作目录、退出码、有意义的输出,以及你修改或生成的 artifact。
5. 只有当你能解释输出、并且不靠猜测就能进行一处小修改时,才 **继续下一课**。
### 克隆仓库并生成你的第一个证据
```bash
git clone https://github.com/cluster1900/ai-engineering-from-scratch-zh.git
cd ai-engineering-from-scratch-zh
python3 phases/00-setup-and-tooling/01-dev-environment/code/verify.py --route beginner
python3 phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py
```
## 30 秒添加 AI 导师
如果已安装 Node.js、`npx` 和支持 skill 的编程 agent,只需两条命令即可让你的 coding agent 成为个人导师。无需克隆仓库即可安装或阅读导师指令。运行专项实验需安装 `python3`。
检查本地环境:
```bash
node --version
npx --version
python3 --version
```
安装课程 skills:
```bash
npx skills add cluster1900/ai-engineering-from-scratch-zh
```
各宿主调用语法:
| 宿主 | 开始课程 | 开启 Model Context Protocol (MCP) | 开启 Agent Skills | 运行阶段测验 |
|---|---|---|---|---|
| Codex | `start-learning` 或从 `/skills` 中选择 | `learn-mcp` 或从 `/skills` 中选择 | `learn-agent-skills` 或从 `/skills` 中选择 | `check-understanding 13` 或从 `/skills` 中选择 |
| Claude Code | `/start-learning` | `/learn-mcp` | `/learn-agent-skills` | `/check-understanding 13` |
| 其他兼容宿主 | `使用 start-learning 开始课程。` | `使用 learn-mcp 开启 Model Context Protocol (MCP) 路径。` | `使用 learn-agent-skills 开启 Agent Skills Engineering 路径。` | `使用 check-understanding 测验我的 Phase 13 掌握情况。` |
十道题的水平定位测验会将你现有的知识映射到一个起始阶段,并将个性化学习计划保存至 `LEARNING.md`。之后,`learn` skill 会在每次会话中传授一课:概念、数学、代码、测验。它直接从本仓库流式获取课程内容,遇到卡壳时,`course-guide` skill 能精确跳转到讲解该知识点的课程。
如果只想学习 Model Context Protocol (MCP),调用对应宿主的 MCP 指令。它会创建 `MCP-LEARNING.md` 并沿着 17 节课的路线,深入无状态请求、传输层、双向工作、安全性、可靠性、注册表治理以及一致性证据。具体顺序见 [Model Context Protocol (MCP) 清单](learning-paths/model-context-protocol.json)。
如果只想学习 Agent Skills,调用对应宿主的 Agent Skills 指令。它会创建 `AGENT-SKILLS-LEARNING.md` 并执行连贯的 5 课路线:契约规范、发现机制、调用路由、沙箱边界,以及发布评估与真机可移植性。在 Web 端从 [Agent Skills 路径](https://ai-learn.agent-buy.com/lesson.html?path=phases/13-tools-and-protocols/22-skills-and-agent-sdks&learningPath=agent-skills) 开始。
## 运作方式
大多数 AI 资料都是零散教学。这里一篇 paper,那里一篇 fine-tuning 文章,
别处又有一个炫目的 agent demo。这些碎片很少能真正串起来。你能交付一个 chatbot,却无法
解释它的 loss curve。你把一个 function 接到 agent 上,却说不清在调用它的 model 内部,
attention 究竟在做什么。
这套课程是主干。20 个 Phase,523 节课,四门语言:Python、TypeScript、
Rust、Julia。一端是 linear algebra,另一端是 autonomous swarms。每个 algorithm
都会先从原始数学手写构建。Backprop、Tokenizer、Attention、Agent loop。等到
PyTorch 出场时,你已经知道它在底层做什么。
每节课都遵循同一个循环:阅读问题,推导数学,编写代码,运行测试,保留 artifact。
没有五分钟视频,没有复制粘贴式部署,也没有手把手托管。免费、开源,并且可以在你自己的笔记本电脑上运行。
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
## 课程结构
二十个 Phase 层层递进。Math 是地基。Agents 和 production 是屋顶。
如果你已经掌握底层内容,可以向后跳,但不要跳过之后又疑惑为什么顶层的东西会出问题。
```mermaid
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#fafaf5','primaryTextColor':'#1a1a1a','primaryBorderColor':'#3553ff','lineColor':'#3553ff','fontFamily':'JetBrains Mono','fontSize':'12px'}}}%%
flowchart TB
P0["Phase 0 — Setup & Tooling"] --> P1["Phase 1 — Math Foundations"]
P1 --> P2["Phase 2 — ML Fundamentals"]
P2 --> P3["Phase 3 — Deep Learning Core"]
P3 --> P4["Phase 4 — Vision"]
P3 --> P5["Phase 5 — NLP"]
P3 --> P6["Phase 6 — Speech & Audio"]
P3 --> P9["Phase 9 — RL"]
P5 --> P7["Phase 7 — Transformers"]
P7 --> P8["Phase 8 — GenAI"]
P7 --> P10["Phase 10 — LLMs from Scratch"]
P10 --> P11["Phase 11 — LLM Engineering"]
P10 --> P12["Phase 12 — Multimodal"]
P11 --> P13["Phase 13 — Tools & Protocols"]
P13 --> P14["Phase 14 — Agent Engineering"]
P14 --> P15["Phase 15 — Autonomous Systems"]
P15 --> P16["Phase 16 — Multi-Agent & Swarms"]
P14 --> P17["Phase 17 — Infrastructure & Production"]
P15 --> P18["Phase 18 — Ethics & Alignment"]
P16 --> P19["Phase 19 — Capstone Projects"]
P17 --> P19
P18 --> P19
```
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
## 一节课的结构
每节课都位于自己的文件夹中,整个课程保持相同结构:
```text
phases/<NN>-<phase-name>/<NN>-<lesson-name>/
├── code/ 可运行实现代码 (Python, TypeScript, Rust, Julia)
├── docs/
│ └── en.md 课程讲解文档
└── outputs/ 本课交付的提示词、技能、智能体或 MCP 服务器
```
每节课遵循六个节拍。*Build It / Use It* 的拆分是主干 —— 你先从零实现
algorithm,然后再用 production library 运行同一件事。你能理解 framework
在做什么,因为你已经亲手写过一个更小的版本。
```mermaid
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#fafaf5','primaryTextColor':'#1a1a1a','primaryBorderColor':'#3553ff','lineColor':'#3553ff','fontFamily':'JetBrains Mono','fontSize':'13px'}}}%%
flowchart LR
M["MOTTO<br/><sub>one-line core idea</sub>"] --> Pr["PROBLEM<br/><sub>concrete pain</sub>"]
Pr --> C["CONCEPT<br/><sub>diagrams & intuition</sub>"]
C --> B["BUILD IT<br/><sub>raw math, no frameworks</sub>"]
B --> U["USE IT<br/><sub>same thing in PyTorch / sklearn</sub>"]
U --> S["SHIP IT<br/><sub>prompt · skill · agent · MCP</sub>"]
```
## 开始学习
三种入口。选择一种。
**选项 A — 在终端中学习 *(推荐)*。** 在完成上述 Node.js、`npx`、宿主环境与作用域前置检查后,将学习 skills 安装到兼容的 agent 中,让课程自主推进教学:
```bash
npx skills add cluster1900/ai-engineering-from-scratch-zh
```
参考上方的宿主调用语法表。安装的 skills 提供了 `start-learning`、`learn`、`course-guide`,以及聚焦的 `learn-mcp` 和 `learn-agent-skills` 路线。课程讲解可以直接从本仓库在线流式获取,无需提前克隆。复制仓库中的代码命令或运行可执行的 MCP 与 Agent Skills 实验则需要本地克隆。进度会自动保存在项目中的 `LEARNING.md`、`MCP-LEARNING.md` 或 `AGENT-SKILLS-LEARNING.md`,方便随时恢复会话。
**选项 B — 在线阅读。** 打开 [ai-learn.agent-buy.com](https://ai-learn.agent-buy.com) 上任意已完成的课程,或在 [目录](#contents) 下展开一个 Phase。无需配置环境,无需克隆代码。
**选项 C — 克隆并运行。**
```bash
git clone https://github.com/cluster1900/ai-engineering-from-scratch-zh.git
cd ai-engineering-from-scratch-zh
python3 phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py
```
克隆本仓库还会在 Claude Code 中自动加载学习 skills,并将每节课的代码提供给 `learn` 导师进行真实执行,而不仅是静态导读。
### 前置要求
- 你会写代码(任何语言均可;会 Python 更有帮助)。
- 你想搞懂 AI **究竟如何工作**,而不只是调用外部 API。
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
### 备考 Claude 官方认证
[Claude 认证学院](certifications/claude/README.md) 是面向全部四项官方 Claude 认证方向(Associate Foundations、Developer Foundations、Architect Foundations、Architect Professional)的免费开源备考项目。每条路线均整合了对应考试大纲的课程、可运行实验、诊断测试、毕业设计以及完整全真模拟试卷。
配合 Claude Code、Codex、ChatGPT、Cursor 或其他 agent 使用 [AI 原生 GitHub 入门指南](certifications/claude/GETTING_STARTED.md)。在 Codex 中运行 `claude-certification`,在 Claude Code 中运行 `/claude-certification`,或指示其他宿主使用 `claude-certification`。它会选择认证方向,在 `CLAUDE-CERTIFICATION.md` 中创建持久学习路线,逐课教学,运行真实实验,并提供基于 artifact 的评估反馈。同一套课程也可在 [认证网站](https://ai-learn.agent-buy.com/certifications.html) 在线学习。
本学院为基于公开考试目标的独立学习资料,非 Anthropic 官方附属,不复制真实考题,亦不保证考试通过。
### 备考 MCP Associate (MCPA) 认证
[MCPA 认证课程](certifications/mcpa/README.md) 是面向 Agentic AI Foundation 与 Linux Foundation Training 联合推出的 Model Context Protocol Associate 认证考试的免费开源备考项目。包含 34 节课程,基于 2026-07-28 无状态协议规范,覆盖全部五大考试领域:单次请求 `_meta` 与 `server/discover` 握手替代机制、多轮往返请求、订阅、缓存、Tasks 与 MCP Apps 扩展、OAuth 授权,以及 Registry 和 SDK 分层。每节课都附带可运行的纯标准库实验,并通过 wire shape 校验器验证通信格式;路线还包含诊断测验、毕业设计以及三套完全按照公开大纲权重编排的全真模拟试卷。
配合 Claude Code、Codex、ChatGPT、Cursor 等使用 [AI 原生 GitHub 入门指南](certifications/mcpa/GETTING_STARTED.md)。在 Codex 中运行 `mcpa-certification`,在 Claude Code 中运行 `/mcpa-certification`,或指示其他宿主使用 `mcpa-certification`。它会在 `MCPA-CERTIFICATION.md` 中创建持久路线,循序渐进地教学、运行实验并反馈。课程同时上线于 [MCPA 认证专页](https://ai-learn.agent-buy.com/certification.html?id=mcpa-f)。
本课程为基于公开考试目标的独立学习资料,非 Agentic AI Foundation 或 Linux Foundation 官方附属,不复制真实试题,亦不保证考试通过。
### 学习 Skills 工具清单
| Skill | 功能 |
|---|---|
| [`start-learning`](skills/start-learning/SKILL.md) | 一次性上手引导:明确学习动机、定级测验,并将个性化计划保存至 `LEARNING.md`。 |
| [`learn`](skills/learn/SKILL.md) | 核心导师循环:热身复习、下一课互动教学、课后测验;记录进度与复习队列。 |
| [`course-guide`](skills/course-guide/SKILL.md) | 主题路由导航:“去哪里学 Attention?”或“Loss 出现 NaN 怎么办?” → 给出精准课程与链接。 |
| [`learn-mcp`](skills/learn-mcp/SKILL.md) | MCP 专项导师:创建 `MCP-LEARNING.md`,按 17 课清单推进,记录通信、安全、可靠性与一致性证据。 |
| [`learn-agent-skills`](skills/learn-agent-skills/SKILL.md) | Agent Skills 专项导师:创建 `AGENT-SKILLS-LEARNING.md`,讲授第 22、24、25、26、27 课,并记录真机实测证据。 |
| [`claude-certification`](skills/claude-certification/SKILL.md) | Claude 认证导师:选择 CCAO-F、CCDV-F、CCAR-F 或 CCAR-P;逐课教学;运行实验;批阅 artifacts;组织模拟考试;保存进度。 |
| [`mcpa-certification`](skills/mcpa-certification/SKILL.md) | MCPA 导师:沿着基于 2026-07-28 协议的 34 课 `mcpa-f` 路线教学;运行实验与 wire checker;组织诊断测验与三套模拟考试;记录进度。 |
| [`find-your-level`](skills/find-your-level/SKILL.md) | 10 道题的定级测验:将你的背景知识映射到起始阶段,并生成附带预估时长的个性化路线。 |
| [`check-understanding <phase>`](skills/check-understanding/SKILL.md) | 阶段理解检查测验:每阶段 8 道题,附带反馈和建议重点复习的课程。使用上方调用语法表中的 Codex、Claude Code 或自然语言格式调用。 |
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
## 以电子书形式阅读核心课程
`phases/` 下的 20 个核心阶段编纂成了共六卷的电子书系列。EPUB 和 PDF 由 CI 直接基于核心课程源码构建,并附加在每次 [GitHub release](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases) 中;以下链接始终指向最新版本。卷号代表系列中的分册,并非版本号:每份副本均带有日期印章,历史版本可从对应 Release 中下载。
认证课程体系刻意未转录为电子书(intentionally not converted into the books)。它们的 AI 导师状态、可运行实验、动态图表、诊断测试和计时模拟考试在 GitHub 和官方网站上保持第一优先支持。
| 卷号 | 标题 | 包含阶段 | 下载 |
|-----|-------|--------|----------|
| 1 | Foundations · Math, Tooling, and Classical Machine Learning | 00-02 | [EPUB](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol1-foundations.epub) · [PDF](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol1-foundations.pdf) |
| 2 | Deep Learning · Networks, Vision, and Speech | 03, 04, 06 | [EPUB](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol2-deep-learning.epub) · [PDF](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol2-deep-learning.pdf) |
| 3 | Language · NLP Foundations and the Transformer | 05, 07 | [EPUB](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol3-language.epub) · [PDF](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol3-language.pdf) |
| 4 | Large Language Models · Generation, Reinforcement, Pretraining, and Engineering | 08-11 | [EPUB](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol4-llms.epub) · [PDF](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol4-llms.pdf) |
| 5 | Agents · Multimodality, Protocols, Autonomy, and Swarms | 12-16 | [EPUB](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol5-agents.epub) · [PDF](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol5-agents.pdf) |
| 6 | Production · Infrastructure, Safety, and Capstones | 17-19 | [EPUB](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol6-production.epub) · [PDF](https://github.com/cluster1900/ai-engineering-from-scratch-zh/releases/latest/download/aiefs-vol6-production.pdf) |
每本书都是阶段性快照,而本仓库则是持续更新的活版课程。每章结尾都链接回对应课程的动态图表、测验与可运行源码。本地构建请使用 `python3 scripts/build_book.py`(需安装 pandoc),流水线细节见 [book/README.md](book/README.md)。
## 每节课都会交付成果
其他课程通常以 *“恭喜,你学会了 X。”* 结束。这里的每节课都会以一个
你可以安装或粘贴到日常工作流中的 **可复用工具** 结束。
<table>
<tr>
<th align="left" width="25%"><img src="site/assets/figures/001-a-prompts.svg" width="96" height="96" alt="FIG_001.A 提示词"/><br/><sub>FIG_001 · A</sub><br/><b>提示词</b></th>
<th align="left" width="25%"><img src="site/assets/figures/001-b-skills.svg" width="96" height="96" alt="FIG_001.B 技能"/><br/><sub>FIG_001 · B</sub><br/><b>技能</b></th>
<th align="left" width="25%"><img src="site/assets/figures/001-c-agents.svg" width="96" height="96" alt="FIG_001.C 智能体"/><br/><sub>FIG_001 · C</sub><br/><b>智能体</b></th>
<th align="left" width="25%"><img src="site/assets/figures/001-d-mcp-servers.svg" width="96" height="96" alt="FIG_001.D MCP 服务器"/><br/><sub>FIG_001 · D</sub><br/><b>MCP 服务器</b></th>
</tr>
<tr>
<td valign="top">粘贴到任何 AI assistant 中,针对一个狭窄任务获得专家级帮助。</td>
<td valign="top">放入 Claude、Cursor、Codex、OpenClaw、Hermes,或任何读取 <code>SKILL.md</code> 的 agent。</td>
<td valign="top">部署为 autonomous workers —— 你已在 Phase 14 中亲手写过 loop。</td>
<td valign="top">接入任何 MCP-compatible client。在 Phase 13 中端到端构建。</td>
</tr>
</table>
> 用 `python3 scripts/install_skills.py` 一次性安装全部内容。是真工具,不是作业。
> 完成整套课程后,你会拥有一个包含 523 个 artifacts 的作品集,并且真正理解它们,
> 因为它们都是你亲手构建的。
### FIG_002 · 一个完整示例
Phase 14,第 1 课:agent loop。约 120 行纯 Python,无依赖。
<table>
<tr>
<td valign="top" width="50%">
**`code/agent_loop.py`** <sub><i>build it</i></sub>
```python
def run(query, tools):
history = [user(query)]
for step in range(MAX_STEPS):
msg = llm(history)
if msg.tool_calls:
for call in msg.tool_calls:
result = tools[call.name](**call.args)
history.append(tool_result(call.id, result))
continue
return msg.content
raise StepLimitExceeded
```
</td>
<td valign="top" width="50%">
**`outputs/skill-agent-loop.md`** <sub><i>ship it</i></sub>
```markdown
---
name: agent-loop
description: ReAct-style loop for any tool list
phase: 14
lesson: 01
---
Implement a minimal agent loop that...
```
**`outputs/prompt-debug-agent.md`**
```markdown
You are an agent debugger. Given the trace
of an agent run, identify the step where
the agent went wrong and explain why...
```
</td>
</tr>
</table>
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
<a id="contents"></a>
## 目录
二十个 Phase。点击任意 Phase 展开其课程列表。
<a id="phase-0"></a>
### Phase 0: Setup & Tooling `12 lessons`
> 为后续所有内容准备好你的环境。
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Dev Environment](phases/00-setup-and-tooling/01-dev-environment/) | 构建 | Python |
| 02 | [Git & Collaboration](phases/00-setup-and-tooling/02-git-and-collaboration/) | 学习 | — |
| 03 | [GPU Setup & Cloud](phases/00-setup-and-tooling/03-gpu-setup-and-cloud/) | 构建 | Python |
| 04 | [APIs & Keys](phases/00-setup-and-tooling/04-apis-and-keys/) | 构建 | Python |
| 05 | [Jupyter Notebooks](phases/00-setup-and-tooling/05-jupyter-notebooks/) | 构建 | Python |
| 06 | [Python Environments](phases/00-setup-and-tooling/06-python-environments/) | 构建 | Shell |
| 07 | [Docker for AI](phases/00-setup-and-tooling/07-docker-for-ai/) | 构建 | Docker |
| 08 | [Editor Setup](phases/00-setup-and-tooling/08-editor-setup/) | 构建 | — |
| 09 | [Data Management](phases/00-setup-and-tooling/09-data-management/) | 构建 | Python |
| 10 | [Terminal & Shell](phases/00-setup-and-tooling/10-terminal-and-shell/) | 学习 | — |
| 11 | [Linux for AI](phases/00-setup-and-tooling/11-linux-for-ai/) | 学习 | — |
| 12 | [Debugging & Profiling](phases/00-setup-and-tooling/12-debugging-and-profiling/) | 构建 | Python |
<details id="phase-1">
<summary><b>Phase 1 — Math Foundations</b> <code>22 lessons</code> <em>通过代码理解每个 AI algorithm 背后的直觉。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Linear Algebra Intuition](phases/01-math-foundations/01-linear-algebra-intuition/) | 学习 | Python, Julia |
| 02 | [Vectors, Matrices & Operations](phases/01-math-foundations/02-vectors-matrices-operations/) | 构建 | Python, Julia |
| 03 | [Matrix Transformations & Eigenvalues](phases/01-math-foundations/03-matrix-transformations/) | 构建 | Python, Julia |
| 04 | [Calculus for ML: Derivatives & Gradients](phases/01-math-foundations/04-calculus-for-ml/) | 学习 | Python |
| 05 | [Chain Rule & Automatic Differentiation](phases/01-math-foundations/05-chain-rule-and-autodiff/) | 构建 | Python |
| 06 | [Probability & Distributions](phases/01-math-foundations/06-probability-and-distributions/) | 学习 | Python |
| 07 | [Bayes' Theorem & Statistical Thinking](phases/01-math-foundations/07-bayes-theorem/) | 构建 | Python |
| 08 | [Optimization: Gradient Descent Family](phases/01-math-foundations/08-optimization/) | 构建 | Python |
| 09 | [Information Theory: Entropy, KL Divergence](phases/01-math-foundations/09-information-theory/) | 学习 | Python |
| 10 | [Dimensionality Reduction: PCA, t-SNE, UMAP](phases/01-math-foundations/10-dimensionality-reduction/) | 构建 | Python |
| 11 | [Singular Value Decomposition](phases/01-math-foundations/11-singular-value-decomposition/) | 构建 | Python, Julia |
| 12 | [Tensor Operations](phases/01-math-foundations/12-tensor-operations/) | 构建 | Python |
| 13 | [Numerical Stability](phases/01-math-foundations/13-numerical-stability/) | 构建 | Python |
| 14 | [Norms & Distances](phases/01-math-foundations/14-norms-and-distances/) | 构建 | Python |
| 15 | [Statistics for ML](phases/01-math-foundations/15-statistics-for-ml/) | 构建 | Python |
| 16 | [Sampling Methods](phases/01-math-foundations/16-sampling-methods/) | 构建 | Python |
| 17 | [Linear Systems](phases/01-math-foundations/17-linear-systems/) | 构建 | Python |
| 18 | [Convex Optimization](phases/01-math-foundations/18-convex-optimization/) | 构建 | Python |
| 19 | [Complex Numbers for AI](phases/01-math-foundations/19-complex-numbers/) | 学习 | Python |
| 20 | [The Fourier Transform](phases/01-math-foundations/20-fourier-transform/) | 构建 | Python |
| 21 | [Graph Theory for ML](phases/01-math-foundations/21-graph-theory/) | 构建 | Python |
| 22 | [Stochastic Processes](phases/01-math-foundations/22-stochastic-processes/) | 学习 | Python |
</details>
<details id="phase-2">
<summary><b>Phase 2 — ML Fundamentals</b> <code>18 lessons</code> <em>Classical ML —— 仍然是大多数 production AI 的主干。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [What Is Machine Learning](phases/02-ml-fundamentals/01-what-is-machine-learning/) | 学习 | Python |
| 02 | [Linear Regression from Scratch](phases/02-ml-fundamentals/02-linear-regression/) | 构建 | Python |
| 03 | [Logistic Regression & Classification](phases/02-ml-fundamentals/03-logistic-regression/) | 构建 | Python |
| 04 | [Decision Trees & Random Forests](phases/02-ml-fundamentals/04-decision-trees/) | 构建 | Python |
| 05 | [Support Vector Machines](phases/02-ml-fundamentals/05-support-vector-machines/) | 构建 | Python |
| 06 | [KNN & Distance Metrics](phases/02-ml-fundamentals/06-knn-and-distances/) | 构建 | Python |
| 07 | [Unsupervised Learning: K-Means, DBSCAN](phases/02-ml-fundamentals/07-unsupervised-learning/) | 构建 | Python |
| 08 | [Feature Engineering & Selection](phases/02-ml-fundamentals/08-feature-engineering/) | 构建 | Python |
| 09 | [Model Evaluation: Metrics, Cross-Validation](phases/02-ml-fundamentals/09-model-evaluation/) | 构建 | Python |
| 10 | [Bias, Variance & the Learning Curve](phases/02-ml-fundamentals/10-bias-variance/) | 学习 | Python |
| 11 | [Ensemble Methods: Boosting, Bagging, Stacking](phases/02-ml-fundamentals/11-ensemble-methods/) | 构建 | Python |
| 12 | [Hyperparameter Tuning](phases/02-ml-fundamentals/12-hyperparameter-tuning/) | 构建 | Python |
| 13 | [ML Pipelines & Experiment Tracking](phases/02-ml-fundamentals/13-ml-pipelines/) | 构建 | Python |
| 14 | [Naive Bayes](phases/02-ml-fundamentals/14-naive-bayes/) | 构建 | Python |
| 15 | [Time Series Fundamentals](phases/02-ml-fundamentals/15-time-series/) | 构建 | Python |
| 16 | [Anomaly Detection](phases/02-ml-fundamentals/16-anomaly-detection/) | 构建 | Python |
| 17 | [Handling Imbalanced Data](phases/02-ml-fundamentals/17-imbalanced-data/) | 构建 | Python |
| 18 | [Feature Selection](phases/02-ml-fundamentals/18-feature-selection/) | 构建 | Python |
</details>
<details id="phase-3">
<summary><b>Phase 3 — Deep Learning Core</b> <code>13 lessons</code> <em>从 first principles 构建 Neural networks。在你构建一个之前,不使用 frameworks。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [The Perceptron: Where It All Started](phases/03-deep-learning-core/01-the-perceptron/) | 构建 | Python |
| 02 | [Multi-Layer Networks & Forward Pass](phases/03-deep-learning-core/02-multi-layer-networks/) | 构建 | Python |
| 03 | [Backpropagation from Scratch](phases/03-deep-learning-core/03-backpropagation/) | 构建 | Python |
| 04 | [Activation Functions: ReLU, Sigmoid, GELU & Why](phases/03-deep-learning-core/04-activation-functions/) | 构建 | Python |
| 05 | [Loss Functions: MSE, Cross-Entropy, Contrastive](phases/03-deep-learning-core/05-loss-functions/) | 构建 | Python |
| 06 | [Optimizers: SGD, Momentum, Adam, AdamW](phases/03-deep-learning-core/06-optimizers/) | 构建 | Python |
| 07 | [Regularization: Dropout, Weight Decay, BatchNorm](phases/03-deep-learning-core/07-regularization/) | 构建 | Python |
| 08 | [Weight Initialization & Training Stability](phases/03-deep-learning-core/08-weight-initialization/) | 构建 | Python |
| 09 | [Learning Rate Schedules & Warmup](phases/03-deep-learning-core/09-learning-rate-schedules/) | 构建 | Python |
| 10 | [Build Your Own Mini Framework](phases/03-deep-learning-core/10-mini-framework/) | 构建 | Python |
| 11 | [Introduction to PyTorch](phases/03-deep-learning-core/11-intro-to-pytorch/) | 构建 | Python |
| 12 | [Introduction to JAX](phases/03-deep-learning-core/12-intro-to-jax/) | 构建 | Python |
| 13 | [Debugging Neural Networks](phases/03-deep-learning-core/13-debugging-neural-networks/) | 构建 | Python |
</details>
<details id="phase-4">
<summary><b>Phase 4 — Computer Vision</b> <code>28 lessons</code> <em>从 pixels 到理解 —— image、video、3D、VLMs 和 world models。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Image Fundamentals: Pixels, Channels, Color Spaces](phases/04-computer-vision/01-image-fundamentals/) | 学习 | Python |
| 02 | [Convolutions from Scratch](phases/04-computer-vision/02-convolutions-from-scratch/) | 构建 | Python |
| 03 | [CNNs: LeNet to ResNet](phases/04-computer-vision/03-cnns-lenet-to-resnet/) | 构建 | Python |
| 04 | [Image Classification](phases/04-computer-vision/04-image-classification/) | 构建 | Python |
| 05 | [Transfer Learning & Fine-Tuning](phases/04-computer-vision/05-transfer-learning/) | 构建 | Python |
| 06 | [Object Detection — YOLO from Scratch](phases/04-computer-vision/06-object-detection-yolo/) | 构建 | Python |
| 07 | [Semantic Segmentation — U-Net](phases/04-computer-vision/07-semantic-segmentation-unet/) | 构建 | Python |
| 08 | [Instance Segmentation — Mask R-CNN](phases/04-computer-vision/08-instance-segmentation-mask-rcnn/) | 构建 | Python |
| 09 | [Image Generation — GANs](phases/04-computer-vision/09-image-generation-gans/) | 构建 | Python |
| 10 | [Image Generation — Diffusion Models](phases/04-computer-vision/10-image-generation-diffusion/) | 构建 | Python |
| 11 | [Stable Diffusion — Architecture & Fine-Tuning](phases/04-computer-vision/11-stable-diffusion/) | 构建 | Python |
| 12 | [Video Understanding — Temporal Modeling](phases/04-computer-vision/12-video-understanding/) | 构建 | Python |
| 13 | [3D Vision: Point Clouds, NeRFs](phases/04-computer-vision/13-3d-vision-nerf/) | 构建 | Python |
| 14 | [Vision Transformers (ViT)](phases/04-computer-vision/14-vision-transformers/) | 构建 | Python |
| 15 | [Real-Time Vision: Edge Deployment](phases/04-computer-vision/15-real-time-edge/) | 构建 | Python |
| 16 | [Build a Complete Vision Pipeline](phases/04-computer-vision/16-vision-pipeline-capstone/) | 构建 | Python |
| 17 | [Self-Supervised Vision — SimCLR, DINO, MAE](phases/04-computer-vision/17-self-supervised-vision/) | 构建 | Python |
| 18 | [Open-Vocabulary Vision — CLIP](phases/04-computer-vision/18-open-vocab-clip/) | 构建 | Python |
| 19 | [OCR & Document Understanding](phases/04-computer-vision/19-ocr-document-understanding/) | 构建 | Python |
| 20 | [Image Retrieval & Metric Learning](phases/04-computer-vision/20-image-retrieval-metric/) | 构建 | Python |
| 21 | [Keypoint Detection & Pose Estimation](phases/04-computer-vision/21-keypoint-pose/) | 构建 | Python |
| 22 | [3D Gaussian Splatting from Scratch](phases/04-computer-vision/22-3d-gaussian-splatting/) | 构建 | Python |
| 23 | [Diffusion Transformers & Rectified Flow](phases/04-computer-vision/23-diffusion-transformers-rectified-flow/) | 构建 | Python |
| 24 | [SAM 3 & Open-Vocabulary Segmentation](phases/04-computer-vision/24-sam3-open-vocab-segmentation/) | 构建 | Python |
| 25 | [Vision-Language Models (ViT-MLP-LLM)](phases/04-computer-vision/25-vision-language-models/) | 构建 | Python |
| 26 | [Monocular Depth & Geometry Estimation](phases/04-computer-vision/26-monocular-depth/) | 构建 | Python |
| 27 | [Multi-Object Tracking & Video Memory](phases/04-computer-vision/27-multi-object-tracking/) | 构建 | Python |
| 28 | [World Models & Video Diffusion](phases/04-computer-vision/28-world-models-video-diffusion/) | 构建 | Python |
</details>
<details id="phase-5">
<summary><b>Phase 5 — NLP: Foundations to Advanced</b> <code>29 lessons</code> <em>语言是通向 intelligence 的接口。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Text Processing: Tokenization, Stemming, Lemmatization](phases/05-nlp-foundations-to-advanced/01-text-processing/) | 构建 | Python |
| 02 | [Bag of Words, TF-IDF & Text Representation](phases/05-nlp-foundations-to-advanced/02-bag-of-words-tfidf/) | 构建 | Python |
| 03 | [Word Embeddings: Word2Vec from Scratch](phases/05-nlp-foundations-to-advanced/03-word-embeddings-word2vec/) | 构建 | Python |
| 04 | [GloVe, FastText & Subword Embeddings](phases/05-nlp-foundations-to-advanced/04-glove-fasttext-subword/) | 构建 | Python |
| 05 | [Sentiment Analysis](phases/05-nlp-foundations-to-advanced/05-sentiment-analysis/) | 构建 | Python |
| 06 | [Named Entity Recognition (NER)](phases/05-nlp-foundations-to-advanced/06-named-entity-recognition/) | 构建 | Python |
| 07 | [POS Tagging & Syntactic Parsing](phases/05-nlp-foundations-to-advanced/07-pos-tagging-parsing/) | 构建 | Python |
| 08 | [Text Classification — CNNs & RNNs for Text](phases/05-nlp-foundations-to-advanced/08-cnns-rnns-for-text/) | 构建 | Python |
| 09 | [Sequence-to-Sequence Models](phases/05-nlp-foundations-to-advanced/09-sequence-to-sequence/) | 构建 | Python |
| 10 | [Attention Mechanism — The Breakthrough](phases/05-nlp-foundations-to-advanced/10-attention-mechanism/) | 构建 | Python |
| 11 | [Machine Translation](phases/05-nlp-foundations-to-advanced/11-machine-translation/) | 构建 | Python |
| 12 | [Text Summarization](phases/05-nlp-foundations-to-advanced/12-text-summarization/) | 构建 | Python |
| 13 | [Question Answering Systems](phases/05-nlp-foundations-to-advanced/13-question-answering/) | 构建 | Python |
| 14 | [Information Retrieval & Search](phases/05-nlp-foundations-to-advanced/14-information-retrieval-search/) | 构建 | Python |
| 15 | [Topic Modeling: LDA, BERTopic](phases/05-nlp-foundations-to-advanced/15-topic-modeling/) | 构建 | Python |
| 16 | [Text Generation](phases/05-nlp-foundations-to-advanced/16-text-generation-pre-transformer/) | 构建 | Python |
| 17 | [Chatbots: Rule-Based to Neural](phases/05-nlp-foundations-to-advanced/17-chatbots-rule-to-neural/) | 构建 | Python |
| 18 | [Multilingual NLP](phases/05-nlp-foundations-to-advanced/18-multilingual-nlp/) | 构建 | Python |
| 19 | [Subword Tokenization: BPE, WordPiece, Unigram, SentencePiece](phases/05-nlp-foundations-to-advanced/19-subword-tokenization/) | 学习 | Python |
| 20 | [Structured Outputs & Constrained Decoding](phases/05-nlp-foundations-to-advanced/20-structured-outputs-constrained-decoding/) | 构建 | Python |
| 21 | [NLI & Textual Entailment](phases/05-nlp-foundations-to-advanced/21-nli-textual-entailment/) | 学习 | Python |
| 22 | [Embedding Models Deep Dive](phases/05-nlp-foundations-to-advanced/22-embedding-models-deep-dive/) | 学习 | Python |
| 23 | [Chunking Strategies for RAG](phases/05-nlp-foundations-to-advanced/23-chunking-strategies-rag/) | 构建 | Python |
| 24 | [Coreference Resolution](phases/05-nlp-foundations-to-advanced/24-coreference-resolution/) | 学习 | Python |
| 25 | [Entity Linking & Disambiguation](phases/05-nlp-foundations-to-advanced/25-entity-linking/) | 构建 | Python |
| 26 | [Relation Extraction & Knowledge Graph Construction](phases/05-nlp-foundations-to-advanced/26-relation-extraction-kg/) | 构建 | Python |
| 27 | [LLM Evaluation: RAGAS, DeepEval, G-Eval](phases/05-nlp-foundations-to-advanced/27-llm-evaluation-frameworks/) | 构建 | Python |
| 28 | [Long-Context Evaluation: NIAH, RULER, LongBench, MRCR](phases/05-nlp-foundations-to-advanced/28-long-context-evaluation/) | 学习 | Python |
| 29 | [Dialogue State Tracking](phases/05-nlp-foundations-to-advanced/29-dialogue-state-tracking/) | 构建 | Python |
</details>
<details id="phase-6">
<summary><b>Phase 6 — Speech & Audio</b> <code>17 lessons</code> <em>听见,理解,表达。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Audio Fundamentals: Waveforms, Sampling, FFT](phases/06-speech-and-audio/01-audio-fundamentals) | 学习 | Python |
| 02 | [Spectrograms, Mel Scale & Audio Features](phases/06-speech-and-audio/02-spectrograms-mel-features) | 构建 | Python |
| 03 | [Audio Classification](phases/06-speech-and-audio/03-audio-classification) | 构建 | Python |
| 04 | [Speech Recognition (ASR)](phases/06-speech-and-audio/04-speech-recognition-asr) | 构建 | Python |
| 05 | [Whisper: Architecture & Fine-Tuning](phases/06-speech-and-audio/05-whisper-architecture-finetuning) | 构建 | Python |
| 06 | [Speaker Recognition & Verification](phases/06-speech-and-audio/06-speaker-recognition-verification) | 构建 | Python |
| 07 | [Text-to-Speech (TTS)](phases/06-speech-and-audio/07-text-to-speech) | 构建 | Python |
| 08 | [Voice Cloning & Voice Conversion](phases/06-speech-and-audio/08-voice-cloning-conversion) | 构建 | Python |
| 09 | [Music Generation](phases/06-speech-and-audio/09-music-generation) | 构建 | Python |
| 10 | [Audio-Language Models](phases/06-speech-and-audio/10-audio-language-models) | 构建 | Python |
| 11 | [Real-Time Audio Processing](phases/06-speech-and-audio/11-real-time-audio-processing) | 构建 | Python |
| 12 | [Build a Voice Assistant Pipeline](phases/06-speech-and-audio/12-voice-assistant-pipeline) | 构建 | Python |
| 13 | [Neural Audio Codecs — EnCodec, SNAC, Mimi, DAC](phases/06-speech-and-audio/13-neural-audio-codecs) | 学习 | Python |
| 14 | [Voice Activity Detection & Turn-Taking](phases/06-speech-and-audio/14-voice-activity-detection-turn-taking) | 构建 | Python |
| 15 | [Streaming Speech-to-Speech — Moshi, Hibiki](phases/06-speech-and-audio/15-streaming-speech-to-speech-moshi-hibiki) | 学习 | Python |
| 16 | [Voice Anti-Spoofing & Audio Watermarking](phases/06-speech-and-audio/16-anti-spoofing-audio-watermarking) | 构建 | Python |
| 17 | [Audio Evaluation — WER, MOS, MMAU, Leaderboards](phases/06-speech-and-audio/17-audio-evaluation-metrics) | 学习 | Python |
</details>
<details id="phase-7">
<summary><b>Phase 7 — Transformers Deep Dive</b> <code>16 lessons</code> <em>改变一切的 architecture。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Why Transformers: The Problems with RNNs](phases/07-transformers-deep-dive/01-why-transformers/) | 学习 | Python |
| 02 | [Self-Attention from Scratch](phases/07-transformers-deep-dive/02-self-attention-from-scratch/) | 构建 | Python |
| 03 | [Multi-Head Attention](phases/07-transformers-deep-dive/03-multi-head-attention/) | 构建 | Python |
| 04 | [Positional Encoding: Sinusoidal, RoPE, ALiBi](phases/07-transformers-deep-dive/04-positional-encoding/) | 构建 | Python |
| 05 | [The Full Transformer: Encoder + Decoder](phases/07-transformers-deep-dive/05-full-transformer/) | 构建 | Python |
| 06 | [BERT — Masked Language Modeling](phases/07-transformers-deep-dive/06-bert-masked-language-modeling/) | 构建 | Python |
| 07 | [GPT — Causal Language Modeling](phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/) | 构建 | Python |
| 08 | [T5, BART — Encoder-Decoder Models](phases/07-transformers-deep-dive/08-t5-bart-encoder-decoder/) | 学习 | Python |
| 09 | [Vision Transformers (ViT)](phases/07-transformers-deep-dive/09-vision-transformers/) | 构建 | Python |
| 10 | [Audio Transformers — Whisper Architecture](phases/07-transformers-deep-dive/10-audio-transformers-whisper/) | 学习 | Python |
| 11 | [Mixture of Experts (MoE)](phases/07-transformers-deep-dive/11-mixture-of-experts/) | 构建 | Python |
| 12 | [KV Cache, Flash Attention & Inference Optimization](phases/07-transformers-deep-dive/12-kv-cache-flash-attention/) | 构建 | Python |
| 13 | [Scaling Laws](phases/07-transformers-deep-dive/13-scaling-laws/) | 学习 | Python |
| 14 | [Build a Transformer from Scratch](phases/07-transformers-deep-dive/14-build-a-transformer-capstone/) | 构建 | Python |
| 15 | [Attention Variants — Sliding Window, Sparse, Differential](phases/07-transformers-deep-dive/15-attention-variants/) | 构建 | Python |
| 16 | [Speculative Decoding — Draft, Verify, Repeat](phases/07-transformers-deep-dive/16-speculative-decoding/) | 构建 | Python |
</details>
<details id="phase-8">
<summary><b>Phase 8 — Generative AI</b> <code>15 lessons</code> <em>创建 images、video、audio、3D,以及更多内容。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Generative Models: Taxonomy & History](phases/08-generative-ai/01-generative-models-taxonomy-history/) | 学习 | Python |
| 02 | [Autoencoders & VAE](phases/08-generative-ai/02-autoencoders-vae/) | 构建 | Python |
| 03 | [GANs: Generator vs Discriminator](phases/08-generative-ai/03-gans-generator-discriminator/) | 构建 | Python |
| 04 | [Conditional GANs & Pix2Pix](phases/08-generative-ai/04-conditional-gans-pix2pix/) | 构建 | Python |
| 05 | [StyleGAN](phases/08-generative-ai/05-stylegan/) | 构建 | Python |
| 06 | [Diffusion Models — DDPM from Scratch](phases/08-generative-ai/06-diffusion-ddpm-from-scratch/) | 构建 | Python |
| 07 | [Latent Diffusion & Stable Diffusion](phases/08-generative-ai/07-latent-diffusion-stable-diffusion/) | 构建 | Python |
| 08 | [ControlNet, LoRA & Conditioning](phases/08-generative-ai/08-controlnet-lora-conditioning/) | 构建 | Python |
| 09 | [Inpainting, Outpainting & Editing](phases/08-generative-ai/09-inpainting-outpainting-editing/) | 构建 | Python |
| 10 | [Video Generation](phases/08-generative-ai/10-video-generation/) | 构建 | Python |
| 11 | [Audio Generation](phases/08-generative-ai/11-audio-generation/) | 构建 | Python |
| 12 | [3D Generation](phases/08-generative-ai/12-3d-generation/) | 构建 | Python |
| 13 | [Flow Matching & Rectified Flows](phases/08-generative-ai/13-flow-matching-rectified-flows/) | 构建 | Python |
| 14 | [Evaluation: FID, CLIP Score](phases/08-generative-ai/14-evaluation-fid-clip-score/) | 构建 | Python |
| 19 | [Visual Autoregressive Modeling (VAR): Next-Scale Prediction](phases/08-generative-ai/19-visual-autoregressive-var/) | 构建 | Python |
</details>
<details id="phase-9">
<summary><b>Phase 9 — Reinforcement Learning</b> <code>12 lessons</code> <em>RLHF 和 game-playing AI 的基础。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [MDPs, States, Actions & Rewards](phases/09-reinforcement-learning/01-mdps-states-actions-rewards/) | 学习 | Python |
| 02 | [Dynamic Programming](phases/09-reinforcement-learning/02-dynamic-programming/) | 构建 | Python |
| 03 | [Monte Carlo Methods](phases/09-reinforcement-learning/03-monte-carlo-methods/) | 构建 | Python |
| 04 | [Q-Learning, SARSA](phases/09-reinforcement-learning/04-q-learning-sarsa/) | 构建 | Python |
| 05 | [Deep Q-Networks (DQN)](phases/09-reinforcement-learning/05-dqn/) | 构建 | Python |
| 06 | [Policy Gradients — REINFORCE](phases/09-reinforcement-learning/06-policy-gradients-reinforce/) | 构建 | Python |
| 07 | [Actor-Critic — A2C, A3C](phases/09-reinforcement-learning/07-actor-critic-a2c-a3c/) | 构建 | Python |
| 08 | [PPO](phases/09-reinforcement-learning/08-ppo/) | 构建 | Python |
| 09 | [Reward Modeling & RLHF](phases/09-reinforcement-learning/09-reward-modeling-rlhf/) | 构建 | Python |
| 10 | [Multi-Agent RL](phases/09-reinforcement-learning/10-multi-agent-rl/) | 构建 | Python |
| 11 | [Sim-to-Real Transfer](phases/09-reinforcement-learning/11-sim-to-real-transfer/) | 构建 | Python |
| 12 | [RL for Games](phases/09-reinforcement-learning/12-rl-for-games/) | 构建 | Python |
</details>
<details id="phase-10">
<summary><b>Phase 10 — LLMs from Scratch</b> <code>24 lessons</code> <em>构建、训练并理解 large language models。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Tokenizers: BPE, WordPiece, SentencePiece](phases/10-llms-from-scratch/01-tokenizers/) | 构建 | Python, Rust |
| 02 | [Building a Tokenizer from Scratch](phases/10-llms-from-scratch/02-building-a-tokenizer/) | 构建 | Python |
| 03 | [Data Pipelines for Pre-Training](phases/10-llms-from-scratch/03-data-pipelines/) | 构建 | Python |
| 04 | [Pre-Training a Mini GPT (124M)](phases/10-llms-from-scratch/04-pre-training-mini-gpt/) | 构建 | Python |
| 05 | [Distributed Training, FSDP, DeepSpeed](phases/10-llms-from-scratch/05-scaling-distributed/) | 构建 | Python |
| 06 | [Instruction Tuning — SFT](phases/10-llms-from-scratch/06-instruction-tuning-sft/) | 构建 | Python |
| 07 | [RLHF — Reward Model + PPO](phases/10-llms-from-scratch/07-rlhf/) | 构建 | Python |
| 08 | [DPO — Direct Preference Optimization](phases/10-llms-from-scratch/08-dpo/) | 构建 | Python |
| 09 | [Constitutional AI & Self-Improvement](phases/10-llms-from-scratch/09-constitutional-ai-self-improvement/) | 构建 | Python |
| 10 | [Evaluation — Benchmarks, Evals](phases/10-llms-from-scratch/10-evaluation/) | 构建 | Python |
| 11 | [Quantization: INT8, GPTQ, AWQ, GGUF](phases/10-llms-from-scratch/11-quantization/) | 构建 | Python |
| 12 | [Inference Optimization](phases/10-llms-from-scratch/12-inference-optimization/) | 构建 | Python |
| 13 | [Building a Complete LLM Pipeline](phases/10-llms-from-scratch/13-building-complete-llm-pipeline/) | 构建 | Python |
| 14 | [Open Models: Architecture Walkthroughs](phases/10-llms-from-scratch/14-open-models-architecture-walkthroughs/) | 学习 | Python |
| 15 | [Speculative Decoding and EAGLE-3](phases/10-llms-from-scratch/15-speculative-decoding-eagle3/) | 构建 | Python |
| 16 | [Differential Attention (V2)](phases/10-llms-from-scratch/16-differential-attention-v2/) | 构建 | Python |
| 17 | [Native Sparse Attention (DeepSeek NSA)](phases/10-llms-from-scratch/17-native-sparse-attention/) | 构建 | Python |
| 18 | [Multi-Token Prediction (MTP)](phases/10-llms-from-scratch/18-multi-token-prediction/) | 构建 | Python |
| 19 | [DualPipe Parallelism](phases/10-llms-from-scratch/19-dualpipe-parallelism/) | 学习 | Python |
| 20 | [DeepSeek-V3 Architecture Walkthrough](phases/10-llms-from-scratch/20-deepseek-v3-walkthrough/) | 学习 | Python |
| 21 | [Jamba — Hybrid SSM-Transformer](phases/10-llms-from-scratch/21-jamba-hybrid-ssm-transformer/) | 学习 | Python |
| 22 | [Async and Hogwild! Inference](phases/10-llms-from-scratch/22-async-hogwild-inference/) | 构建 | Python |
| 25 | [Speculative Decoding and EAGLE](phases/10-llms-from-scratch/25-speculative-decoding/) | 构建 | Python |
| 34 | [Gradient Checkpointing and Activation Recomputation](phases/10-llms-from-scratch/34-gradient-checkpointing/) | 构建 | Python |
</details>
<details id="phase-11">
<summary><b>Phase 11 — LLM Engineering</b> <code>17 lessons</code> <em>把 LLMs 用到 production 中。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Prompt Engineering: Techniques & Patterns](phases/11-llm-engineering/01-prompt-engineering/) | 构建 | Python |
| 02 | [Few-Shot, CoT, Tree-of-Thought](phases/11-llm-engineering/02-few-shot-cot/) | 构建 | Python |
| 03 | [Structured Outputs](phases/11-llm-engineering/03-structured-outputs/) | 构建 | Python |
| 04 | [Embeddings & Vector Representations](phases/11-llm-engineering/04-embeddings/) | 构建 | Python |
| 05 | [Context Engineering](phases/11-llm-engineering/05-context-engineering/) | 构建 | Python |
| 06 | [RAG: Retrieval-Augmented Generation](phases/11-llm-engineering/06-rag/) | 构建 | Python |
| 07 | [Advanced RAG: Chunking, Reranking](phases/11-llm-engineering/07-advanced-rag/) | 构建 | Python |
| 08 | [Fine-Tuning with LoRA & QLoRA](phases/11-llm-engineering/08-fine-tuning-lora/) | 构建 | Python |
| 09 | [Function Calling & Tool Use](phases/11-llm-engineering/09-function-calling/) | 构建 | Python |
| 10 | [Evaluation & Testing](phases/11-llm-engineering/10-evaluation/) | 构建 | Python |
| 11 | [Caching, Rate Limiting & Cost](phases/11-llm-engineering/11-caching-cost/) | 构建 | Python |
| 12 | [Guardrails & Safety](phases/11-llm-engineering/12-guardrails/) | 构建 | Python |
| 13 | [Building a Production LLM App](phases/11-llm-engineering/13-production-app/) | 构建 | Python |
| 14 | [Model Context Protocol (MCP)](phases/11-llm-engineering/14-model-context-protocol/) | 构建 | Python |
| 15 | [Prompt Caching & Context Caching](phases/11-llm-engineering/15-prompt-caching/) | 构建 | Python |
| 16 | [LangGraph: State Machines for Agents](phases/11-llm-engineering/16-langgraph-state-machines/) | 构建 | Python |
| 17 | [Agent Framework Tradeoffs](phases/11-llm-engineering/17-agent-framework-tradeoffs/) | 学习 | Python |
</details>
<details id="phase-12">
<summary><b>Phase 12 — Multimodal AI</b> <code>25 lessons</code> <em>跨 modalities 观看、聆听、阅读和推理 —— 从 ViT patches 到 computer-use agents。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Vision Transformers and the Patch-Token Primitive](phases/12-multimodal-ai/01-vision-transformer-patch-tokens/) | 学习 | Python |
| 02 | [CLIP and Contrastive Vision-Language Pretraining](phases/12-multimodal-ai/02-clip-contrastive-pretraining/) | 构建 | Python |
| 03 | [BLIP-2 Q-Former as Modality Bridge](phases/12-multimodal-ai/03-blip2-qformer-bridge/) | 构建 | Python |
| 04 | [Flamingo and Gated Cross-Attention](phases/12-multimodal-ai/04-flamingo-gated-cross-attention/) | 学习 | Python |
| 05 | [LLaVA and Visual Instruction Tuning](phases/12-multimodal-ai/05-llava-visual-instruction-tuning/) | 构建 | Python |
| 06 | [Any-Resolution Vision — Patch-n'-Pack and NaFlex](phases/12-multimodal-ai/06-any-resolution-patch-n-pack/) | 构建 | Python |
| 07 | [Open-Weight VLM Recipes: What Actually Matters](phases/12-multimodal-ai/07-open-weight-vlm-recipes/) | 学习 | Python |
| 08 | [LLaVA-OneVision: Single, Multi, Video](phases/12-multimodal-ai/08-llava-onevision-single-multi-video/) | 构建 | Python |
| 09 | [Qwen-VL Family and Dynamic-FPS Video](phases/12-multimodal-ai/09-qwen-vl-family-dynamic-fps/) | 学习 | Python |
| 10 | [InternVL3 Native Multimodal Pretraining](phases/12-multimodal-ai/10-internvl3-native-multimodal/) | 学习 | Python |
| 11 | [Chameleon Early-Fusion Token-Only](phases/12-multimodal-ai/11-chameleon-early-fusion-tokens/) | 构建 | Python |
| 12 | [Emu3 Next-Token Prediction for Generation](phases/12-multimodal-ai/12-emu3-next-token-for-generation/) | 学习 | Python |
| 13 | [Transfusion Autoregressive + Diffusion](phases/12-multimodal-ai/13-transfusion-autoregressive-diffusion/) | 构建 | Python |
| 14 | [Show-o Discrete-Diffusion Unified](phases/12-multimodal-ai/14-show-o-discrete-diffusion-unified/) | 学习 | Python |
| 15 | [Janus-Pro Decoupled Encoders](phases/12-multimodal-ai/15-janus-pro-decoupled-encoders/) | 构建 | Python |
| 16 | [MIO Any-to-Any Streaming](phases/12-multimodal-ai/16-mio-any-to-any-streaming/) | 学习 | Python |
| 17 | [Video-Language Temporal Grounding](phases/12-multimodal-ai/17-video-language-temporal-grounding/) | 构建 | Python |
| 18 | [Long-Video at Million-Token Context](phases/12-multimodal-ai/18-long-video-million-token/) | 构建 | Python |
| 19 | [Audio-Language Models: Whisper to AF3](phases/12-multimodal-ai/19-audio-language-whisper-to-af3/) | 构建 | Python |
| 20 | [Omni Models: Thinker-Talker Streaming](phases/12-multimodal-ai/20-omni-models-thinker-talker/) | 构建 | Python |
| 21 | [Embodied VLAs: RT-2, OpenVLA, π0, GR00T](phases/12-multimodal-ai/21-embodied-vlas-openvla-pi0-groot/) | 学习 | Python |
| 22 | [Document and Diagram Understanding](phases/12-multimodal-ai/22-document-diagram-understanding/) | 构建 | Python |
| 23 | [ColPali Vision-Native Document RAG](phases/12-multimodal-ai/23-colpali-vision-native-rag/) | 构建 | Python |
| 24 | [Multimodal RAG and Cross-Modal Retrieval](phases/12-multimodal-ai/24-multimodal-rag-cross-modal/) | 构建 | Python |
| 25 | [Multimodal Agents and Computer-Use (Capstone)](phases/12-multimodal-ai/25-multimodal-agents-computer-use/) | 构建 | Python |
</details>
<details id="phase-13">
<summary><b>Phase 13 — 工具与协议</b> <code>31 节课</code> <em>Function calling、MCP 协议、安全与生态。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Tool Interface](phases/13-tools-and-protocols/01-the-tool-interface/) | Learn | Python |
| 02 | [Function Calling 深入解析](phases/13-tools-and-protocols/02-function-calling-deep-dive/) | Build | Python |
| 03 | [Parallel 与 Streaming Tool Calls](phases/13-tools-and-protocols/03-parallel-and-streaming-tool-calls/) | Build | Python |
| 04 | [Structured Output](phases/13-tools-and-protocols/04-structured-output/) | Build | Python |
| 05 | [Tool Schema Design](phases/13-tools-and-protocols/05-tool-schema-design/) | Learn | Python |
| 06 | [MCP 基础](phases/13-tools-and-protocols/06-mcp-fundamentals/) | Learn | Python |
| 07 | [构建 MCP Server](phases/13-tools-and-protocols/07-building-an-mcp-server/) | Build | Python |
| 08 | [构建 MCP Client](phases/13-tools-and-protocols/08-building-an-mcp-client/) | Build | Python |
| 09 | [MCP Transports](phases/13-tools-and-protocols/09-mcp-transports/) | Build | Python |
| 10 | [MCP Resources 与 Prompts](phases/13-tools-and-protocols/10-mcp-resources-and-prompts/) | Build | Python |
| 11 | [MCP Sampling](phases/13-tools-and-protocols/11-mcp-sampling/) | Build | Python |
| 12 | [MCP Roots 与 Elicitation](phases/13-tools-and-protocols/12-mcp-roots-and-elicitation/) | Build | Python |
| 13 | [MCP Async Tasks](phases/13-tools-and-protocols/13-mcp-async-tasks/) | Build | Python |
| 14 | [MCP Apps](phases/13-tools-and-protocols/14-mcp-apps/) | Build | Python |
| 15 | [MCP Security I — Tool Poisoning](phases/13-tools-and-protocols/15-mcp-security-tool-poisoning/) | Learn | Python |
| 16 | [MCP Security II — OAuth 2.1](phases/13-tools-and-protocols/16-mcp-security-oauth-2-1/) | Build | Python |
| 17 | [MCP Gateways 与 Registries](phases/13-tools-and-protocols/17-mcp-gateways-and-registries/) | Learn | Python |
| 18 | [Production 中的 MCP Auth — iii 上的 DCR + JWKS](phases/13-tools-and-protocols/18-mcp-auth-production/) | Build | Python |
| 19 | [A2A Protocol](phases/13-tools-and-protocols/19-a2a-protocol/) | Build | Python |
| 20 | [OpenTelemetry GenAI](phases/13-tools-and-protocols/20-opentelemetry-genai/) | Build | Python |
| 21 | [LLM Routing Layer](phases/13-tools-and-protocols/21-llm-routing-layer/) | Learn | Python |
| 22 | [Skills 与 Agent SDKs](phases/13-tools-and-protocols/22-skills-and-agent-sdks/) | Build | Python |
| 23 | [Capstone — Tool Ecosystem](phases/13-tools-and-protocols/23-capstone-tool-ecosystem/) | Build | Python |
| 24 | [Skill 发现与渐进式公开](phases/13-tools-and-protocols/24-skill-discovery-and-progressive-disclosure/) | Build | Python |
| 25 | [Skill 调用与路由](phases/13-tools-and-protocols/25-skill-invocation-and-routing/) | Build | Python |
| 26 | [Skill 权限、沙箱与信任边界](phases/13-tools-and-protocols/26-skill-permissions-sandboxes-and-trust/) | Build | Python |
| 27 | [Skill 评估、打包与可移植性](phases/13-tools-and-protocols/27-skill-evals-packaging-and-portability/) | Build | Python |
| 28 | [MCP Tool Contracts 与内容](phases/13-tools-and-protocols/28-mcp-tool-contracts-and-content/) | Build | Python |
| 29 | [MCP 可靠性、取消与流控](phases/13-tools-and-protocols/29-mcp-reliability-cancellation-and-flow-control/) | Build | Python |
| 30 | [MCP Registry 供应链:准入、漂移与回滚](phases/13-tools-and-protocols/30-mcp-registry-supply-chain-and-drift/) | Build | Python |
| 31 | [MCP 一致性工程:版本控制、证据与运维](phases/13-tools-and-protocols/31-mcp-conformance-versioning-and-operations/) | Build | Python |
第 06-18 课与第 28-31 课构成专门的 [Model Context Protocol (MCP) 学习路径](learning-paths/model-context-protocol.json)。其清单执行顺序为 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 18, 17, 28, 29, 30, 31。
</details>
<details id="phase-14">
<summary><b>Phase 14 — Agent Engineering</b> <code>54 节课</code> <em>Agentic loops、记忆架构、工作流编排与 Workbench 评估体系。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Agent Loop](phases/14-agent-engineering/01-the-agent-loop/) | Build | Python |
| 02 | [ReWOO 与 Plan-and-Execute](phases/14-agent-engineering/02-rewoo-plan-and-execute/) | Build | Python |
| 03 | [Reflexion 与 Verbal Reinforcement Learning](phases/14-agent-engineering/03-reflexion-verbal-rl/) | Build | Python |
| 04 | [Tree of Thoughts 与 LATS](phases/14-agent-engineering/04-tree-of-thoughts-lats/) | Build | Python |
| 05 | [Self-Refine 与 CRITIC](phases/14-agent-engineering/05-self-refine-and-critic/) | Build | Python |
| 06 | [Tool Use 与 Function Calling](phases/14-agent-engineering/06-tool-use-and-function-calling/) | Build | Python |
| 07 | [Memory — Virtual Context 与 MemGPT](phases/14-agent-engineering/07-memory-virtual-context-memgpt/) | Build | Python |
| 08 | [Memory Blocks 与 Sleep-Time Compute (Letta)](phases/14-agent-engineering/08-memory-blocks-sleep-time-compute/) | Build | Python |
| 09 | [Hybrid Memory — Vector + Graph + KV (Mem0)](phases/14-agent-engineering/09-hybrid-memory-mem0/) | Build | Python |
| 10 | [Skill Libraries 与 Lifelong Learning (Voyager)](phases/14-agent-engineering/10-skill-libraries-voyager/) | Build | Python |
| 11 | [使用 HTN 与 Evolutionary Search 进行规划](phases/14-agent-engineering/11-planning-htn-and-evolutionary/) | Build | Python |
| 12 | [Anthropic 的 Workflow Patterns](phases/14-agent-engineering/12-anthropic-workflow-patterns/) | Build | Python |
| 13 | [LangGraph — Stateful Graphs 与 Durable Execution](phases/14-agent-engineering/13-langgraph-stateful-graphs/) | Build | Python |
| 14 | [AutoGen v0.4 — Actor Model](phases/14-agent-engineering/14-autogen-actor-model/) | Build | Python |
| 15 | [CrewAI — Role-Based Crews 与 Flows](phases/14-agent-engineering/15-crewai-role-based-crews/) | Build | Python |
| 16 | [OpenAI Agents SDK — Handoffs, Guardrails, Tracing](phases/14-agent-engineering/16-openai-agents-sdk/) | Build | Python |
| 17 | [Claude Agent SDK — Subagents 与 Session Store](phases/14-agent-engineering/17-claude-agent-sdk/) | Build | Python |
| 18 | [Production Agent Runtimes](phases/14-agent-engineering/18-agno-and-mastra-runtimes/) | Learn | Python |
| 19 | [Benchmarks — SWE-bench, GAIA, AgentBench](phases/14-agent-engineering/19-benchmarks-swebench-gaia/) | Learn | Python |
| 20 | [Benchmarks — WebArena 与 OSWorld](phases/14-agent-engineering/20-benchmarks-webarena-osworld/) | Learn | Python |
| 21 | [Computer Use — Claude, OpenAI CUA, Gemini](phases/14-agent-engineering/21-computer-use-agents/) | Build | Python |
| 22 | [Voice Agents — Pipecat 与 LiveKit](phases/14-agent-engineering/22-voice-agents-pipecat-livekit/) | Build | Python |
| 23 | [OpenTelemetry GenAI Semantic Conventions](phases/14-agent-engineering/23-otel-genai-conventions/) | Build | Python |
| 24 | [Agent Observability — Langfuse, Phoenix, Opik](phases/14-agent-engineering/24-agent-observability-platforms/) | Learn | Python |
| 25 | [Multi-Agent Debate 与 Collaboration](phases/14-agent-engineering/25-multi-agent-debate/) | Build | Python |
| 26 | [Failure Modes — Agents 为什么会失效](phases/14-agent-engineering/26-failure-modes-agentic/) | Build | Python |
| 27 | [Prompt Injection 与 PVE Defense](phases/14-agent-engineering/27-prompt-injection-defense/) | Build | Python |
| 28 | [Orchestration Patterns — Supervisor, Swarm, Hierarchical](phases/14-agent-engineering/28-orchestration-patterns/) | Build | Python |
| 29 | [Production Runtimes — Queue, Event, Cron](phases/14-agent-engineering/29-production-runtimes/) | Learn | Python |
| 30 | [Eval-Driven Agent Development](phases/14-agent-engineering/30-eval-driven-agent-development/) | Build | Python |
| 31 | [Agent Workbench: 为什么能力强的模型仍会失败](phases/14-agent-engineering/31-agent-workbench-why-models-fail/) | Learn | Python |
| 32 | [Minimal Agent Workbench](phases/14-agent-engineering/32-minimal-agent-workbench/) | Build | Python |
| 33 | [作为可执行约束的 Agent Instructions](phases/14-agent-engineering/33-instructions-as-executable-constraints/) | Build | Python |
| 34 | [Repo Memory 与 Durable State](phases/14-agent-engineering/34-repo-memory-and-state/) | Build | Python |
| 35 | [面向 Agents 的 Initialization Scripts](phases/14-agent-engineering/35-initialization-scripts/) | Build | Python |
| 36 | [Scope Contracts 与 Task Boundaries](phases/14-agent-engineering/36-scope-contracts/) | Build | Python |
| 37 | [Runtime Feedback Loops](phases/14-agent-engineering/37-runtime-feedback-loops/) | Build | Python |
| 38 | [Verification Gates](phases/14-agent-engineering/38-verification-gates/) | Build | Python |
| 39 | [Reviewer Agent: 分离 Builder 与 Marker](phases/14-agent-engineering/39-reviewer-agent/) | Build | Python |
| 40 | [Multi-Session Handoff](phases/14-agent-engineering/40-multi-session-handoff/) | Build | Python |
| 41 | [真实 Repo 上的 Workbench](phases/14-agent-engineering/41-workbench-for-real-repos/) | Build | Python |
| 42 | [Capstone: 发布可复用的 Agent Workbench Pack](phases/14-agent-engineering/42-agent-workbench-capstone/) | Build | Python |
| 43 | [在 Agent 写代码前框定任务](phases/14-agent-engineering/43-frame-the-task-before-code/) | Build | Python |
| 44 | [构建基于证据的执行计划](phases/14-agent-engineering/44-plan-from-evidence/) | Build | Python |
| 45 | [带隔离与合并契约的 Agent 委托](phases/14-agent-engineering/45-delegate-with-isolation/) | Build | Python |
| 46 | [将每次 Agent 纠偏转化为系统改进](phases/14-agent-engineering/46-turn-feedback-into-system/) | Build | Python |
| 47 | [在选择输出之前先定义成效](phases/14-agent-engineering/47-outcomes-before-output/) | Build | Python |
| 48 | [发掘人们真正执行的工作流](phases/14-agent-engineering/48-discover-the-real-workflow/) | Build | Python |
| 49 | [映射假设并优先解决最高风险点](phases/14-agent-engineering/49-map-assumptions-and-risk/) | Build | Python |
| 50 | [选择能够改变决策的最小切片](phases/14-agent-engineering/50-choose-the-smallest-testable-slice/) | Build | Python |
| 51 | [编写保留人类判断力的规范说明](phases/14-agent-engineering/51-write-specifications-that-preserve-judgment/) | Build | Python |
| 52 | [在结果出现前设计成功度量指标](phases/14-agent-engineering/52-design-success-metrics/) | Build | Python |
| 53 | [审慎选择原型、试点还是生产级](phases/14-agent-engineering/53-prototype-pilot-or-production/) | Build | Python |
| 54 | [构建带权责与退役机制的反馈棘轮](phases/14-agent-engineering/54-build-the-feedback-ratchet/) | Build | Python |
Phase 14 的每个 workbench 课程(31-42)都附带 `mission.md`,在 agent 查看完整课程文档前进行任务简报。
第 31-46 课构成 [Agent-Assisted Engineering 学习路径](learning-paths/using-coding-agents.json)。清单顺序结合了 workbench 基础与任务框定、规划、委托及持久反馈机制。第 47-54 课构成 [Product Judgment and Delivery 学习路径](learning-paths/shaping-the-build.json),涵盖从成效框定到证据、风险、范围、度量、分阶段发布以及反馈权责管理的完整闭环。
</details>
<details id="phase-15">
<summary><b>Phase 15 — Autonomous Systems</b> <code>22 lessons</code> <em>Long-horizon agents、self-improvement,以及 2026 safety stack。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [From Chatbots to Long-Horizon Agents (METR)](phases/15-autonomous-systems/01-long-horizon-agents/) | 学习 | Python |
| 02 | [STaR, V-STaR, Quiet-STaR: Self-Taught Reasoning](phases/15-autonomous-systems/02-star-family-reasoning/) | 学习 | Python |
| 03 | [AlphaEvolve: Evolutionary Coding Agents](phases/15-autonomous-systems/03-alphaevolve-evolutionary-coding/) | 学习 | Python |
| 04 | [Darwin Gödel Machine: Self-Modifying Agents](phases/15-autonomous-systems/04-darwin-godel-machine/) | 学习 | Python |
| 05 | [AI Scientist v2: Workshop-Level Research](phases/15-autonomous-systems/05-ai-scientist-v2/) | 学习 | Python |
| 06 | [Automated Alignment Research (Anthropic AAR)](phases/15-autonomous-systems/06-automated-alignment-research/) | 学习 | Python |
| 07 | [Recursive Self-Improvement: Capability vs Alignment](phases/15-autonomous-systems/07-recursive-self-improvement/) | 学习 | Python |
| 08 | [Bounded Self-Improvement Designs](phases/15-autonomous-systems/08-bounded-self-improvement/) | 学习 | Python |
| 09 | [Autonomous Coding Agent Landscape (SWE-bench, CodeAct)](phases/15-autonomous-systems/09-coding-agent-landscape/) | 学习 | Python |
| 10 | [Claude Code Permission Modes and Auto Mode](phases/15-autonomous-systems/10-claude-code-permission-modes/) | 学习 | Python |
| 11 | [Browser Agents and Indirect Prompt Injection](phases/15-autonomous-systems/11-browser-agents/) | 学习 | Python |
| 12 | [Durable Execution for Long-Running Agents](phases/15-autonomous-systems/12-durable-execution/) | 学习 | Python |
| 13 | [Action Budgets, Iteration Caps, Cost Governors](phases/15-autonomous-systems/13-cost-governors/) | 学习 | Python |
| 14 | [Kill Switches, Circuit Breakers, Canary Tokens](phases/15-autonomous-systems/14-kill-switches-canaries/) | 学习 | Python |
| 15 | [HITL: Propose-Then-Commit](phases/15-autonomous-systems/15-propose-then-commit/) | 学习 | Python |
| 16 | [Checkpoints and Rollback](phases/15-autonomous-systems/16-checkpoints-rollback/) | 学习 | Python |
| 17 | [Constitutional AI and Rule Overrides](phases/15-autonomous-systems/17-constitutional-ai/) | 学习 | Python |
| 18 | [Llama Guard and Input/Output Classification](phases/15-autonomous-systems/18-llama-guard/) | 学习 | Python |
| 19 | [Anthropic Responsible Scaling Policy v3.0](phases/15-autonomous-systems/19-anthropic-rsp/) | 学习 | Python |
| 20 | [OpenAI Preparedness Framework and DeepMind FSF](phases/15-autonomous-systems/20-openai-preparedness-deepmind-fsf/) | 学习 | Python |
| 21 | [METR Time Horizons and External Evaluation](phases/15-autonomous-systems/21-metr-external-evaluation/) | 学习 | Python |
| 22 | [CAIS, CAISI, and Societal-Scale Risk](phases/15-autonomous-systems/22-cais-caisi-societal-risk/) | 学习 | Python |
</details>
<details id="phase-16">
<summary><b>Phase 16 — Multi-Agent & Swarms</b> <code>25 lessons</code> <em>Coordination、emergence 和 collective intelligence。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Why Multi-Agent](phases/16-multi-agent-and-swarms/01-why-multi-agent/) | 学习 | TypeScript |
| 02 | [FIPA-ACL Heritage and Speech Acts](phases/16-multi-agent-and-swarms/02-fipa-acl-heritage/) | 学习 | Python |
| 03 | [Communication Protocols](phases/16-multi-agent-and-swarms/03-communication-protocols/) | 构建 | TypeScript |
| 04 | [The Multi-Agent Primitive Model](phases/16-multi-agent-and-swarms/04-primitive-model/) | 学习 | Python |
| 05 | [Supervisor / Orchestrator-Worker Pattern](phases/16-multi-agent-and-swarms/05-supervisor-orchestrator-pattern/) | 构建 | Python |
| 06 | [Hierarchical Architecture and Decomposition Drift](phases/16-multi-agent-and-swarms/06-hierarchical-architecture/) | 学习 | Python |
| 07 | [Society of Mind and Multi-Agent Debate](phases/16-multi-agent-and-swarms/07-society-of-mind-debate/) | 构建 | Python |
| 08 | [Role Specialization — Planner / Critic / Executor / Verifier](phases/16-multi-agent-and-swarms/08-role-specialization/) | 构建 | Python |
| 09 | [Parallel Swarm and Networked Architectures](phases/16-multi-agent-and-swarms/09-parallel-swarm-networks/) | 构建 | Python |
| 10 | [Group Chat and Speaker Selection](phases/16-multi-agent-and-swarms/10-group-chat-speaker-selection/) | 构建 | Python |
| 11 | [Handoffs and Routines (Stateless Orchestration)](phases/16-multi-agent-and-swarms/11-handoffs-and-routines/) | 构建 | Python |
| 12 | [A2A — The Agent-to-Agent Protocol](phases/16-multi-agent-and-swarms/12-a2a-protocol/) | 构建 | Python |
| 13 | [Shared Memory and Blackboard Patterns](phases/16-multi-agent-and-swarms/13-shared-memory-blackboard/) | 构建 | Python |
| 14 | [Consensus and Byzantine Fault Tolerance](phases/16-multi-agent-and-swarms/14-consensus-and-bft/) | 构建 | Python |
| 15 | [Voting, Self-Consistency, and Debate Topology](phases/16-multi-agent-and-swarms/15-voting-debate-topology/) | 构建 | Python |
| 16 | [Negotiation and Bargaining](phases/16-multi-agent-and-swarms/16-negotiation-bargaining/) | 构建 | Python |
| 17 | [Generative Agents and Emergent Simulation](phases/16-multi-agent-and-swarms/17-generative-agents-simulation/) | 构建 | Python |
| 18 | [Theory of Mind and Emergent Coordination](phases/16-multi-agent-and-swarms/18-theory-of-mind-coordination/) | 构建 | Python |
| 19 | [Swarm Optimization (PSO, ACO)](phases/16-multi-agent-and-swarms/19-swarm-optimization-pso-aco/) | 构建 | Python |
| 20 | [MARL — MADDPG, QMIX, MAPPO](phases/16-multi-agent-and-swarms/20-marl-maddpg-qmix-mappo/) | 学习 | Python |
| 21 | [Agent Economies, Token Incentives, Reputation](phases/16-multi-agent-and-swarms/21-agent-economies/) | 学习 | Python |
| 22 | [Production Scaling — Queues, Checkpoints, Durability](phases/16-multi-agent-and-swarms/22-production-scaling-queues-checkpoints/) | 构建 | Python |
| 23 | [Failure Modes — MAST, Groupthink, Monoculture](phases/16-multi-agent-and-swarms/23-failure-modes-mast-groupthink/) | 学习 | Python |
| 24 | [Evaluation and Coordination Benchmarks](phases/16-multi-agent-and-swarms/24-evaluation-coordination-benchmarks/) | 学习 | Python |
| 25 | [Case Studies and 2026 State of the Art](phases/16-multi-agent-and-swarms/25-case-studies-2026-sota/) | 学习 | Python |
</details>
<details id="phase-17">
<summary><b>Phase 17 — Infrastructure & Production</b> <code>28 lessons</code> <em>将 AI 交付到真实世界。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Managed LLM Platforms — Bedrock, Azure OpenAI, Vertex AI](phases/17-infrastructure-and-production/01-managed-llm-platforms/) | 学习 | Python |
| 02 | [Inference Platform Economics — Fireworks, Together, Baseten, Modal](phases/17-infrastructure-and-production/02-inference-platform-economics/) | 学习 | Python |
| 03 | [GPU Autoscaling on Kubernetes — Karpenter, KAI Scheduler](phases/17-infrastructure-and-production/03-gpu-autoscaling-kubernetes/) | 学习 | Python |
| 04 | [vLLM Serving Internals — PagedAttention, Continuous Batching, Chunked Prefill](phases/17-infrastructure-and-production/04-vllm-serving-internals/) | 学习 | Python |
| 05 | [EAGLE-3 Speculative Decoding in Production](phases/17-infrastructure-and-production/05-eagle3-speculative-decoding/) | 学习 | Python |
| 06 | [SGLang and RadixAttention for Prefix-Heavy Workloads](phases/17-infrastructure-and-production/06-sglang-radixattention/) | 学习 | Python |
| 07 | [TensorRT-LLM on Blackwell with FP8 and NVFP4](phases/17-infrastructure-and-production/07-tensorrt-llm-blackwell/) | 学习 | Python |
| 08 | [Inference Metrics — TTFT, TPOT, ITL, Goodput, P99](phases/17-infrastructure-and-production/08-inference-metrics-goodput/) | 学习 | Python |
| 09 | [Production Quantization — AWQ, GPTQ, GGUF, FP8, NVFP4](phases/17-infrastructure-and-production/09-production-quantization/) | 学习 | Python |
| 10 | [Cold Start Mitigation for Serverless LLMs](phases/17-infrastructure-and-production/10-cold-start-mitigation/) | 学习 | Python |
| 11 | [Multi-Region LLM Serving and KV Cache Locality](phases/17-infrastructure-and-production/11-multi-region-kv-locality/) | 学习 | Python |
| 12 | [Edge Inference — ANE, Hexagon, WebGPU, Jetson](phases/17-infrastructure-and-production/12-edge-inference/) | 学习 | Python |
| 13 | [LLM Observability Stack Selection](phases/17-infrastructure-and-production/13-llm-observability/) | 学习 | Python |
| 14 | [Prompt Caching and Semantic Caching Economics](phases/17-infrastructure-and-production/14-prompt-semantic-caching/) | 学习 | Python |
| 15 | [Batch APIs — the 50% Discount as Industry Standard](phases/17-infrastructure-and-production/15-batch-apis/) | 学习 | Python |
| 16 | [Model Routing as a Cost-Reduction Primitive](phases/17-infrastructure-and-production/16-model-routing/) | 学习 | Python |
| 17 | [Disaggregated Prefill/Decode — NVIDIA Dynamo and llm-d](phases/17-infrastructure-and-production/17-disaggregated-prefill-decode/) | 学习 | Python |
| 18 | [vLLM Production Stack with LMCache KV Offloading](phases/17-infrastructure-and-production/18-vllm-production-stack-lmcache/) | 学习 | Python |
| 19 | [AI Gateways — LiteLLM, Portkey, Kong, Bifrost](phases/17-infrastructure-and-production/19-ai-gateways/) | 学习 | Python |
| 20 | [Shadow, Canary, and Progressive Deployment](phases/17-infrastructure-and-production/20-shadow-canary-progressive/) | 学习 | Python |
| 21 | [A/B Testing LLM Features — GrowthBook and Statsig](phases/17-infrastructure-and-production/21-ab-testing-llm-features/) | 学习 | Python |
| 22 | [Load Testing LLM APIs — k6, LLMPerf, GenAI-Perf](phases/17-infrastructure-and-production/22-load-testing-llm-apis/) | 构建 | Python |
| 23 | [SRE for AI — Multi-Agent Incident Response](phases/17-infrastructure-and-production/23-sre-for-ai/) | 学习 | Python |
| 24 | [Chaos Engineering for LLM Production](phases/17-infrastructure-and-production/24-chaos-engineering-llm/) | 学习 | Python |
| 25 | [Security — Secrets, PII Scrubbing, Audit Logs](phases/17-infrastructure-and-production/25-security-secrets-audit/) | 学习 | Python |
| 26 | [Compliance — SOC 2, HIPAA, GDPR, EU AI Act, ISO 42001](phases/17-infrastructure-and-production/26-compliance-frameworks/) | 学习 | Python |
| 27 | [FinOps for LLMs — Unit Economics and Multi-Tenant Attribution](phases/17-infrastructure-and-production/27-finops-llms/) | 学习 | Python |
| 28 | [Self-Hosted Serving Selection — llama.cpp, Ollama, TGI, vLLM, SGLang](phases/17-infrastructure-and-production/28-self-hosted-serving-selection/) | 学习 | Python |
</details>
<details id="phase-18">
<summary><b>Phase 18 — Ethics, Safety & Alignment</b> <code>30 lessons</code> <em>构建帮助人类的 AI。这不是可选项。</em></summary>
<br/>
| # | 课程 | 类型 | 语言 |
|:---:|--------|:----:|------|
| 01 | [Instruction-Following as Alignment Signal](phases/18-ethics-safety-alignment/01-instruction-following-alignment-signal/) | 学习 | Python |
| 02 | [Reward Hacking & Goodhart's Law](phases/18-ethics-safety-alignment/02-reward-hacking-goodhart/) | 学习 | Python |
| 03 | [Direct Preference Optimization Family](phases/18-ethics-safety-alignment/03-direct-preference-optimization-family/) | 学习 | Python |
| 04 | [Sycophancy as RLHF Amplification](phases/18-ethics-safety-alignment/04-sycophancy-rlhf-amplification/) | 学习 | Python |
| 05 | [Constitutional AI & RLAIF](phases/18-ethics-safety-alignment/05-constitutional-ai-rlaif/) | 学习 | Python |
| 06 | [Mesa-Optimization & Deceptive Alignment](phases/18-ethics-safety-alignment/06-mesa-optimization-deceptive-alignment/) | 学习 | Python |
| 07 | [Sleeper Agents — Persistent Deception](phases/18-ethics-safety-alignment/07-sleeper-agents-persistent-deception/) | 学习 | Python |
| 08 | [In-Context Scheming in Frontier Models](phases/18-ethics-safety-alignment/08-in-context-scheming-frontier-models/) | 学习 | Python |
| 09 | [Alignment Faking](phases/18-ethics-safety-alignment/09-alignment-faking/) | 学习 | Python |
| 10 | [AI Control — Safety Despite Subversion](phases/18-ethics-safety-alignment/10-ai-control-subversion/) | 学习 | Python |
| 11 | [Scalable Oversight & Weak-to-Strong](phases/18-ethics-safety-alignment/11-scalable-oversight-weak-to-strong/) | 学习 | Python |
| 12 | [Red-Teaming: PAIR & Automated Attacks](phases/18-ethics-safety-alignment/12-red-teaming-pair-automated-attacks/) | 构建 | Python |
| 13 | [Many-Shot Jailbreaking](phases/18-ethics-safety-alignment/13-many-shot-jailbreaking/) | 学习 | Python |
| 14 | [ASCII Art & Visual Jailbreaks](phases/18-ethics-safety-alignment/14-ascii-art-visual-jailbreaks/) | 构建 | Python |
| 15 | [Indirect Prompt Injection](phases/18-ethics-safety-alignment/15-indirect-prompt-injection/) | 构建 | Python |
| 16 | [Red-Team Tooling: Garak, Llama Guard, PyRIT](phases/18-ethics-safety-alignment/16-red-team-tooling-garak-llamaguard-pyrit/) | 构建 | Python |
| 17 | [WMDP & Dual-Use Capability Evaluation](phases/18-ethics-safety-alignment/17-wmdp-dual-use-evaluation/) | 学习 | Python |
| 18 | [Frontier Safety Frameworks — RSP, PF, FSF](phases/18-ethics-safety-alignment/18-frontier-safety-frameworks-rsp-pf-fsf/) | 学习 | Python |
| 19 | [Model Welfare Research](phases/18-ethics-safety-alignment/19-model-welfare-research/) | 学习 | Python |
| 20 | [Bias & Representational Harm](phases/18-ethics-safety-alignment/20-bias-representational-harm/) | 构建 | Python |
| 21 | [Fairness Criteria: Group, Individual, Counterfactual](phases/18-ethics-safety-alignment/21-fairness-criteria-group-individual-counterfactual/) | 学习 | Python |
| 22 | [Differential Privacy for LLMs](phases/18-ethics-safety-alignment/22-differential-privacy-for-llms/) | 构建 | Python |
| 23 | [Watermarking: SynthID, Stable Signature, C2PA](phases/18-ethics-safety-alignment/23-watermarking-synthid-stable-signature-c2pa/) | 构建 | Python |
| 24 | [Regulatory Frameworks: EU, US, UK, Korea](phases/18-ethics-safety-alignment/24-regulatory-frameworks-eu-us-uk-korea/) | 学习 | Python |
| 25 | [EchoLeak & CVEs for AI](phases/18-ethics-safety-alignment/25-echoleak-cves-for-ai/) | 学习 | Python |
| 26 | [Model, System & Dataset Cards](phases/18-ethics-safety-alignment/26-model-system-dataset-cards/) | 构建 | Python |
| 27 | [Data Provenance & Training-Data Governance](phases/18-ethics-safety-alignment/27-data-provenance-training-governance/) | 学习 | Python |
| 28 | [Alignment Research Ecosystem: MATS, Redwood, Apollo, METR](phases/18-ethics-safety-alignment/28-alignment-research-ecosystem/) | 学习 | Python |
| 29 | [Moderation Systems: OpenAI, Perspective, Llama Guard](phases/18-ethics-safety-alignment/29-moderation-systems-openai-perspective-llamaguard/) | 构建 | Python |
| 30 | [Dual-Use Risk: Cyber, Bio, Chem, Nuclear](phases/18-ethics-safety-alignment/30-dual-use-risk-cyber-bio-chem-nuclear/) | 学习 | Python |
</details>
<details id="phase-19">
<summary><b>Phase 19 — Capstone Projects</b> <code>85 lessons</code> <em>17 个端到端产品 + 9 条 deep-build tracks。每个项目 20-40 小时;每条 track 4-12 节课。</em></summary>
<br/>
| # | 项目 | 组合内容 | 语言 |
|:---:|---------|----------|------|
| 01 | [Terminal-Native Coding Agent](phases/19-capstone-projects/01-terminal-native-coding-agent/) | P0 P5 P7 P10 P11 P13 P14 P15 P17 P18 | Python |
| 02 | [RAG over Codebase (Cross-Repo Semantic Search)](phases/19-capstone-projects/02-rag-over-codebase/) | P5 P7 P11 P13 P17 | Python |
| 03 | [Real-Time Voice Assistant (ASR → LLM → TTS)](phases/19-capstone-projects/03-realtime-voice-assistant/) | P6 P7 P11 P13 P14 P17 | Python |
| 04 | [Multimodal Document QA (Vision-First)](phases/19-capstone-projects/04-multimodal-document-qa/) | P4 P5 P7 P11 P12 P17 | Python |
| 05 | [Autonomous Research Agent (AI-Scientist Class)](phases/19-capstone-projects/05-autonomous-research-agent/) | P0 P2 P3 P7 P10 P14 P15 P16 P18 | Python |
| 06 | [DevOps Troubleshooting Agent for Kubernetes](phases/19-capstone-projects/06-devops-troubleshooting-agent/) | P11 P13 P14 P15 P17 P18 | Python |
| 07 | [End-to-End Fine-Tuning Pipeline](phases/19-capstone-projects/07-end-to-end-fine-tuning-pipeline/) | P2 P3 P7 P10 P11 P17 P18 | Python |
| 08 | [Production RAG Chatbot (Regulated Vertical)](phases/19-capstone-projects/08-production-rag-chatbot/) | P5 P7 P11 P12 P17 P18 | Python |
| 09 | [Code Migration Agent (Repo-Level Upgrade)](phases/19-capstone-projects/09-code-migration-agent/) | P5 P7 P11 P13 P14 P15 P17 | Python |
| 10 | [Multi-Agent Software Engineering Team](phases/19-capstone-projects/10-multi-agent-software-team/) | P11 P13 P14 P15 P16 P17 | Python |
| 11 | [LLM Observability & Eval Dashboard](phases/19-capstone-projects/11-llm-observability-dashboard/) | P11 P13 P17 P18 | Python |
| 12 | [Video Understanding Pipeline (Scene → QA)](phases/19-capstone-projects/12-video-understanding-pipeline/) | P4 P6 P7 P11 P12 P17 | Python |
| 13 | [MCP Server with Registry and Governance](phases/19-capstone-projects/13-mcp-server-with-registry/) | P11 P13 P14 P17 P18 | Python |
| 14 | [Speculative-Decoding Inference Server](phases/19-capstone-projects/14-speculative-decoding-server/) | P3 P7 P10 P17 | Python |
| 15 | [Constitutional Safety Harness + Red-Team Range](phases/19-capstone-projects/15-constitutional-safety-harness/) | P10 P11 P13 P14 P18 | Python |
| 16 | [GitHub Issue-to-PR Autonomous Agent](phases/19-capstone-projects/16-github-issue-to-pr-agent/) | P11 P13 P14 P15 P17 | Python |
| 17 | [Personal AI Tutor (Adaptive, Multimodal)](phases/19-capstone-projects/17-personal-ai-tutor/) | P5 P6 P11 P12 P14 P17 P18 | Python |
**Deep-build tracks** — 多节课串联的系列,从零构建一个完整子系统。
| # | 项目 | 组合内容 | 语言 |
|:---:|---------|----------|------|
| 20 | [Agent Harness Loop Contract](phases/19-capstone-projects/20-agent-harness-loop-contract/) | A. Agent harness | Python |
| 21 | [Tool Registry with Schema Validation](phases/19-capstone-projects/21-tool-registry-schema-validation/) | A. Agent harness | Python |
| 22 | [JSON-RPC 2.0 Over Newline-Delimited Stdio](phases/19-capstone-projects/22-jsonrpc-stdio-transport/) | A. Agent harness | Python |
| 23 | [Function Call Dispatcher](phases/19-capstone-projects/23-function-call-dispatcher/) | A. Agent harness | Python |
| 24 | [Plan-Execute Control Flow](phases/19-capstone-projects/24-plan-execute-control-flow/) | A. Agent harness | Python |
| 25 | [Verification Gates and Observation Budget](phases/19-capstone-projects/25-verification-gates-observation-budget/) | A. Agent harness | Python |
| 26 | [Sandbox Runner with Denylist and Path Jail](phases/19-capstone-projects/26-sandbox-runner-denylist/) | A. Agent harness | Python |
| 27 | [Eval Harness with Fixture Tasks](phases/19-capstone-projects/27-eval-harness-fixture-tasks/) | A. Agent harness | Python |
| 28 | [Observability with OTel GenAI Spans and Prometheus Metrics](phases/19-capstone-projects/28-observability-otel-traces/) | A. Agent harness | Python |
| 29 | [End-to-End Coding Agent on the Harness](phases/19-capstone-projects/29-end-to-end-coding-task-demo/) | A. Agent harness | Python |
| 30 | [BPE Tokenizer From Scratch](phases/19-capstone-projects/30-bpe-tokenizer-from-scratch/) | B. NLP LLM | Python |
| 31 | [Tokenized Dataset with Sliding Window](phases/19-capstone-projects/31-tokenized-dataset-sliding-window/) | B. NLP LLM | Python |
| 32 | [Token and Positional Embeddings](phases/19-capstone-projects/32-token-positional-embeddings/) | B. NLP LLM | Python |
| 33 | [Multi-Head Self-Attention](phases/19-capstone-projects/33-multihead-self-attention/) | B. NLP LLM | Python |
| 34 | [Transformer Block from Scratch](phases/19-capstone-projects/34-transformer-block/) | B. NLP LLM | Python |
| 35 | [GPT Model Assembly](phases/19-capstone-projects/35-gpt-model-assembly/) | B. NLP LLM | Python |
| 36 | [Training Loop and Evaluation](phases/19-capstone-projects/36-training-loop-eval/) | B. NLP LLM | Python |
| 37 | [Loading Pretrained Weights](phases/19-capstone-projects/37-loading-pretrained-weights/) | B. NLP LLM | Python |
| 38 | [Classifier Fine-Tuning by Head Swap](phases/19-capstone-projects/38-classifier-finetuning/) | B. NLP LLM | Python |
| 39 | [Instruction Tuning by Supervised Fine-Tuning](phases/19-capstone-projects/39-instruction-tuning-sft/) | B. NLP LLM | Python |
| 40 | [Direct Preference Optimization from Scratch](phases/19-capstone-projects/40-dpo-from-scratch/) | B. NLP LLM | Python |
| 41 | [Full Evaluation Pipeline](phases/19-capstone-projects/41-eval-pipeline/) | B. NLP LLM | Python |
| 42 | [Large Corpus Downloader](phases/19-capstone-projects/42-large-corpus-downloader/) | C. Train end-to-end | Python |
| 43 | [HDF5 Tokenized Corpus](phases/19-capstone-projects/43-hdf5-tokenized-corpus/) | C. Train end-to-end | Python |
| 44 | [Cosine LR with Linear Warmup](phases/19-capstone-projects/44-cosine-lr-warmup/) | C. Train end-to-end | Python |
| 45 | [Gradient Clipping and Mixed Precision](phases/19-capstone-projects/45-gradient-clipping-amp/) | C. Train end-to-end | Python |
| 46 | [Gradient Accumulation](phases/19-capstone-projects/46-gradient-accumulation/) | C. Train end-to-end | Python |
| 47 | [Checkpoint Save and Resume](phases/19-capstone-projects/47-checkpoint-save-resume/) | C. Train end-to-end | Python |
| 48 | [Distributed Data Parallel and FSDP from Scratch](phases/19-capstone-projects/48-distributed-fsdp-ddp/) | C. Train end-to-end | Python |
| 49 | [Language Model Evaluation Harness](phases/19-capstone-projects/49-lm-eval-harness/) | C. Train end-to-end | Python |
| 50 | [Hypothesis Generator](phases/19-capstone-projects/50-hypothesis-generator/) | D. Auto research | Python |
| 51 | [Literature Retrieval](phases/19-capstone-projects/51-literature-retrieval/) | D. Auto research | Python |
| 52 | [Experiment Runner](phases/19-capstone-projects/52-experiment-runner/) | D. Auto research | Python |
| 53 | [Result Evaluator](phases/19-capstone-projects/53-result-evaluator/) | D. Auto research | Python |
| 54 | [Paper Writer](phases/19-capstone-projects/54-paper-writer/) | D. Auto research | Python |
| 55 | [Critic Loop](phases/19-capstone-projects/55-critic-loop/) | D. Auto research | Python |
| 56 | [Iteration Scheduler](phases/19-capstone-projects/56-iteration-scheduler/) | D. Auto research | Python |
| 57 | [End-to-End Research Demo](phases/19-capstone-projects/57-end-to-end-research-demo/) | D. Auto research | Python |
| 58 | [视觉编码器 Patches](phases/19-capstone-projects/58-vision-encoder-patches/) | E. Multimodal VLM | Python |
| 59 | [Vision Transformer 编码器](phases/19-capstone-projects/59-vit-transformer/) | E. Multimodal VLM | Python |
| 60 | [用于模态对齐的投影层](phases/19-capstone-projects/60-projection-layer-modality-align/) | E. Multimodal VLM | Python |
| 61 | [Cross-Attention 融合](phases/19-capstone-projects/61-cross-attention-fusion/) | E. Multimodal VLM | Python |
| 62 | [视觉-语言预训练](phases/19-capstone-projects/62-vision-language-pretraining/) | E. Multimodal VLM | Python |
| 63 | [Multimodal评估](phases/19-capstone-projects/63-multimodal-eval/) | E. Multimodal VLM | Python |
| 64 | [Chunking 策略比较](phases/19-capstone-projects/64-chunking-strategies-advanced/) | F. Advanced RAG | Python |
| 65 | [BM25 与 Dense Embeddings 混合检索](phases/19-capstone-projects/65-hybrid-retrieval-bm25-dense/) | F. Advanced RAG | Python |
| 66 | [Cross-Encoder Reranker](phases/19-capstone-projects/66-reranker-cross-encoder/) | F. Advanced RAG | Python |
| 67 | [查询重写:HyDE、Multi-Query 与分解](phases/19-capstone-projects/67-query-rewriting-hyde/) | F. Advanced RAG | Python |
| 68 | [RAG 评估:Precision、Recall、MRR、nDCG、Faithfulness、Answer Relevance](phases/19-capstone-projects/68-rag-eval-precision-recall/) | F. Advanced RAG | Python |
| 69 | [端到端 RAG 系统](phases/19-capstone-projects/69-end-to-end-rag-system/) | F. Advanced RAG | Python |
| 70 | [Task Spec 格式](phases/19-capstone-projects/70-task-spec-format/) | G. Eval framework | Python |
| 71 | [经典指标](phases/19-capstone-projects/71-classical-metrics/) | G. Eval framework | Python |
| 72 | [代码执行指标](phases/19-capstone-projects/72-code-exec-metric/) | G. Eval framework | Python |
| 73 | [Perplexity 与 Calibration](phases/19-capstone-projects/73-perplexity-calibration/) | G. Eval framework | Python |
| 74 | [Leaderboard 聚合](phases/19-capstone-projects/74-leaderboard-aggregation/) | G. Eval framework | Python |
| 75 | [端到端 Eval Runner](phases/19-capstone-projects/75-end-to-end-eval-runner/) | G. Eval framework | Python |
| 76 | [从零实现 Collective Ops](phases/19-capstone-projects/76-collective-ops-from-scratch/) | H. Distributed train | Python |
| 77 | [从零实现 Data Parallel DDP](phases/19-capstone-projects/77-data-parallel-ddp/) | H. Distributed train | Python |
| 78 | [ZeRO Optimizer State Sharding](phases/19-capstone-projects/78-zero-parameter-sharding/) | H. Distributed train | Python |
| 79 | [Pipeline Parallel 与 Bubble 分析](phases/19-capstone-projects/79-pipeline-parallel/) | H. Distributed train | Python |
| 80 | [Sharded Checkpoint 与 Atomic Resume](phases/19-capstone-projects/80-checkpoint-sharded-resume/) | H. Distributed train | Python |
| 81 | [端到端分布式训练](phases/19-capstone-projects/81-end-to-end-distributed-train/) | H. Distributed train | Python |
| 82 | [Jailbreak Taxonomy](phases/19-capstone-projects/82-jailbreak-taxonomy/) | I. Safety harness | Python |
| 83 | [Prompt Injection Detector](phases/19-capstone-projects/83-prompt-injection-detector/) | I. Safety harness | Python |
| 84 | [Refusal Evaluation](phases/19-capstone-projects/84-refusal-evaluation/) | I. Safety harness | Python |
| 85 | [Content Classifier Integration](phases/19-capstone-projects/85-content-classifier-integration/) | I. Safety harness | Python |
| 86 | [Constitutional Rules Engine](phases/19-capstone-projects/86-constitutional-rules-engine/) | I. Safety harness | Python, YAML |
| 87 | [端到端 Safety Gate](phases/19-capstone-projects/87-end-to-end-safety-gate/) | I. Safety harness | Python |
</details>
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
## 工具包
每节课都会产出一个可复用 artifact。完成后你会拥有:
```text
outputs/
├── prompts/ 各类 AI 任务的提示词模板 (Prompt templates)
└── skills/ 面向 AI 编程智能体的技能文件 (SKILL.md)
```
接入 Claude、Cursor、Codex、OpenClaw、Hermes,或任何读取 SKILL.md / AGENTS.md 目录的 agent。是真工具,不是作业。
### 将课程 skills 安装到你的 agent 中
两套 skills,两个安装程序:
**学习类 skills**(`start-learning`、`learn`、`course-guide`、`learn-mcp`、`learn-agent-skills`、`claude-certification`、`mcpa-certification`、`find-your-level` 和 `check-understanding`)位于 [`skills/`](skills/) 下,只需一条命令即可安装到支持 skills 的宿主中。安装需要 Node.js 和 `npx`,无需克隆仓库或安装 Python:
```bash
npx skills add cluster1900/ai-engineering-from-scratch-zh
```
`skills` 会写入安装期间选择的宿主与作用域,例如 `.claude/skills/`、`.cursor/skills/`、`.codex/skills/` 或其他受支持的 skills 目录。请确认所选宿主能检索到该目标路径。
**课程产物(The lesson artifacts)。** The repo ships 396 skills and 99 prompts(本 repo 提供了 396 个 skill 和 99 个 prompt,位于 `phases/**/outputs/`);你可以通过 `scripts/install_skills.py` 进行离线安装或自定义布局。需要先克隆仓库。支持按标签过滤、dry-run 预览以及按 agent 布局:
```bash
python3 scripts/install_skills.py <target> # 所有 skill,默认 --layout skills(嵌套目录)
python3 scripts/install_skills.py <target> --layout skills # 同上,显式指定
python3 scripts/install_skills.py <target> --type all # skills + prompts + agents
python3 scripts/install_skills.py <target> --phase 14 # 仅限单个 phase
python3 scripts/install_skills.py <target> --tag rag # 按标签过滤
python3 scripts/install_skills.py <target> --layout flat # 平铺文件
python3 scripts/install_skills.py <target> --dry-run # 预览而不写入
python3 scripts/install_skills.py <target> --force # 强制覆盖已有文件
```
`<target>` 是你的 agent 的 skills 目录,例如 `~/.claude/skills/`、`~/.cursor/skills/`、`~/.config/openclaw/skills/`、`.skills/`,或 agent 会读取的任意路径。
默认情况下,如果目标位置已有文件,脚本会拒绝覆盖,并在列出所有冲突路径后以 code 1 退出。使用 `--dry-run` 预览冲突,或使用 `--force` 覆盖。每次非 dry-run 运行都会在目标目录写入一个 `manifest.json`,其中包含按 type 和 phase 分组的完整清单。选择你的 agent 能读取的布局:
| `--layout` | 写入路径 |
|---|---|
| `skills` | `<target>/<name>/SKILL.md`(嵌套约定,Claude / Cursor / Codex / OpenClaw / Hermes 均支持) |
| `by-phase` | `<target>/phase-NN/<name>.md` |
| `flat` | `<target>/<name>.md` |
### 将 agent workbench 放入你自己的 repo
Phase 14 capstone 提供一个可复用的 Agent Workbench pack(AGENTS.md、schemas、init / verify / handoff scripts)。用以下命令将它 scaffold 到任意 repo:
```bash
python3 scripts/scaffold_workbench.py path/to/your-repo # 完整工具包 + 种子文件
python3 scripts/scaffold_workbench.py path/to/your-repo --minimal # 跳过 docs/
python3 scripts/scaffold_workbench.py path/to/your-repo --dry-run # 仅预览
python3 scripts/scaffold_workbench.py path/to/your-repo --force # 强制覆盖
```
你会得到已连接好的七个 workbench surfaces、一个 starter `task_board.json`,以及一个位于 `schema_version: 1` 的全新 `agent_state.json`。然后:编辑 task,编辑 `AGENTS.md`,运行 `scripts/init_agent.py`,把 contract 交给你的 agent。pack source 位于 `phases/14-agent-engineering/42-agent-workbench-capstone/outputs/agent-workbench-pack/`。
### 以 JSON 浏览整个课程
`scripts/build_catalog.py` 会遍历磁盘上的每个 Phase、每节课、每个 artifact,并在 repo root 写入 `catalog.json`。一个文件,包含课程的全部事实源。
```bash
python3 scripts/build_catalog.py # 写入 <repo>/catalog.json
python3 scripts/build_catalog.py --stdout # 输出至 stdout,不修改本地仓库
python3 scripts/build_catalog.py --out path/to/file.json
```
catalog 来源于 filesystem,而不是 README,因此计数始终与磁盘上的实际内容一致。可将它用于 site builds、下游 tooling,或验证 README 计数是否发生漂移。Schema 记录在脚本顶部。
GitHub Action(`.github/workflows/curriculum.yml`)会在每个 PR 上重建 `catalog.json`,如果已提交文件过期,就让 build 失败。编辑任意课程后,运行 `python3 scripts/build_catalog.py` 并提交结果,否则 CI 会拒绝 PR。同一个 workflow 会以 warn-only 模式运行 `audit_lessons.py`(因此已有漂移不会阻塞 contributors)。
### Smoke-check 每节课的 Python 代码
`scripts/lesson_run.py` 会 byte-compile 每节课 `code/` 目录下的每个 `.py` 文件。默认模式只做 syntax-check —— 不执行代码,不需要 API keys,也不需要 heavy ML deps。它能捕获 contributors 最常引入的 regressions(错误缩进、损坏的 f-strings、误改内容)。
```bash
python3 scripts/lesson_run.py # 对整个课程做语法检查
python3 scripts/lesson_run.py --phase 14 # 仅检查单个 phase
python3 scripts/lesson_run.py --json # 在 stdout 输出 JSON 报告
python3 scripts/lesson_run.py --strict # 任何课程失败则以 1 退出
python3 scripts/lesson_run.py --execute # 真实运行,每课限时 10 秒
```
`--execute` 会以 10 秒 timeout 运行每节课的 `code/main.py`(或第一个 `.py` 文件)。如果课程入口文件以 `# requires: pkg1, pkg2` 注释开头并列出非 stdlib deps,该课程会以原因 `needs <deps>` 被跳过。该脚本是 opt-in,未接入 CI。
仅使用 stdlib,Python 3.10+。设置 `LINK_CHECK_SKIP=domain1,domain2` 可覆盖默认 skip-list(`twitter.com`、`x.com`、`linkedin.com`、`instagram.com`、`medium.com` —— 这些 domains 会强力阻止自动化 HEAD/GET)。
## 从哪里开始
| 背景 | 起点 | 预计时间 |
|---|---|---|
| 编程和 AI 新手 | Phase 0 — Setup | ~306 小时 |
| 会 Python,ML 新手 | Phase 1 — Math Foundations | ~270 小时 |
| 会 ML,Deep Learning 新手 | Phase 3 — Deep Learning Core | ~200 小时 |
| 会 Deep Learning,想学 LLMs 和 agents | Phase 10 — LLMs from Scratch | ~100 小时 |
| Senior engineer,只想学 agent engineering | Phase 14 — Agent Engineering | ~60 小时 |
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
## 为什么此刻很重要
<table>
<tr>
<th align="left" width="50%"><sub>FIG_003 · A</sub><br/><b>行业信号</b></th>
<th align="left" width="50%"><sub>FIG_003 · B</sub><br/><b>覆盖的基础 paper</b></th>
</tr>
<tr>
<td valign="top">
> *“最热门的新编程语言是英语。”*<br/>
> — **Andrej Karpathy** ([tweet](https://x.com/karpathy/status/1617979122625712128))
> *“Software engineering 正在我们眼前被重塑。”*<br/>
> — **Boris Cherny**,Claude Code 创建者
> *“模型会持续变强。真正复利增长的能力,是**知道该构建什么**。”*<br/>
> — 行业共识,2026
</td>
<td valign="top">
- *Attention Is All You Need* — Vaswani et al., 2017 → [Phase 7](#phase-7)
- *Language Models are Few-Shot Learners* (GPT-3) → [Phase 10](#phase-10)
- *Denoising Diffusion Probabilistic Models* → [Phase 8](#phase-8)
- *InstructGPT / RLHF* → [Phase 10](#phase-10)
- *Direct Preference Optimization* → [Phase 10](#phase-10)
- *Chain-of-Thought Prompting* → [Phase 11](#phase-11)
- *ReAct: Reasoning + Acting in LLMs* → [Phase 14](#phase-14)
- *Model Context Protocol* — Anthropic → [Phase 13](#phase-13)
</td>
</tr>
</table>
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
## 贡献
| 目标 | 阅读 |
|---|---|
| 贡献一节课或修复问题 | [CONTRIBUTING.md](CONTRIBUTING.md) |
| 为你的团队或学校 fork | [FORKING.md](FORKING.md) |
| 课程模板 | [LESSON_TEMPLATE.md](LESSON_TEMPLATE.md) |
| 跟踪进度 | [ROADMAP.md](ROADMAP.md) |
| 术语表 | [glossary/terms.md](glossary/terms.md) |
| 行为准则 | [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) |
提交课程前,运行 invariant check:
```bash
python3 scripts/audit_lessons.py # 检查完整课程
python3 scripts/audit_lessons.py --phase 14 # 仅检查单个 phase
python3 scripts/audit_lessons.py --json # 输出 CI 友好格式
```
当任何规则失败时,exit code 非零。规则(L001–L010)会校验目录
shape、`docs/en.md` 是否存在 + H1、`code/` 是否非空、`quiz.json` schema
(拒绝导致 issue #102 的 legacy `q/choices/answer` keys),以及
课程 docs 中的相对链接。
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
<a id="supporters"></a>
## Sponsor the work
免费,MIT-licensed,523 节课。感谢所有让这项工作成为可能的赞助者和支持者。[查看所有赞助者与支持者](BACKERS.md)。
想要支持本项目?请查看 [赞助方案选项](SPONSORS.md),包括 [硬件实验室合作伙伴](SPONSORS.md#hardware-lab-partner),或前往 [GitHub Sponsors 赞助](https://github.com/sponsors/rohitg00)。
```text
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒
```
## Star history
<a href="https://star-history.com/#cluster1900/ai-engineering-from-scratch-zh&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=cluster1900/ai-engineering-from-scratch-zh&type=Date&theme=dark">
<img alt="Star history" src="https://api.star-history.com/svg?repos=cluster1900/ai-engineering-from-scratch-zh&type=Date" width="100%">
</picture>
</a>
如果这本手册帮到了你,请给 repo 点 star。它能让这个项目继续存在。
## License
MIT。按你想要的方式使用它 —— fork、教学、出售、交付都可以。欢迎署名,
但不强制。
中文版由 [cluster1900](https://github.com/cluster1900) 和贡献者维护,源自 [Rohit Ghumare](https://github.com/rohitg00) 的原始课程。
<sub>
<a href="https://github.com/cluster1900">@cluster1900</a> ·
<a href="https://ai-learn.agent-buy.com">ai-learn.agent-buy.com</a> ·
<a href="https://github.com/cluster1900/ai-engineering-from-scratch-zh/issues/new/choose">报告 / 建议</a>
</sub>
连接信息
猜你喜欢
暂无推荐服务器