完整互动讲义Complete interactive guide

7 册 · 22 学习单元 · 中英双语7 volumes · 22 source units · bilingual

不只会调用模型。把它做成能失败、能验证、能回滚的产品。Go beyond calling a model. Build a product that can fail, verify, and roll back.

这套讲义覆盖 1 个环境准备单元和 21 个正式课程单元,用“面试准备助手”贯穿全部章节。英文原课内容用中英双语原创教学重构,不做逐句翻译。

This guide covers one setup unit plus 21 formal lessons through a running Interview Assistant. It is an original bilingual teaching reconstruction, not a line-by-line translation.

7volumes
22units
44个例子examples
62个术语terms

学完能做什么Observable outcomes

不是“看懂了”,而是能解释、能判断、能交付Not just recognition: explain, judge, and deliver

能解释模型Explain the model

说清 token、上下文、采样、幻觉与证据的关系。

Explain the relationship among tokens, context, sampling, hallucination, and evidence.

能构建应用Build the app

实现结构化输出、聊天状态、搜索、RAG、工具和降级。

Implement structured output, chat state, search, RAG, tools, and fallback.

能管理风险Manage risk

处理隐私、注入、权限、内容安全、成本和高风险确认。

Handle privacy, injection, permissions, safety, cost, and high-risk approval.

能持续交付Deliver continuously

建立评估集、版本、监控、模型路由和回滚。

Build evaluation sets, versioning, monitoring, model routing, and rollback.

30 分钟快速路径30-minute fast path

先搭地图,再回到完整路线Build the map, then take the full route

快速路径先建立模型、提示、调用、状态、证据、工具、安全和生命周期地图;完整路径再进入图像、低代码、开放模型与具体模型家族。

The fast path maps models, prompts, calls, state, evidence, tools, safety, and lifecycle; the full path adds images, low-code, open models, and model families.

边界提醒Boundary

课程涉及的产品、型号、价格和平台会快速变化。本讲义只把它们作为工程选择案例;动手前必须回到当前官方模型卡、API 与许可证。

Products, model names, prices, and platforms change rapidly. They are treated as engineering-choice examples; verify current official model cards, APIs, and licenses before implementation.

第一册 · 准备与模型基础Volume 1 · Setup and model foundations

先知道模型是什么,也知道它不是什么Know what the model is—and is not

环境、模型选择和责任边界一起构成第一层地基。

Environment, model selection, and responsibility form the first foundation.

本册作品里程碑Portfolio milestone

完成可离线运行、带成本与风险边界的最小调用。

Deliver a mockable minimal call with cost and risk boundaries.

01

环境准备Course setup

把环境、凭证和成本边界先准备好Getting Started with this course

先回答一个白话问题Start with a plain question

可复现环境与安全配置是生成式 AI 应用的第一层可靠性。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

A reproducible environment and safe configuration form the first reliability layer of a GenAI app. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像开工作室前先接好电、划出预算、把钥匙放进保险柜。

It is like wiring a workshop, setting a budget, and storing keys safely before production.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

隔离 Python 环境,使用环境变量/密钥管理,选择沙箱或模拟响应,并记录模型、API 版本和费用上限。

Isolate the Python environment, use environment variables or a secret manager, provide mock responses, and record model/API versions and spend limits.

例子 1 · 无密钥模式Example 1 · No-key mode
输入Input
没有 API 账号No API account
过程Process
用固定 JSON 模拟模型响应Use fixed JSON model responses
结果 / 验收Result / check
页面、解析与测试仍可开发UI, parsing, and tests remain buildable
例子 2 · 费用护栏Example 2 · Cost guardrail
输入Input
每日 1 美元预算A $1 daily budget
过程Process
限制请求、token 与并发Cap requests, tokens, and concurrency
结果 / 验收Result / check
超过预算停止并显示原因Stop with an explanation when the budget is reached
常见误区Common misconception

把 API key 写进 notebook 后上传 Git,删除文件也不代表历史里没有秘密。

Committing an API key in a notebook; deleting the file does not remove it from history.

作品任务Portfolio task

建立面试助手项目:env.example、mock 模式、依赖锁定、预算配置和启动检查。

Scaffold the Interview Assistant with env.example, mock mode, pinned dependencies, budget config, and startup checks.

验收:Acceptance: 无真实密钥可跑全部界面与测试;缺配置时安全失败且不打印秘密。The UI and tests run without a real key; missing config fails safely without printing secrets.

自测:“把环境、凭证和成本边界先准备好”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Getting Started with this course”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“无真实密钥可跑全部界面与测试;缺配置时安全失败且不打印秘密。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: The UI and tests run without a real key; missing config fails safely without printing secrets.

对应来源单元:Source unit: 官方课程 · 00-course-setupOfficial lesson · 00-course-setup
02

第 1 课Lesson 1

生成式 AI 与大语言模型的最小心智模型Introduction to Generative AI and Large Language Models

先回答一个白话问题Start with a plain question

大语言模型按上下文预测后续 token,流畅不等于掌握事实。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

An LLM predicts subsequent tokens from context; fluency is not factual knowledge. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像读过大量文本的即兴写作者,擅长续写和改写,却没有自动连接事实数据库。

It resembles an improvisational writer trained on vast text, skilled at continuation without an automatic factual database.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

消息、token、上下文窗口、采样和系统指令共同影响输出;需要外部数据和验证补足事实性。

Messages, tokens, context windows, sampling, and system instructions shape output; external data and verification supply factual grounding.

例子 1 · 流畅幻觉Example 1 · Fluent hallucination
输入Input
要求列不存在的公司政策Ask for a nonexistent company policy
过程Process
模型按常见格式补全The model completes a plausible pattern
结果 / 验收Result / check
格式像真的,事实却无来源It looks real but has no source
例子 2 · 受控改写Example 2 · Controlled rewrite
输入Input
用户提供一段项目经历User-provided project experience
过程Process
只压缩与重排,不增加事实Compress and reorder without adding facts
结果 / 验收Result / check
每条信息可回指输入Every claim traces to the input
常见误区Common misconception

把模型称为“知识库”,然后用自信语气代替来源。

Calling the model a knowledge base and substituting confidence for sources.

作品任务Portfolio task

实现“只依据用户材料改写”的最小调用,并在输出旁显示输入证据。

Implement a minimal “rewrite only from user material” call and show source evidence beside output.

验收:Acceptance: 加入不存在事实的压力样本时,系统拒绝补写并指出材料不足。On a missing-fact stress case, the system refuses invention and identifies missing material.

自测:“生成式 AI 与大语言模型的最小心智模型”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Introduction to Generative AI and Large Language Models”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“加入不存在事实的压力样本时,系统拒绝补写并指出材料不足。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: On a missing-fact stress case, the system refuses invention and identifies missing material.

对应来源单元:Source unit: 官方课程 · 01-introduction-to-genaiOfficial lesson · 01-introduction-to-genai
03

第 2 课Lesson 2

比较模型:按任务、质量、延迟和成本选Exploring and comparing different LLMs

先回答一个白话问题Start with a plain question

没有脱离任务的“最好模型”,只有在约束下更合适的选择。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

There is no task-independent best model, only a better fit under constraints. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像选交通工具:高铁、地铁和自行车各自在距离、费用和灵活性上不同。

It is like choosing transport: rail, metro, and bicycle trade distance, cost, and flexibility.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

用固定数据集比较格式遵循、事实性、关键错误、延迟、token 与价格,并记录具体版本。

Compare formatting, grounding, critical errors, latency, tokens, and price on a fixed dataset, recording exact versions.

例子 1 · 小模型胜出Example 1 · Small model wins
输入Input
把经历分类成五类Classify experience into five types
过程Process
比较大模型与小模型Compare a large and small model
结果 / 验收Result / check
小模型同样准确且更快便宜The small model is equally accurate, faster, and cheaper
例子 2 · 长文本取舍Example 2 · Long-context trade-off
输入Input
十份长职位说明Ten long job postings
过程Process
比较直接塞入与先检索Compare stuffing all text with retrieval first
结果 / 验收Result / check
长窗口更贵且仍会忽略细节Long context costs more and still misses detail
常见误区Common misconception

看公开排行榜选模型,却不跑自己的中文、格式和安全样本。

Choosing from a public leaderboard without testing your Chinese, formatting, and safety cases.

作品任务Portfolio task

做 20 条模型选择集,记录两种模型的质量、p95、token、成本和失败类别。

Create a 20-case model-selection set and record quality, p95, tokens, cost, and failure types for two models.

验收:Acceptance: 模型选择能由数据与约束复现,且写有切换条件。The model choice is reproducible from evidence and includes switching conditions.

自测:“比较模型:按任务、质量、延迟和成本选”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Exploring and comparing different LLMs”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“模型选择能由数据与约束复现,且写有切换条件。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: The model choice is reproducible from evidence and includes switching conditions.

04

第 3 课Lesson 3

负责任地使用生成式 AIUsing Generative AI Responsibly

先回答一个白话问题Start with a plain question

责任设计覆盖数据、输出、用户、受影响者和申诉,而非一段免责声明。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

Responsible design covers data, outputs, users, affected people, and appeals—not one disclaimer. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像医疗器械既要说明用途,还要临床验证、风险分级和人工负责。

Like a medical device, it needs intended use, validation, risk tiers, and accountable humans.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

列出伤害、隐私、偏见、版权、未成年人和自动化边界;高风险建议必须有人类判断。

Map harms, privacy, bias, copyright, minors, and automation boundaries; high-risk advice requires human judgment.

例子 1 · 简历筛选边界Example 1 · Resume-screening boundary
输入Input
候选人材料Candidate materials
过程Process
只帮用户整理,不自动淘汰他人Assist organization; do not auto-reject people
结果 / 验收Result / check
用途限制写进 UI 与服务层Limits live in UI and service logic
例子 2 · 敏感信息Example 2 · Sensitive information
输入Input
身份证与健康信息ID and health data
过程Process
上传前检测并遮盖Detect and redact before sending
结果 / 验收Result / check
模型供应商不接收不必要数据The provider receives no unnecessary data
常见误区Common misconception

用户点了“同意”就认为可以上传任何第三方隐私。

Treating user consent as permission to upload any third-party private data.

作品任务Portfolio task

写风险登记表:场景、伤害、概率、严重度、预防、检测、处置和负责人。

Create a risk register: scenario, harm, likelihood, severity, prevention, detection, response, and owner.

验收:Acceptance: 至少一个风险由技术边界阻断,不只靠提示语。At least one risk is blocked by a technical boundary, not only warning text.

自测:“负责任地使用生成式 AI”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Using Generative AI Responsibly”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“至少一个风险由技术边界阻断,不只靠提示语。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: At least one risk is blocked by a technical boundary, not only warning text.

第二册 · 提示与文本/聊天Volume 2 · Prompts, text, and chat

把生成变成可检查、可恢复的流程Turn generation into a checkable, recoverable flow

从任务契约走向多阶段提示、可靠调用与会话状态。

Move from task contracts to staged prompts, reliable calls, and session state.

本册作品里程碑Portfolio milestone

交付证据抽取—草稿—验证聊天工作流。

Deliver an evidence-extract, draft, and verify chat workflow.

05

第 4 课Lesson 4

提示词基础:把任务写成可检查契约Prompt Engineering Fundamentals

先回答一个白话问题Start with a plain question

好提示词明确目标、上下文、约束、输出结构和拒绝条件。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

A good prompt defines goal, context, constraints, output shape, and refusal conditions. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像交给新同事一张工作单:做什么、用哪些材料、交什么格式、哪里要停。

It is like a work order for a new colleague: task, materials, format, and stop conditions.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

分离系统规则、用户输入和外部数据;使用 schema 与示例,避免用空泛形容词代替验收。

Separate system rules, user input, and external data; use schemas and examples instead of vague adjectives.

例子 1 · 空泛要求Example 1 · Vague request
输入Input
“帮我写好一点”“Make it better”
过程Process
改成受众、长度、证据和格式Specify audience, length, evidence, and format
结果 / 验收Result / check
结果能按清单验收Output is checkable against a list
例子 2 · 结构化输出Example 2 · Structured output
输入Input
一段职位说明A job posting
过程Process
要求 JSON 字段和缺失值 nullRequire JSON fields and null for missing values
结果 / 验收Result / check
解析器稳定,缺失不编造Parsing is stable; missing values are not invented
常见误区Common misconception

把“不要幻觉”写十遍,仍不给模型可用事实或验证链。

Repeating “do not hallucinate” without supplying facts or verification.

作品任务Portfolio task

把面试问题生成提示重写成任务契约,并建立五条正反样本。

Rewrite the interview-question prompt as a task contract with five positive and negative cases.

验收:Acceptance: 输出可机器解析;缺证据时返回明确状态;示例外输入也保持结构。Output parses, missing evidence returns an explicit state, and unseen inputs preserve structure.

自测:“提示词基础:把任务写成可检查契约”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Prompt Engineering Fundamentals”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“输出可机器解析;缺证据时返回明确状态;示例外输入也保持结构。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Output parses, missing evidence returns an explicit state, and unseen inputs preserve structure.

06

第 5 课Lesson 5

高级提示:分解、示例、反思与边界Creating Advanced Prompts

先回答一个白话问题Start with a plain question

复杂任务需要分阶段证据与检查点,而不是无限延长一条提示。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

Complex tasks need staged evidence and checkpoints, not an endlessly longer prompt. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像编辑部先定选题、核资料、写稿、校对,而不是让一人一口气交最终刊物。

Like an editorial workflow: scope, verify, draft, and edit rather than demanding a final issue in one breath.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

少样本示例、角色分工、链式步骤和自检可提高一致性,但关键事实仍需外部验证。

Few-shot examples, role separation, staged steps, and self-checks improve consistency, while critical facts still need external verification.

例子 1 · 示例校准Example 1 · Few-shot calibration
输入Input
三种项目经历Three project experiences
过程Process
给合格/不合格输出示例Provide good and bad output examples
结果 / 验收Result / check
边界风格更一致Boundary behavior becomes consistent
例子 2 · 分阶段生成Example 2 · Staged generation
输入Input
长简历与岗位说明Long resume and posting
过程Process
先抽证据,再匹配,再写回答Extract evidence, match, then draft
结果 / 验收Result / check
每步都可检查和重跑Each step is inspectable and rerunnable
常见误区Common misconception

把模型的“自我反思”当成事实核查;它可能用更流畅语言重复同一错误。

Treating model self-reflection as fact-checking; it may repeat the same error more fluently.

作品任务Portfolio task

把 STAR 回答生成拆成证据抽取、差距判断、草稿、验证四步。

Split STAR-answer generation into evidence extraction, gap judgment, draft, and verification.

验收:Acceptance: 任一步失败可单独重跑;最终每句话关联用户证据或标注为建议。Any stage reruns independently; each final sentence links to user evidence or is marked as advice.

自测:“高级提示:分解、示例、反思与边界”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Creating Advanced Prompts”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“任一步失败可单独重跑;最终每句话关联用户证据或标注为建议。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Any stage reruns independently; each final sentence links to user evidence or is marked as advice.

对应来源单元:Source unit: 官方课程 · 05-advanced-promptsOfficial lesson · 05-advanced-prompts
07

第 6 课Lesson 6

构建文本生成应用:从调用到可靠输出Building Text Generation Applications

先回答一个白话问题Start with a plain question

文本生成应用需要处理超时、重试、流式、解析、费用和降级。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

A text-generation app must handle timeout, retry, streaming, parsing, cost, and fallback. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像印刷服务:写稿只是一步,排版、校样、失败重印和预算同样重要。

Like a print service: drafting is one step among layout, proofing, retry, and budgeting.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

封装 provider 客户端,设置超时与有界重试,记录用量,结构化验证输出并提供 mock/fallback。

Wrap the provider client, set timeout and bounded retries, record usage, validate structured output, and provide mocks or fallback.

例子 1 · 有界重试Example 1 · Bounded retry
输入Input
一次 429 限流One 429 rate limit
过程Process
指数退避并最多重试两次Back off exponentially, retry at most twice
结果 / 验收Result / check
不形成无限请求风暴No infinite request storm
例子 2 · 解析失败Example 2 · Parse failure
输入Input
模型返回缺字段 JSONJSON missing a required field
过程Process
schema 校验后请求修复一次Validate schema and request one repair
结果 / 验收Result / check
仍失败则保留原响应并告知用户If still invalid, preserve raw output and notify the user
常见误区Common misconception

所有错误都重试;权限错误和坏输入重试多少次都不会好。

Retrying every error; permission failures and invalid input do not improve with repetition.

作品任务Portfolio task

实现 provider 抽象、mock、超时、重试、用量记录和 schema 校验。

Implement provider abstraction, mock, timeout, retry, usage logging, and schema validation.

验收:Acceptance: 离线测试覆盖成功、限流、超时、坏 JSON 和预算耗尽。Offline tests cover success, rate limit, timeout, invalid JSON, and exhausted budget.

自测:“构建文本生成应用:从调用到可靠输出”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Building Text Generation Applications”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“离线测试覆盖成功、限流、超时、坏 JSON 和预算耗尽。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Offline tests cover success, rate limit, timeout, invalid JSON, and exhausted budget.

对应来源单元:Source unit: 官方课程 · 06-text-generation-appsOfficial lesson · 06-text-generation-apps
08

第 7 课Lesson 7

聊天应用:上下文、状态与多轮边界Building Generative AI-Powered Chat Applications

先回答一个白话问题Start with a plain question

聊天不是把全部历史无限追加,而是管理当前任务所需状态。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

Chat is not infinite history append; it is management of state needed for the current task. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像接力客服:交接单保留目标、承诺和未决事项,不需要每句寒暄。

Like support handoff: keep goals, commitments, and open items, not every greeting.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

区分消息角色、会话状态、长期偏好和外部事实;压缩时保留决策与来源。

Separate message roles, session state, long-term preferences, and external facts; preserve decisions and sources when compressing.

例子 1 · 上下文超长Example 1 · Context overflow
输入Input
50 轮闲聊后问项目状态Project status after 50 chat turns
过程Process
抽取目标、已完成和未决项Extract goal, completed work, and open items
结果 / 验收Result / check
摘要足以继续且成本下降The summary continues the task at lower cost
例子 2 · 并发会话Example 2 · Concurrent sessions
输入Input
两个标签页修改同一草稿Two tabs edit one draft
过程Process
使用会话版本检测冲突Use session versions to detect conflict
结果 / 验收Result / check
不会静默覆盖新内容New content is not silently overwritten
常见误区Common misconception

把对话历史当长期记忆,既泄露无关信息又不断抬高成本。

Using chat history as long-term memory, leaking irrelevant data and increasing cost.

作品任务Portfolio task

实现会话状态模型、压缩规则和“清除本次/删除长期偏好”控制。

Implement a session-state model, compression rules, and controls to clear session or delete long-term preferences.

验收:Acceptance: 压缩前后关键约束不丢;两会话隔离;用户能查看和删除记忆。Key constraints survive compression, sessions remain isolated, and users can inspect/delete memory.

自测:“聊天应用:上下文、状态与多轮边界”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Building Generative AI-Powered Chat Applications”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“压缩前后关键约束不丢;两会话隔离;用户能查看和删除记忆。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Key constraints survive compression, sessions remain isolated, and users can inspect/delete memory.

第三册 · 搜索、图像、低代码与工具Volume 3 · Search, image, low-code, and tools

让模型接入信息与动作,但不越权Connect information and actions without overreach

检索、图像、低代码与函数调用分别扩大能力和风险。

Search, image, low-code, and function calling expand both capability and risk.

本册作品里程碑Portfolio milestone

交付带引用搜索、可追溯封面和受控工具提案。

Deliver cited search, traceable cover generation, and controlled tool proposals.

09

第 8 课Lesson 8

构建搜索应用:检索事实,再让模型组织Building Search Applications

先回答一个白话问题Start with a plain question

搜索负责找候选证据,生成负责按证据回答,二者必须可追溯。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

Search retrieves candidate evidence; generation answers from it, and the two must remain traceable. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像研究员先找资料并贴书签,作者只能引用书签内容写结论。

Like a researcher finding bookmarked sources before the writer drafts only from those sources.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

查询、召回、排序、引用和回答分层;空结果时拒答,引用必须对应实际片段。

Separate query, retrieval, ranking, citation, and answer; abstain on empty results and bind citations to real passages.

例子 1 · 关键词命中Example 1 · Keyword hit
输入Input
搜索“DRF”Search “DRF”
过程Process
精确匹配缩写与来源Exact-match acronym and source
结果 / 验收Result / check
返回相关项目证据Relevant project evidence is returned
例子 2 · 无证据回答Example 2 · No-evidence answer
输入Input
问未写过的 Kubernetes 经历Ask about absent Kubernetes experience
过程Process
检索为空后返回材料不足Return insufficient evidence on empty retrieval
结果 / 验收Result / check
不生成虚假经历No fabricated experience
常见误区Common misconception

把搜索结果标题交给模型,却不读取正文就生成引用。

Generating citations from search-result titles without reading the source body.

作品任务Portfolio task

为用户项目材料做本地全文搜索,答案句子附文件与段落锚点。

Build local full-text search over user project material with file and paragraph anchors per answer.

验收:Acceptance: 每个事实引用能打开并支持该句;空结果明确拒答。Every factual citation opens and supports its sentence; empty results abstain explicitly.

自测:“构建搜索应用:检索事实,再让模型组织”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Building Search Applications”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“每个事实引用能打开并支持该句;空结果明确拒答。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Every factual citation opens and supports its sentence; empty results abstain explicitly.

10

第 9 课Lesson 9

图像生成应用:意图、版本与内容安全Building Image Generation Applications

先回答一个白话问题Start with a plain question

图像生成把文字意图变成不可完全预测的视觉结果。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

Image generation turns text intent into visual output that cannot be fully predicted. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像委托插画师:要给构图、用途和禁区,还要审稿而不是直接印刷。

Like commissioning an illustrator: specify composition, use, and exclusions, then review before printing.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

记录 prompt、模型、seed/参数与许可;加入内容审核、人物权利和人工确认。

Record prompt, model, seed/parameters, and license; add content moderation, likeness rights, and human approval.

例子 1 · 作品封面Example 1 · Portfolio cover
输入Input
主题与配色要求Theme and palette requirements
过程Process
生成三版并人工选择Generate three variants and select manually
结果 / 验收Result / check
保存参数与最终选择理由Save parameters and selection rationale
例子 2 · 人物冒用Example 2 · Likeness misuse
输入Input
要求仿某真实候选人Request a real candidate likeness
过程Process
拒绝或改用抽象人物Refuse or use an abstract person
结果 / 验收Result / check
不制造误导性身份图No deceptive identity image
常见误区Common misconception

图片是 AI 生成就认为没有版权、商标或肖像风险。

Assuming AI-generated images have no copyright, trademark, or likeness risk.

作品任务Portfolio task

给作品集封面做生成—审核—选版流程,保存可追溯元数据。

Build a generate-review-select workflow for the portfolio cover with traceable metadata.

验收:Acceptance: 最终图有来源参数、人工确认、用途记录和可替换方案。The final image has source parameters, human approval, intended use, and a replacement option.

自测:“图像生成应用:意图、版本与内容安全”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Building Image Generation Applications”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“最终图有来源参数、人工确认、用途记录和可替换方案。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: The final image has source parameters, human approval, intended use, and a replacement option.

11

第 10 课Lesson 10

低代码 AI:快做原型,也要看见隐藏边界Building Low Code AI Applications

先回答一个白话问题Start with a plain question

低代码减少胶水代码,不会自动解决数据、权限、评估和供应商锁定。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

Low-code tools reduce glue code; they do not solve data, permissions, evaluation, or vendor lock-in. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像预制房搭得快,但地基、消防和产权仍需要检查。

Like a prefab building: fast assembly does not remove foundation, fire, or ownership checks.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

导出配置、记录组件版本和数据流,检查凭证、日志、限额与迁移出口。

Export configuration, record component versions and data flow, and inspect credentials, logs, quotas, and an exit path.

例子 1 · 原型验证Example 1 · Prototype validation
输入Input
一页面试问答流程A one-page interview Q&A flow
过程Process
低代码编排并接 mockOrchestrate in low-code with a mock
结果 / 验收Result / check
一天验证用户路径Validate the user path in one day
例子 2 · 锁定风险Example 2 · Lock-in risk
输入Input
平台专属向量库Vendor-specific vector store
过程Process
导出原始文档和索引配置Export raw documents and index config
结果 / 验收Result / check
迁移不丢源数据Migration preserves source data
常见误区Common misconception

拖拽流程能跑就跳过版本控制和回归测试。

Skipping version control and regression tests because a drag-and-drop flow runs.

作品任务Portfolio task

搭一个低代码原型,同时写数据流图、出口清单和十条验收测试。

Build a low-code prototype with a data-flow diagram, exit checklist, and ten acceptance tests.

验收:Acceptance: 原型能导出/重建;凭证不嵌入;关键行为有可重复测试。The prototype exports/rebuilds, embeds no secrets, and has repeatable tests for critical behavior.

自测:“低代码 AI:快做原型,也要看见隐藏边界”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Building Low Code AI Applications”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“原型能导出/重建;凭证不嵌入;关键行为有可重复测试。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: The prototype exports/rebuilds, embeds no secrets, and has repeatable tests for critical behavior.

12

第 11 课Lesson 11

函数调用:让模型提议,让代码执行Integrating with Function Calling

先回答一个白话问题Start with a plain question

模型生成结构化调用提案,真正动作必须由受控代码验证并执行。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

The model proposes a structured tool call; controlled code validates and executes the real action. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像助理填写报销单,财务系统仍核对字段、权限和金额后才付款。

Like an assistant filling an expense form; finance still validates fields, authority, and amount before payment.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

工具 schema 要窄、参数要校验、权限按动作分离,高风险调用先预览确认,执行后核对结果。

Keep tool schemas narrow, validate arguments, separate permissions by action, preview high-risk calls, and verify results after execution.

例子 1 · 只读工具Example 1 · Read-only tool
输入Input
查询空闲面试时间Query free interview times
过程Process
验证日期后读日历Validate date then read calendar
结果 / 验收Result / check
返回候选时间,不做修改Return options without mutation
例子 2 · 写操作确认Example 2 · Write confirmation
输入Input
创建真实日程Create a real calendar event
过程Process
先展示时间、参与人和标题Preview time, attendees, and title
结果 / 验收Result / check
用户确认后执行并核对事件 IDExecute after approval and verify event ID
常见误区Common misconception

函数参数符合 JSON 就认为安全;合法字符串仍可能指向越权资源。

Treating valid JSON as safe; a valid string can still reference an unauthorized resource.

作品任务Portfolio task

实现 search_notes 与 propose_calendar_event,两者权限和确认级别不同。

Implement search_notes and propose_calendar_event with different permissions and confirmation levels.

验收:Acceptance: 模型不能绕过校验直接执行;重复确认不会创建两次。The model cannot bypass validation, and repeated confirmation does not create duplicates.

自测:“函数调用:让模型提议,让代码执行”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Integrating with Function Calling”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“模型不能绕过校验直接执行;重复确认不会创建两次。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: The model cannot bypass validation, and repeated confirmation does not create duplicates.

第四册 · UX、安全与生命周期Volume 4 · UX, security, and lifecycle

把不确定性和失败放到产品正面Put uncertainty and failure on the product surface

体验、安全和持续评估决定系统能否长期使用。

UX, security, and continuous evaluation determine long-term usability.

本册作品里程碑Portfolio milestone

交付七状态界面、攻击集与发布/回滚门槛。

Deliver seven-state UX, attack set, and release/rollback gates.

13

第 12 课Lesson 12

AI 产品体验:显示状态、不确定性与控制权Designing UX for AI Applications

先回答一个白话问题Start with a plain question

AI UX 要让用户知道系统看了什么、正在做什么、哪里不确定以及如何撤销。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

AI UX should show what the system saw, what it is doing, where it is uncertain, and how to undo. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像透明厨房:用户看得到原料、进度和修改入口,而不是只等神秘成品。

Like an open kitchen: users see ingredients, progress, and revision controls rather than a mysterious result.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

设计空、加载、流式、成功、部分成功、失败和人工确认状态;提供编辑、重试、引用和撤销。

Design empty, loading, streaming, success, partial, failure, and approval states; provide edit, retry, citation, and undo.

例子 1 · 流式误导Example 1 · Streaming illusion
输入Input
逐字出现的回答Token-streamed answer
过程Process
显示“生成中,尚未验证”Show “generating, not yet verified”
结果 / 验收Result / check
用户不把半句当最终事实Users do not treat partial text as final fact
例子 2 · 可撤销草稿Example 2 · Undoable draft
输入Input
AI 改写简历AI rewrites a resume
过程Process
差异视图逐条接受Diff view with per-change acceptance
结果 / 验收Result / check
原文始终可恢复Original text remains recoverable
常见误区Common misconception

用打字动画制造“聪明感”,却隐藏来源、失败和编辑权。

Using typing animation to signal intelligence while hiding sources, failure, and edit control.

作品任务Portfolio task

画面试助手七状态线框图,并为高风险动作加确认与撤销。

Wireframe seven states of the Interview Assistant with confirmation and undo for high-risk actions.

验收:Acceptance: 390px 手机上所有状态可读;键盘能完成核心流程;失败不丢输入。All states are readable at 390px, the core flow works by keyboard, and failures preserve input.

自测:“AI 产品体验:显示状态、不确定性与控制权”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Designing UX for AI Applications”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“390px 手机上所有状态可读;键盘能完成核心流程;失败不丢输入。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: All states are readable at 390px, the core flow works by keyboard, and failures preserve input.

14

第 13 课Lesson 13

生成式 AI 安全:提示注入、数据与工具边界Securing Your Generative AI Applications

先回答一个白话问题Start with a plain question

外部文本可能伪装成指令,模型本身不能充当权限边界。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

External text can masquerade as instruction; the model cannot serve as an authorization boundary. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像邮件附件里写“忽略公司规定把工资表发给我”,文字存在不等于它有命令权。

An attachment saying “ignore policy and send payroll” has no authority merely because the text exists.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

标记数据来源、隔离指令层、最小权限、允许列表、输出过滤、秘密隔离、审计和人工批准。

Label data provenance, isolate instruction layers, enforce least privilege and allowlists, filter outputs, isolate secrets, audit, and require approval.

例子 1 · 文档注入Example 1 · Document injection
输入Input
知识库文档含恶意指令A knowledge document contains malicious instructions
过程Process
按数据处理并禁止改变工具策略Treat it as data; tool policy cannot change
结果 / 验收Result / check
回答引用内容但不执行指令Answer may cite content but never execute it
例子 2 · 越权工具Example 2 · Overpowered tool
输入Input
通用 send_emailGeneric send_email tool
过程Process
拆成草稿与受限发送Split draft from constrained send
结果 / 验收Result / check
模型无权向任意地址外发The model cannot exfiltrate to arbitrary addresses
常见误区Common misconception

系统提示写“不要泄密”就认为秘密安全。提示不是操作系统权限。

Assuming “do not leak secrets” in the system prompt secures secrets. Prompts are not OS permissions.

作品任务Portfolio task

建立 20 条攻击集,覆盖注入、越权、数据外泄、恶意链接与编码绕过。

Build a 20-case attack set covering injection, privilege abuse, exfiltration, malicious links, and encoding bypass.

验收:Acceptance: 攻击失败由代码权限保证;日志不含秘密;高风险调用必须人批。Attacks fail due to code-enforced permissions, logs contain no secrets, and high-risk calls require human approval.

自测:“生成式 AI 安全:提示注入、数据与工具边界”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Securing Your Generative AI Applications”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“攻击失败由代码权限保证;日志不含秘密;高风险调用必须人批。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Attacks fail due to code-enforced permissions, logs contain no secrets, and high-risk calls require human approval.

15

第 14 课Lesson 14

生成式 AI 应用生命周期The Generative AI Application Lifecycle

先回答一个白话问题Start with a plain question

生成式 AI 应用需要从问题到监控的持续评估循环。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

A GenAI app needs a continuous evaluation loop from problem framing through monitoring. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像经营餐厅:试菜、开业、顾客反馈、卫生检查和换菜单是持续过程。

Like running a restaurant: tasting, launch, feedback, inspection, and menu changes form a cycle.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

定义指标与数据集,原型,离线评估,风险审查,分阶段发布,线上监控,再把失败变成回归样本。

Define metrics and datasets, prototype, evaluate offline, review risk, release gradually, monitor online, and turn failures into regressions.

例子 1 · 版本回归Example 1 · Version regression
输入Input
更换模型版本A model-version change
过程Process
重跑固定评估与攻击集Rerun fixed eval and attack sets
结果 / 验收Result / check
关键样本退化则阻断发布Block release on critical regression
例子 2 · 线上失败回收Example 2 · Production failure loop
输入Input
用户报告引用错位User reports a bad citation
过程Process
脱敏后加入回归集Add a redacted case to the regression set
结果 / 验收Result / check
同类错误以后自动检查Future versions automatically test this failure
常见误区Common misconception

上线视为项目结束;模型和数据变化后,旧验收早已失效。

Treating launch as the end; old acceptance evidence expires as models and data change.

作品任务Portfolio task

写 release checklist、评估门槛、监控指标、回滚条件和失败回收流程。

Write the release checklist, eval gates, monitoring metrics, rollback conditions, and failure-ingestion process.

验收:Acceptance: 任何模型/提示/检索改动都有版本、评估和回滚记录。Every model, prompt, or retrieval change has version, evaluation, and rollback records.

自测:“生成式 AI 应用生命周期”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “The Generative AI Application Lifecycle”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“任何模型/提示/检索改动都有版本、评估和回滚记录。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Every model, prompt, or retrieval change has version, evaluation, and rollback records.

第五册 · RAG 与开放模型Volume 5 · RAG and open models

知识可更新,模型可替换Keep knowledge updateable and models replaceable

把检索证据与模型选择、许可和本地部署边界连起来。

Connect retrieval evidence with model choice, licensing, and local deployment boundaries.

本册作品里程碑Portfolio milestone

交付有权限、有引用、有拒答的 RAG 与模型选择卡。

Deliver permission-aware cited RAG with abstention and model choice cards.

16

第 15 课Lesson 15

RAG 与向量数据库:找对证据比塞满上下文重要RAG and Vector Databases

先回答一个白话问题Start with a plain question

RAG 在回答前检索外部资料,把可更新知识与模型生成分开。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

RAG retrieves external material before answering, separating updateable knowledge from generation. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像开卷考试:先按题目找到相关页,再基于页内证据作答。

Like an open-book exam: find relevant pages first, then answer from their evidence.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

摄取、切块、embedding、索引、检索、重排、生成和引用需要分别评估;保留文档版本与权限。

Evaluate ingestion, chunking, embeddings, indexing, retrieval, reranking, generation, and citation separately; preserve versions and permissions.

例子 1 · 切块失去指代Example 1 · Chunk loses reference
输入Input
“该政策下月生效”“This policy starts next month”
过程Process
块中加入标题、日期和前文Add title, date, and preceding context
结果 / 验收Result / check
检索结果自足可解释The retrieved chunk is self-contained
例子 2 · 检索对、回答错Example 2 · Right retrieval, wrong answer
输入Input
前三块含正确资格条件Top chunks contain the right eligibility rule
过程Process
检查生成是否忠于证据Check generation faithfulness
结果 / 验收Result / check
将检索与生成指标分开Separate retrieval and generation metrics
常见误区Common misconception

向量库返回相似文本就认为事实正确、权限允许且版本最新。

Assuming semantically similar text is correct, authorized, and current.

作品任务Portfolio task

给项目材料建混合检索 RAG,做 30 问的召回、忠实度和引用测试。

Build hybrid-search RAG over project material and a 30-question retrieval, faithfulness, and citation evaluation.

验收:Acceptance: 答案只能引用有权限且当前版本的片段;无证据时拒答。Answers cite only authorized current-version passages and abstain without evidence.

自测:“RAG 与向量数据库:找对证据比塞满上下文重要”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “RAG and Vector Databases”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“答案只能引用有权限且当前版本的片段;无证据时拒答。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Answers cite only authorized current-version passages and abstain without evidence.

17

第 16 课Lesson 16

开放模型:开放到哪一层、代价在哪一层Open Models

先回答一个白话问题Start with a plain question

“可下载权重”不自动等于训练数据、代码和许可证都开放。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

Downloadable weights do not automatically mean training data, code, and licenses are open. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像可以买到发动机,不代表拿到全部设计图、制造数据和任意改装权。

Buying an engine does not grant every blueprint, manufacturing record, or modification right.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

核对权重/代码/数据许可证、模型卡、硬件、量化、延迟、隐私与维护责任。

Check weight/code/data licenses, model cards, hardware, quantization, latency, privacy, and maintenance ownership.

例子 1 · 本地隐私Example 1 · Local privacy
输入Input
敏感但允许处理的材料Sensitive authorized material
过程Process
在隔离机器运行小模型Run a small model on an isolated machine
结果 / 验收Result / check
数据不离开边界,但运维责任增加Data stays local, while operations burden increases
例子 2 · 许可不兼容Example 2 · License mismatch
输入Input
允许研究、限制商用的模型Research-only or restricted model
过程Process
发布前审查用途与条款Review use and terms before release
结果 / 验收Result / check
不因“免费”误判可用“Free” is not mistaken for usable
常见误区Common misconception

把“open model”直接写成“开源模型”,不核对开放定义和许可证。

Translating “open model” as fully open source without checking definition and licenses.

作品任务Portfolio task

做三模型选择卡:开放内容、许可、硬件、质量、成本、隐私和退出方案。

Create three model-choice cards covering openness, license, hardware, quality, cost, privacy, and exit plan.

验收:Acceptance: 任何候选模型的可用范围与禁止用途都有来源链接。Every candidate’s allowed and prohibited uses have source links.

自测:“开放模型:开放到哪一层、代价在哪一层”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Open Models”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“任何候选模型的可用范围与禁止用途都有来源链接。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Every candidate’s allowed and prohibited uses have source links.

对应来源单元:Source unit: 官方课程 · 16-open-source-modelsOfficial lesson · 16-open-source-models

第六册 · Agent、微调与小模型Volume 6 · Agents, fine-tuning, and SLMs

先选最小充分能力,再增加自主性Choose the smallest sufficient capability before autonomy

区分工作流、Agent、微调与模型路由的适用条件。

Distinguish when workflows, agents, fine-tuning, and routing are appropriate.

本册作品里程碑Portfolio milestone

交付受控研究 Agent、微调决策 memo 和三级模型路由。

Deliver a bounded research agent, fine-tuning memo, and three-tier routing.

18

第 17 课Lesson 17

Agent:模型在反馈循环中调用工具推进目标AI Agents and chained context

先回答一个白话问题Start with a plain question

Agent 不是更会聊天,而是根据观察选择动作、读取结果并继续。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

An agent is not merely better at chat; it selects actions from observations, reads results, and continues. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像有权限边界的新同事:会查资料、写草稿、请求批准,再执行下一步。

Like a new colleague with bounded permissions: research, draft, request approval, then continue.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

目标、状态、工具、循环、停止条件、预算、权限和轨迹构成 Harness;能用固定工作流就先不用高自主性。

Goal, state, tools, loop, stop conditions, budget, permissions, and traces form the harness; prefer a fixed workflow when sufficient.

例子 1 · 固定工作流Example 1 · Fixed workflow
输入Input
简历证据→匹配→草稿Resume evidence → match → draft
过程Process
三步顺序始终相同The three steps always follow the same order
结果 / 验收Result / check
用 workflow 更便宜可控A workflow is cheaper and more controllable
例子 2 · 动态 AgentExample 2 · Dynamic agent
输入Input
研究陌生公司Research an unfamiliar company
过程Process
根据搜索结果决定下一来源Choose the next source from search results
结果 / 验收Result / check
路径动态但引用与预算受限The path is dynamic, while citations and budget are bounded
常见误区Common misconception

步骤多就叫 Agent,或把自主性当先进等级。

Calling any multi-step flow an agent or treating autonomy as a maturity badge.

作品任务Portfolio task

把面试准备拆成固定工作流与动态研究两部分,给工具写权限和停止规则。

Split interview preparation into a fixed workflow and dynamic research, with tool permissions and stop rules.

验收:Acceptance: 超预算、无来源、重复失败时停止;外发和日历动作必须批准。Stop on budget, no-source, or repeated failure; outbound and calendar actions require approval.

自测:“Agent:模型在反馈循环中调用工具推进目标”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “AI Agents and chained context”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“超预算、无来源、重复失败时停止;外发和日历动作必须批准。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Stop on budget, no-source, or repeated failure; outbound and calendar actions require approval.

对应来源单元:Source unit: 官方课程 · 17-ai-agentsOfficial lesson · 17-ai-agents
19

第 18 课Lesson 18

微调:什么时候值得改变模型行为Fine-Tuning Your LLM

先回答一个白话问题Start with a plain question

微调适合稳定、重复、可示范的行为差距,不适合更新事实数据库。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

Fine-tuning suits stable, repeated, demonstrable behavior gaps—not refreshing factual knowledge. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像培训写作风格与流程,不是把每天新闻背进员工大脑。

It is like training style and procedure, not memorizing daily news into an employee’s brain.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

先比较提示/RAG/工具方案;定义训练与保留测试集,清洗示范,防隐私泄露,评估灾难性退化。

Compare prompting, RAG, and tools first; define train/held-out sets, clean demonstrations, protect privacy, and test regressions.

例子 1 · 适合微调Example 1 · Good fit
输入Input
大量固定 JSON 格式失败Repeated fixed-JSON failures
过程Process
用高质量示范训练格式行为Train formatting behavior on quality demonstrations
结果 / 验收Result / check
格式稳定且知识仍来自 RAGFormat stabilizes while knowledge remains in RAG
例子 2 · 不适合微调Example 2 · Poor fit
输入Input
每周变化的公司政策Weekly-changing company policy
过程Process
放入带版本检索库Put it in a versioned retrieval store
结果 / 验收Result / check
更新无需重新训练Updates require no retraining
常见误区Common misconception

把几十条未经同意的真实对话直接当训练数据。

Using dozens of real conversations as training data without consent or cleaning.

作品任务Portfolio task

写微调决策 memo:差距、替代方案、数据许可、成本、指标与退出条件。

Write a fine-tuning decision memo: gap, alternatives, data rights, cost, metrics, and exit criteria.

验收:Acceptance: 只有在提示/RAG 基线不足且数据权利清楚时才进入训练。Training proceeds only when prompt/RAG baselines fail and data rights are clear.

自测:“微调:什么时候值得改变模型行为”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Fine-Tuning Your LLM”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“只有在提示/RAG 基线不足且数据权利清楚时才进入训练。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Training proceeds only when prompt/RAG baselines fail and data rights are clear.

对应来源单元:Source unit: 官方课程 · 18-fine-tuningOfficial lesson · 18-fine-tuning
20

第 19 课Lesson 19

小语言模型:用更小能力换速度、成本与部署边界Introduction to Small Language Models

先回答一个白话问题Start with a plain question

小模型在窄任务上可能更快、更便宜、更易本地运行。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

Small language models can be faster, cheaper, and easier to run locally on narrow tasks. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像专用计算器不如电脑通用,却在固定任务上便宜可靠。

A dedicated calculator is less general than a computer but cheaper and reliable for its task.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

按任务评估容量、内存、量化、端侧延迟和质量;需要时用路由把难题升级给大模型。

Evaluate capacity, memory, quantization, edge latency, and quality; route hard cases to a larger model when needed.

例子 1 · 端侧抽取Example 1 · On-device extraction
输入Input
本地职位文本Local job text
过程Process
小模型抽字段,低置信上报Small model extracts; escalate low confidence
结果 / 验收Result / check
隐私留本地且成本可控Privacy stays local with bounded cost
例子 2 · 模型路由Example 2 · Model routing
输入Input
简单分类与复杂写作混合Simple classification mixed with complex writing
过程Process
规则/小模型处理简单,大模型处理复杂Rules/SLM handle simple; LLM handles complex
结果 / 验收Result / check
质量接近但费用下降Comparable quality at lower cost
常见误区Common misconception

参数少就一定更快;硬件、量化和运行时会改变实际延迟。

Assuming fewer parameters always means faster; hardware, quantization, and runtime matter.

作品任务Portfolio task

做三级路由:规则、小模型、大模型,并在固定集上比较升级率与成本。

Build three-tier routing across rules, SLM, and LLM; compare escalation rate and cost on a fixed set.

验收:Acceptance: 每级有置信与失败出口;总体关键错误不增加,成本/延迟有实测。Each tier has confidence and failure exits; critical errors do not rise, and cost/latency are measured.

自测:“小语言模型:用更小能力换速度、成本与部署边界”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Introduction to Small Language Models”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“每级有置信与失败出口;总体关键错误不增加,成本/延迟有实测。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Each tier has confidence and failure exits; critical errors do not rise, and cost/latency are measured.

对应来源单元:Source unit: 官方课程 · 19-slmOfficial lesson · 19-slm

第七册 · 模型家族实作Volume 7 · Model-family practice

把产品名变成可替换适配器Turn product names into replaceable adapters

课程里的具体模型会变,工程契约、来源核对和评估不能变。

Specific models change; engineering contracts, source checks, and evaluation remain.

本册作品里程碑Portfolio milestone

交付两个模型家族适配器、当前来源记录与回归报告。

Deliver two family adapters, current-source records, and regression reports.

21

第 20 课Lesson 20

使用 Mistral 系列时仍从能力契约出发Building with Mistral Models

先回答一个白话问题Start with a plain question

模型家族提供不同尺寸、上下文与部署方式,选择仍须回到任务评估。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

A model family offers sizes, context limits, and deployment options; selection still returns to task evaluation. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像同品牌有不同车型,标志相同不代表载重、油耗和安全配置相同。

A vehicle brand has different models; a shared badge does not imply the same load, efficiency, or safety.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

查当前官方模型卡与许可,记录模型 ID、上下文、工具/JSON 支持、端点与退役策略。

Check current official model cards and licenses; record model ID, context, tool/JSON support, endpoint, and deprecation strategy.

例子 1 · 版本固定Example 1 · Version pinning
输入Input
供应商 latest 别名Provider “latest” alias
过程Process
记录精确模型 ID 并回归测试Record exact model ID and rerun regression tests
结果 / 验收Result / check
更新不会静默改变行为Updates do not silently change behavior
例子 2 · 能力验证Example 2 · Capability validation
输入Input
声称支持 JSON 模式Claimed JSON mode
过程Process
用嵌套和错误输入压力测Stress nested and invalid inputs
结果 / 验收Result / check
只在自己的 schema 上确认可用Confirm support on your own schemas
常见误区Common misconception

课程示例里某型号有效,就把当时的产品规格写成长期事实。

Treating a model version shown in a lesson as a timeless product fact.

作品任务Portfolio task

为一个当前可用 Mistral 型号做供应商适配器与回归记录,不把型号写死在业务层。

Build a provider adapter and regression record for a current Mistral model without hard-coding it in business logic.

验收:Acceptance: 替换型号只改配置/适配器;关键评估自动重跑;不可用时能降级。Changing models touches configuration/adapter only, reruns critical evals, and falls back on outage.

自测:“使用 Mistral 系列时仍从能力契约出发”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Building with Mistral Models”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“替换型号只改配置/适配器;关键评估自动重跑;不可用时能降级。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: Changing models touches configuration/adapter only, reruns critical evals, and falls back on outage.

对应来源单元:Source unit: 官方课程 · 20-mistralOfficial lesson · 20-mistral
22

第 21 课Lesson 21

使用 Meta 模型家族:许可、部署与评估同样重要Building With the Meta Family Models

先回答一个白话问题Start with a plain question

使用特定模型家族时,许可证、分发方式和硬件约束与生成质量同等重要。 对零基础项目来说,先问“用户真正需要什么证据”,再问模型能生成什么。

For a model family, license, distribution, and hardware constraints matter as much as output quality. In a beginner project, ask what evidence the user needs before asking what the model can generate.

类比桥梁Analogy bridge

像采用一套工业设备,除了性能还要看使用合同、安装条件和维护渠道。

Adopting industrial equipment requires performance, contract, installation conditions, and maintenance support.

类比边界:类比只帮助识别关系;真正系统仍由数据、代码、接口和运行环境决定。Where it breaks: The analogy only exposes relationships; the real system is determined by data, code, interfaces, and its runtime.

工程上到底发生什么What it means in engineering

核对当前官方许可与模型卡,评估量化、内存、上下文、语言、工具调用和安全策略。

Check current official licenses and model cards; evaluate quantization, memory, context, language, tool use, and safety policy.

例子 1 · 硬件可行性Example 1 · Hardware feasibility
输入Input
一台 16GB 内存设备A 16GB-memory device
过程Process
比较量化版本峰值内存与速度Compare quantized peak memory and speed
结果 / 验收Result / check
先证明能稳定运行再谈质量Prove stable execution before quality claims
例子 2 · 中文评估Example 2 · Chinese evaluation
输入Input
英文公开分数Public English benchmark scores
过程Process
运行中文职位与格式测试Run Chinese job and format tests
结果 / 验收Result / check
公开分数不能代替本地证据Public scores do not replace local evidence
常见误区Common misconception

“可本地部署”就等于“隐私安全”;日志、缓存、遥测和访问权限仍可能泄露。

Equating local deployment with privacy; logs, caches, telemetry, and access can still leak data.

作品任务Portfolio task

制作 Meta 模型部署卡:许可、硬件、量化、中文质量、安全、更新和回滚。

Create a Meta model deployment card covering license, hardware, quantization, Chinese quality, safety, updates, and rollback.

验收:Acceptance: 选择依据来自当前官方来源和本项目测试;来源变化会触发复核。The choice relies on current official sources and project tests; source changes trigger review.

自测:“使用 Meta 模型家族:许可、部署与评估同样重要”这一环若只在演示样例成功,为什么还不能进入真实使用?Self-check: Why is one successful demo insufficient for real use of “Building With the Meta Family Models”?

因为模型输出具有概率性,输入会变化,外部服务会失败。必须用代表性样本、失败路径和“选择依据来自当前官方来源和本项目测试;来源变化会触发复核。”这样的验收证据。

Because outputs are probabilistic, inputs vary, and dependencies fail. Use representative cases, failure paths, and evidence such as: The choice relies on current official sources and project tests; source changes trigger review.

对应来源单元:Source unit: 官方课程 · 21-metaOfficial lesson · 21-meta

新手术语表Beginner glossary

先用自己的话说一遍,再看定义Say it in your own words before checking

生成式 AIGenerative AI

根据输入生成新内容的模型与应用范式。

Models and applications that generate new content from input.

大语言模型Large language model (LLM)

基于大量文本训练、预测 token 的模型。

A model trained on large text corpora to predict tokens.

TokenToken

模型处理文本的基本单位,不一定等于一个字或单词。

A model text unit that is not always a word or character.

上下文窗口Context window

一次推理能处理的 token 范围。

The token span available in one inference.

消息角色Message role

区分系统、用户、助手和工具内容的标记。

A marker separating system, user, assistant, and tool content.

系统提示System prompt

定义全局行为与优先规则的指令层。

The instruction layer defining global behavior and priorities.

提示工程Prompt engineering

设计任务、上下文、约束与输出契约。

Designing task, context, constraints, and output contracts.

少样本提示Few-shot prompting

在提示中提供少量输入输出示例。

Providing a few input-output examples in the prompt.

结构化输出Structured output

符合 JSON/schema 等固定结构的模型结果。

Model output following a fixed JSON or schema structure.

温度Temperature

影响采样随机性的参数,不等于事实准确度。

A sampling-randomness parameter, not factual accuracy.

采样Sampling

从模型给出的 token 概率中选择输出。

Selecting output from token probabilities.

幻觉Hallucination

生成看似合理但没有可靠依据的内容。

Plausible output without reliable grounding.

GroundingGrounding

让回答绑定可核验外部证据。

Binding an answer to verifiable external evidence.

RAGRetrieval-augmented generation

先检索资料再基于资料生成。

Retrieving material before generating from it.

EmbeddingEmbedding

把内容映射为可比较的数值向量。

A numeric vector representation for comparison.

向量数据库Vector database

存储和检索向量及其元数据的系统。

A system for storing and retrieving vectors and metadata.

切块Chunking

把长文档切成可检索片段。

Splitting long documents into retrievable passages.

召回Recall (retrieval)

相关证据是否进入候选结果。

Whether relevant evidence enters candidate results.

重排序Reranking

对候选结果做更精细的相关性排序。

Refining the relevance order of candidates.

引用Citation

把回答中的主张连接到来源位置。

Linking a claim to a source location.

函数调用Function calling

模型生成符合 schema 的工具调用提案。

A model proposing a schema-conforming tool call.

工具Tool

允许系统查询信息或执行动作的受控接口。

A controlled interface for querying or acting.

AgentAgent

在观察—行动—反馈循环中推进目标的系统。

A system advancing a goal through observe-act-feedback loops.

工作流Workflow

路径预先规定的多步骤执行流程。

A multi-step flow with a predetermined route.

HarnessHarness

围绕模型的状态、工具、权限、预算和验证外壳。

The state, tools, permissions, budget, and validation around a model.

记忆Memory

跨轮次保存、可查看和删除的用户或任务信息。

User or task information stored across turns and deletable.

会话状态Session state

当前任务继续所需的临时信息。

Temporary information needed to continue the current task.

上下文压缩Context compression

保留决策价值、减少历史长度的过程。

Reducing history while preserving decision value.

流式输出Streaming

模型生成时分段向客户端发送内容。

Sending output incrementally during generation.

超时Timeout

等待外部调用超过上限后停止。

Stopping an external call after a time limit.

重试Retry

失败后按规则再次调用;应有上限和分类。

Repeating a failed call under bounded, classified rules.

退避Backoff

重试前逐步增加等待时间。

Increasing delay before repeated attempts.

限流Rate limit

限制单位时间请求或 token 数。

A cap on requests or tokens per time period.

预算Budget

对费用、token、时间或步骤的硬上限。

A hard cap on cost, tokens, time, or steps.

MockMock

无需真实外部服务的可控替代响应。

A controlled substitute for a real external service.

Provider adapterProvider adapter

把不同模型供应商接口封装成统一契约。

A wrapper normalizing different model-provider APIs.

评估集Evaluation set

代表目标任务与失败边界的固定样本。

A fixed set representing tasks and failure boundaries.

RubricRubric

把主观质量拆成可评分维度的标准。

Criteria decomposing subjective quality into scored dimensions.

忠实度Faithfulness

回答是否只表达来源支持的内容。

Whether an answer states only source-supported content.

拒答Abstention

证据不足或风险过高时明确不回答。

Explicitly not answering when evidence or safety is insufficient.

提示注入Prompt injection

外部内容伪装为高优先级指令。

External content masquerading as higher-priority instruction.

数据外泄Data exfiltration

敏感数据被发送到未授权目标。

Sensitive data sent to an unauthorized destination.

最小权限Least privilege

只授予完成任务必要的能力。

Granting only the capabilities needed for a task.

允许列表Allowlist

只允许明确列出的目标或动作。

Allowing only explicitly listed targets or actions.

人工确认Human approval

高风险动作执行前由人审查决定。

Human review before a high-risk action executes.

幂等Idempotency

重复请求不会重复产生副作用。

Repeated requests do not duplicate side effects.

可观测性Observability

用日志、指标和轨迹理解内部行为。

Understanding internal behavior through logs, metrics, and traces.

轨迹Trace

一次任务中消息、检索、调用和结果的记录。

A record of messages, retrieval, calls, and results in one task.

模型版本Model version

可定位具体行为与回归的模型标识。

A model identifier for behavior and regression tracking.

提示版本Prompt version

可比较和回滚的提示配置标识。

A prompt configuration identifier for comparison and rollback.

微调Fine-tuning

用任务数据进一步训练模型行为。

Further training model behavior with task data.

SFTSupervised fine-tuning

用输入—理想输出示范进行监督微调。

Supervised tuning on input–ideal-output examples.

小语言模型Small language model (SLM)

参数和资源需求相对较小的语言模型。

A language model with relatively small parameter and resource needs.

量化Quantization

用较低数值精度减少模型内存和计算。

Reducing model memory and compute with lower numeric precision.

开放模型Open model

开放部分权重或资源的模型;开放程度需逐项核对。

A model with some open artifacts; openness must be checked item by item.

模型卡Model card

记录模型训练、用途、评估和限制的说明。

Documentation of model training, use, evaluation, and limits.

低代码Low-code

用可视化组件减少手写胶水代码的开发方式。

Development using visual components to reduce hand-written glue code.

回归测试Regression test

确保新改动没有破坏已知行为的测试。

A test ensuring changes do not break known behavior.

影子模式Shadow mode

新系统并行运行但不影响真实决定。

Running a new system in parallel without affecting real decisions.

回滚Rollback

恢复到最近已知可用版本。

Restoring the last known-good version.

内容安全Content safety

检测和处理有害、违法或不适当输出。

Detecting and handling harmful, illegal, or inappropriate output.

数据最小化Data minimization

只收集和传输完成任务所必需的数据。

Collecting and sending only data necessary for the task.

来源覆盖矩阵Source coverage matrix

每个来源单元都有去处Every source unit has a destination

#讲义单元Guide unit官方来源映射Official source mapping
1把环境、凭证和成本边界先准备好Getting Started with this course 官方课程 · 00-course-setupOfficial lesson · 00-course-setup
2生成式 AI 与大语言模型的最小心智模型Introduction to Generative AI and Large Language Models 官方课程 · 01-introduction-to-genaiOfficial lesson · 01-introduction-to-genai
3比较模型:按任务、质量、延迟和成本选Exploring and comparing different LLMs 官方课程 · 02-exploring-and-comparing-different-llmsOfficial lesson · 02-exploring-and-comparing-different-llms
4负责任地使用生成式 AIUsing Generative AI Responsibly 官方课程 · 03-using-generative-ai-responsiblyOfficial lesson · 03-using-generative-ai-responsibly
5提示词基础:把任务写成可检查契约Prompt Engineering Fundamentals 官方课程 · 04-prompt-engineering-fundamentalsOfficial lesson · 04-prompt-engineering-fundamentals
6高级提示:分解、示例、反思与边界Creating Advanced Prompts 官方课程 · 05-advanced-promptsOfficial lesson · 05-advanced-prompts
7构建文本生成应用:从调用到可靠输出Building Text Generation Applications 官方课程 · 06-text-generation-appsOfficial lesson · 06-text-generation-apps
8聊天应用:上下文、状态与多轮边界Building Generative AI-Powered Chat Applications 官方课程 · 07-building-chat-applicationsOfficial lesson · 07-building-chat-applications
9构建搜索应用:检索事实,再让模型组织Building Search Applications 官方课程 · 08-building-search-applicationsOfficial lesson · 08-building-search-applications
10图像生成应用:意图、版本与内容安全Building Image Generation Applications 官方课程 · 09-building-image-applicationsOfficial lesson · 09-building-image-applications
11低代码 AI:快做原型,也要看见隐藏边界Building Low Code AI Applications 官方课程 · 10-building-low-code-ai-applicationsOfficial lesson · 10-building-low-code-ai-applications
12函数调用:让模型提议,让代码执行Integrating with Function Calling 官方课程 · 11-integrating-with-function-callingOfficial lesson · 11-integrating-with-function-calling
13AI 产品体验:显示状态、不确定性与控制权Designing UX for AI Applications 官方课程 · 12-designing-ux-for-ai-applicationsOfficial lesson · 12-designing-ux-for-ai-applications
14生成式 AI 安全:提示注入、数据与工具边界Securing Your Generative AI Applications 官方课程 · 13-securing-ai-applicationsOfficial lesson · 13-securing-ai-applications
15生成式 AI 应用生命周期The Generative AI Application Lifecycle 官方课程 · 14-the-generative-ai-application-lifecycleOfficial lesson · 14-the-generative-ai-application-lifecycle
16RAG 与向量数据库:找对证据比塞满上下文重要RAG and Vector Databases 官方课程 · 15-rag-and-vector-databasesOfficial lesson · 15-rag-and-vector-databases
17开放模型:开放到哪一层、代价在哪一层Open Models 官方课程 · 16-open-source-modelsOfficial lesson · 16-open-source-models
18Agent:模型在反馈循环中调用工具推进目标AI Agents and chained context 官方课程 · 17-ai-agentsOfficial lesson · 17-ai-agents
19微调:什么时候值得改变模型行为Fine-Tuning Your LLM 官方课程 · 18-fine-tuningOfficial lesson · 18-fine-tuning
20小语言模型:用更小能力换速度、成本与部署边界Introduction to Small Language Models 官方课程 · 19-slmOfficial lesson · 19-slm
21使用 Mistral 系列时仍从能力契约出发Building with Mistral Models 官方课程 · 20-mistralOfficial lesson · 20-mistral
22使用 Meta 模型家族:许可、部署与评估同样重要Building With the Meta Family Models 官方课程 · 21-metaOfficial lesson · 21-meta

来源与版权边界Source and license boundary

来源为 Microsoft《generative-ai-for-beginners》,MIT 许可。当前目录含 00 环境准备和 01–21 正式课。本讲义保留来源与许可,并用原创双语案例、误区、自测和项目验收重建教学顺序。

Source: Microsoft generative-ai-for-beginners under the MIT License. The current tree contains setup 00 and lessons 01–21. Attribution and license are preserved while original bilingual examples, misconceptions, checks, and acceptance criteria rebuild the teaching order.

打开官方来源Open official source · retrieved 2026-07-20 · commit 645f932514e9 · MIT