📗 第 11 章 · Agents and workflows
所属课程:课程 004 Building with the the AI API
官方章节名:Agents and workflows
课时数:8
CCAR-F 主命中领域:D1 27%
归档日期:2026-10-15
📋 本章课时清单
| 本章序 | 全课序 | 类型 | 课时 | lesson ID | 直链 | 精译 |
|---|---|---|---|---|---|---|
| 1 | 76 | 🎬 视频 | Agents and workflows | 287796 |
直链 | ✅ 已精译 |
| 2 | 77 | 🎬 视频 | Parallelization workflows | 287804 |
直链 | ✅ 已精译 |
| 3 | 78 | 🎬 视频 | Chaining workflows | 287800 |
直链 | ✅ 已精译 |
| 4 | 79 | 🎬 视频 | Routing workflows | 287801 |
直链 | ✅ 已精译 |
| 5 | 80 | 🎬 视频 | Agents and tools | 287803 |
直链 | ✅ 已精译 |
| 6 | 81 | 🎬 视频 | Environment inspection | 287798 |
直链 | ✅ 已精译 |
| 7 | 82 | 🎬 视频 | Workflows vs agents | 287794 |
直链 | ✅ 已精译 |
| 8 | 83 | 📝 测验 | Quiz on Agents and Workflows | 289130 |
直链 | ✅ 已精析 |
🎯 本章考点提示
D1(27%)核心,8 课时。并行化(parallelization)/链式(chaining)/路由(routing)三种工作流,加 Workflows vs agents 辨析。
⭐ 官方 What You'll Learn 第 12 条「Architect agent-based systems」。Workflows vs agents 是架构题的经典分水岭,务必吃透。
📖 逐课精译
课时 1 · Agents and workflows
类型:🎬 视频 | lesson ID:
287796| 官方直链
🎯 本课学习目标(据官方段落反推)
- 能定义 workflows 与 agents:都是处理单次请求完不成的任务的策略。
- 能按「对任务的了解程度」选择 workflow 还是 agent。
- 能说清 workflows = 预定义步骤序列,agents = 给目标+工具、让 AI 自己摸索。
- 能理解 Image to CAD 的 workflow 四步分解,以及它属于 Evaluator-Optimizer 模式。
- 能说出 Evaluator-Optimizer 的四个构件(Producer / Grader / Feedback loop / Iteration)。
一、开场:Workflows 与 Agents 的定义
官方原句:Workflows and agents are strategies for handling user tasks that can't be completed by the AI in a single request. You've actually been creating both throughout this course - when you used tools and let the AI figure out how to complete tasks, that was an agent.
精译:Workflows 和 agents 是处理无法由 AI 在单次请求中完成的任务的策略。其实你在整个课程里一直都在创造这两者——当你使用工具并让 AI 自己摸索如何完成任务时,那就是一个 agent。
⭐ 开章定调(D1):本课是第 11 章的总纲。共同点:都是多步/非单请求的任务策略(承接第 4 章评估的批处理、第 6 章 tool use)。关键伏笔:官方强调「using tools + let the AI figure out = agent」——agent 的核心特征是自主决定如何用工具,这在课时 5(Agents and tools)会展开。
二、⭐⭐ 何时用 Workflows vs Agents(When to Use Workflows vs Agents)
官方原句:The decision comes down to how well you understand the task:
- Use workflows when you can picture the exact flow or steps that the AI should go through to solve a problem, or when your app's UX constrains users to a set of tasks**
- Use agents when you're not sure exactly what task or task parameters you'll give to the AI
精译:这个决定归结为你对任务的理解程度:当你能描绘出 AI 该走的确切流程或步骤来解决问题时,或当你的应用 UX 把用户限制在一组任务内时,用 workflows;当你不完全确定会给 AI 什么任务或任务参数时,用 agents。
⭐⭐ 本课第一号考点(D1)——选择判据是核心: * 判据:
how well you understand the task(对任务的了解程度)。 * Workflows:能预判确切步骤(picture the exact flow/steps)或 UX 约束了任务集合。 * Agents:不确定具体任务/任务参数。 * 记忆:「我早知道怎么走」→ workflow;「我不确定要让它干啥」→ agent。这是贯穿全章的选型主线,课时 7(Workflows vs agents)会再深化。
三、⭐⭐ 形式化定义(Definitions)
官方原句:Workflows are a series of calls to the AI meant to solve a specific problem through a predetermined series of steps. Agents give the AI a goal and a set of tools, expecting the AI to figure out how to complete the goal through the provided tools.
精译:Workflows 是对 AI 的一系列调用,意在通过预先确定的步骤序列解决某个具体问题。Agents 则给 AI 一个目标(goal)和一组工具(tools),期望 AI 自己摸索如何通过这些工具完成目标。
⭐⭐ 本课第二号考点(D1)——一句话定义是必背: * Workflow:
series of calls+predetermined series of steps——步骤由你定死。 * Agent:goal + set of tools+AI figures out how——路径由 AI 自主决定。 * 对照记忆:workflow 定步骤、agent 定目标;workflow 代码可控、agent 行为可自由。这是全章最核心的一对定义,几乎必考。
四、⭐⭐ 实例:Image to CAD Workflow
官方原句:Let's look at a practical workflow example. Imagine building a web app where users drag and drop an image of a metal part, and you create a STEP file (an industry standard for 3D models) from it.
Since we have a pretty good idea of exactly what to do when a user supplies an image file, and we can easily write all of this out with code as a predefined series of steps, this makes a perfect workflow candidate.
Here's how the workflow breaks down:
- Feed an image* into the AI, asking it to describe the object***
- Based on the description, ask the AI to use the CadQuery library to model the object**
- Create a rendering
- Ask the AI to grade the rendering against the original image. If there are issues, fix them**
精译:看一个实用的 workflow 例子。想象构建一个 Web 应用:用户拖拽一张金属零件的图片,你据此生成一个 STEP 文件(3D 模型的行业标准)。由于用户提供图片文件时,我们非常清楚确切该做什么,而且可以轻松用代码把它写成一个预定义的步骤序列,所以这是一个完美的 workflow 候选。workflow 分解如下:① 把图片喂给 AI,让它描述物体;② 基于描述,让 AI 用 CadQuery 库给物体建模;③ 生成渲染图;④ 让 AI 把渲染图与原图比对评分,若有问题就修正。
⭐⭐ 本课第三号考点(D1)——Image to CAD 四步是分析题范本: * 为何是 workflow:
pretty good idea of exactly what to do+ 能用代码写成predefined series of steps→ perfect workflow candidate(正是 §二 判据的实例化)。 * 四步链:Describe(描述)→ Model(CadQuery 建模)→ Render(渲染)→ Grade & Fix(评分修正)。 * 业务名词:STEP file(3D 模型行业标准)、CadQuery(参数化 CAD 建模 Python 库)。这俩是 D1 记忆点。 * Grade & Fix 一步埋了本课后半的 Evaluator-Optimizer 伏笔。
五、⭐⭐ Evaluator-Optimizer 模式
官方原句:This modeling workflow is an example of an evaluator-optimizer pattern. Here's how it works:
- Producer: Takes input and creates output (the AI using CadQuery to model the part and create a rendering)
- Grader: Evaluates the output against some criteria**
- Feedback loop: If the grader doesn't accept the output, feedback goes back to the producer for improvement**
- Iteration: The cycle repeats until the grader accepts the output
精译:这个建模 workflow 是一个 evaluator-optimizer 模式的例子。它这样工作:Producer(生产者):接收输入并产生输出(即 AI 用 CadQuery 建模并生成渲染);Grader(评分者):对照某些标准评估输出;反馈环(Feedback loop):若 grader 不通过输出,反馈回流给 producer 去改进;迭代(Iteration):循环重复直到 grader 通过输出。
⭐⭐ 本课第四号考点(D1)——Evaluator-Optimizer 四构件是重点: * Producer:
input → output(生成者)。 * Grader:对照criteria评估输出(裁判)。 * Feedback loop:不通过 → 反馈回 producer 改进。 * Iteration:循环直到通过。 * 承接:这几乎就是第 4 章「评估→评分→迭代」的工程化架构版——Grader对应第 4 章 grader,feedback loop对应「按评分改进提示词/输出」,iteration对应「重复到满意」。第 4 章的评估思维在这里升级为可复用的架构模式。
六、⭐ 为什么要学 Workflow 模式(Why Learn Workflow Patterns)
官方原句:The goal of identifying different workflows is to give you a set of repeatable recipes for implementing your own features. The Evaluator-Optimizer is one workflow pattern that has worked well for other engineers - consider using it in your own app!
Remember, identifying workflows doesn't inherently do anything for us - we still have to write the actual code to implement them. But these patterns have proven successful for many engineers, so they're worth understanding and applying.
精译:识别不同 workflow 的目标,是给你一套可复用的配方(recipes)去实现你自己的功能。Evaluator-Optimizer 是对其他工程师很有效的一种 workflow 模式——考虑在你自己应用里用用!记住,识别 workflow 本身不会自动带来什么——我们仍要写实际代码去实现它们。但这些模式已被许多工程师验证成功,所以值得理解和应用。
⭐ 承前(D1):workflow 模式 = 可复用配方(repeatable recipes)。两点提醒:① 识别 ≠ 实现,仍要写代码;② 模式是经验验证而非银弹。这给「模式库」定了位——参考借鉴,而非照搬。
七、⭐ Key Takeaways(本课官方无独立 Key Takeaways 段,据正文反推)
- Workflows / agents 都是处理单请求完不成任务的多步策略。
- 选型判据:能预判步骤 / UX 受限 → workflow;不确定任务/参数 → agent。
- 定义:workflow =
series of calls(预定步骤);agent =goal + tools(AI 自主摸索)。 - Image to CAD 四步:Describe → Model(CadQuery)→ Render → Grade & Fix。
- Evaluator-Optimizer:Producer / Grader / Feedback loop / Iteration——可复用的架构配方。
🔤 本课新生词(临时小表 · 已回灌 30-单词表/04- 第 11 章分组)
| 星 | 词汇 | 音标 | 本课义 | 备注 |
|---|---|---|---|---|
| ⭐⭐ | workflow (n.) |
/ˈwɜːrkfloʊ/ |
工作流 | 预定义步骤序列 |
| ⭐⭐ | agent (n.) |
/ˈeɪdʒənt/ |
智能体 | 目标+工具、自主摸索 |
| ⭐⭐ | predetermined (adj.) |
/ˌpriːdɪˈtɜːrmɪnd/ |
预先确定的 | 已在 §3 课时1 收录 |
| ⭐⭐ | figure out (v.) |
— | 摸索出、搞清楚 | agent 的自主行为 |
| ⭐ | strategy (n.) |
/ˈstrætədʒi/ |
策略 | workflows/agents 的定位 |
| ⭐ | constrain (v.) |
/kənˈstreɪn/ |
限制、约束 | UX 约束任务集合 |
| ⭐⭐ | UX (n.) |
— | 用户体验 | 约束用户任务的因素 |
| ⭐ | drag and drop |
— | 拖拽 | Image to CAD 交互 |
| ⭐⭐ | STEP file |
— | STEP 文件 | 3D 模型行业标准 |
| ⭐⭐ | CadQuery (n.) |
— | CadQuery 库 | 参数化 CAD 建模库 |
| ⭐ | rendering (n.) |
/ˈrendərɪŋ/ |
渲染图 | workflow 第三步产物 |
| ⭐⭐ | evaluator-optimizer |
— | 评估-优化(模式) | 本课核心模式 |
| ⭐⭐ | producer (n.) |
/prəˈduːsər/ |
生产者 | 接收输入产生输出 |
| ⭐⭐ | grader (n.) |
/ˈɡreɪdər/ |
评分者 | 已在 §4 课时2 收录 |
| ⭐⭐ | feedback loop |
— | 反馈环 | 不通过→回生产者改进 |
| ⭐⭐ | iteration (n.) |
/ˌɪtəˈreɪʃn/ |
迭代 | 循环到通过 |
| ⭐⭐ | criteria (n. pl.) |
/kraɪˈtɪriə/ |
标准(复数) | 已在 §4 课时5 收录 |
| ⭐ | repeatable (adj.) |
/rɪˈpiːtəbl/ |
可重复的 | repeatable recipes |
| ⭐ | recipe (n.) |
/ˈresəpi/ |
配方 | workflow 模式的定位 |
| ⭐ | inherently (adv.) |
/ɪnˈhɪrəntli/ |
本质上、天生地 | 识别本身不产生效果 |
| ⭐ | proven (adj.) |
/ˈpruːvən/ |
被验证的 | proven successful |
| ⭐⭐ | agent-based (adj.) |
— | 基于智能体的 | architect agent-based systems(大纲第12条) |
| ⭐⭐ | predefined (adj.) |
/ˌpriːdɪˈfaɪnd/ |
预先定义的 | predefined series of steps(workflow核心) |
| ⭐ | candidate (n.) |
/ˈkændɪdət/ |
候选、合适对象 | perfect workflow candidate |
课时 2 · Parallelization workflows
类型:🎬 视频 | lesson ID:
287804| 官方直链
🎯 本课学习目标(据官方段落反推)
- 能说出 parallelization(并行化) 模式:把复杂任务拆成多个独立、聚焦的子任务并行执行。
- 能解释「单个复杂提示词」的两大问题(单请求重活多、巨型提示词会同时权衡而混乱)。
- 能描述 material designer 例子的流程(同图并行发多请求+最终聚合)。
- 能背出并行化的四步结构(Split → Run in parallel → Aggregate)及子任务不必相同。
- 能列出并行化的四大好处(聚焦注意/易优化/易扩展/更可靠)与适用场景。
一、开场:并行化是什么
官方原句:When building AI applications, you'll often encounter tasks that seem simple on the surface but become complex when you try to implement them effectively. Let's explore a powerful pattern called parallelization workflows that can help you break down complex tasks into manageable, focused pieces.
精译:构建 AI 应用时,你常会遇到一些表面上简单、但要有效实现却很复杂的任务。我们来看一个叫 parallelization workflows(并行化工作流) 的强大模式,它帮你把复杂任务拆解成可管理、聚焦的小块。
⭐ 承上启下(D1):三大工作流第一种。核心动作:break down complex tasks into manageable, focused pieces——拆分是并行化的灵魂。
simple on the surface呼应课时 1「看起来简单实则复杂」。
二、⭐⭐ 单个复杂提示词的问题(The Problem with Complex Single Prompts)
官方原句:Imagine you're building a material designer application where users upload images of parts and receive recommendations for the best material. Your first instinct might be to send the image to the AI with a simple prompt asking it to choose between metal, polymer, ceramic, composite, elastomer, or wood.
While this approach might work, you're asking the AI to do a lot of heavy lifting in a single request. Without specific criteria for each material type, the results won't be as reliable as they could be.
You might think to improve this by adding detailed criteria for each material into one massive prompt. But this creates a new problem - the AI has to juggle all these different considerations simultaneously, which can lead to confusion and suboptimal results.
精译:假设你在构建一个材料设计师应用:用户上传零件图片,得到最佳材料推荐。你的第一反应可能是把图片发给 AI,配一个简单提示词,让它在金属、聚合物、陶瓷、复合材料、弹性体、木材里选。这种方法也许能用,但你是在让 AI 在单次请求里干一大堆重活。没有针对每种材料的特定标准,结果就不会那么可靠。你也许想改成把每种材料的详细标准塞进一个巨型提示词——但这又产生新问题:AI 必须同时权衡所有这些不同考量,可能导致混乱和次优结果。
⭐⭐ 本课第一号考点(D1)——两种直觉方案的缺点: * 方案 A:简单提示词——让 AI 在单请求里
a lot of heavy lifting;无每种材料的 specific criteria → 不可靠。 * 方案 B:一个巨型提示词——juggle all considerations simultaneously→ confusion + suboptimal results。 * 共同病灶:把太多判断塞进一次请求。→ 引出并行化:一个判断一个请求。
三、⭐⭐ 更优做法:并行化(A Better Approach: Parallelization)
官方原句:Instead of cramming everything into one request, you can split the task into multiple parallel requests. Each request focuses on evaluating the part for a single material type with specialized criteria.
Here's how it works:
- Send the same image to the AI multiple times simultaneously**
- Each request includes specialized criteria for one material (metal criteria, polymer criteria, ceramic criteria, etc.)
- the AI evaluates the part's suitability for each material independently**
- Collect all the analysis results and feed them into a final aggregation step**
The final step sends all the individual analysis results back to the AI with a request to compare them and make a final material recommendation.
精译:与其把所有东西硬塞进一次请求,不如把任务拆成多个并行请求。每个请求聚焦评估零件对单一材料类型的适用性,配专门标准。流程:① 把同一张图同时发给 AI 多次;② 每个请求包含针对一种材料的专门标准(金属标准、聚合物标准、陶瓷标准……);③ AI 独立评估零件对每种材料的适用性;④ 收集所有分析结果,送入最终聚合步骤。最后一步把所有单条分析结果再发给 AI,请它相互比较并做出最终材料推荐。
⭐⭐ 本课第二号考点(D1)——并行化的执行流程: * 核心:
split the task into multiple parallel requests(一次请求 → 多次并行请求)。 * 四步执行:① 同图多次并行发送 ② 每请求带单一材料专门标准 ③ AI 独立评估各适用性 ④ 聚合步骤(collect → compare → final recommendation)。 * 注意:并行子任务共用同一输入(same image),但各用不同标准;末尾必须有一个聚合/汇总环节。并行 + 聚合是完整闭环。
四、⭐⭐ 并行化模式的结构(How Parallelization Workflows Work)
官方原句:The parallelization pattern follows a simple structure:
- Split* a single task into multiple sub-tasks - Break down the complex decision into focused, specialized evaluations***
- Run the sub-tasks in parallel - Execute all evaluations simultaneously for faster processing**
- Aggregate the results together - Combine the specialized analyses into a final decision**
- The parallelized sub-tasks don't need to be identical - Each can have a specialized prompt, set of tools, or evaluation criteria.
精译:并行化模式遵循一个简单结构:① Split(拆分):把单个任务拆成多个子任务——把复杂决策拆成聚焦、专门的评估;② Run in parallel(并行执行):同时执行所有评估以获得更快处理;③ Aggregate(聚合):把专门分析合并成最终决策。并行化的子任务不必相同——每个子任务可以有专门的提示词、工具集或评估标准。
⭐⭐ 本课第三号考点(D1)——三步结构是必背骨架: * Split(拆分)→ Run in parallel(并行)→ Aggregate(聚合)。 * Split:复杂决策 → focused/specialized evaluations。 * Run in parallel:
simultaneously,更快(吞吐)。 * Aggregate:专门分析 → final decision。 * 关键限定:子任务不必相同(not need to be identical)——各子任务可有专门 prompt / tools / criteria。这是并行化区别于「同一请求复制多份」的点。
五、⭐⭐ 并行化的好处(Benefits of This Approach)
官方原句:Parallelization workflows offer several key advantages:
- Focused attention: the AI can concentrate on one specific aspect at a time rather than balancing multiple competing considerations simultaneously. This leads to more thorough and accurate analysis.
- Easier optimization: You can improve and test the prompts for each material evaluation independently. If your metal analysis isn't working well, you can refine just that prompt without affecting the others.
- Better scalability: Adding new materials is straightforward - just add another parallel request. You don't need to rewrite existing prompts.
- Improved reliability: By breaking down the complex task, you reduce the cognitive load on the AI model and get more consistent, reliable results.
精译:并行化工作流带来几个关键优势:① 聚焦注意(Focused attention):AI 一次专注一个具体方面,而不是同时权衡多个相互竞争的考量——产出更深入、更准确的分析;② 更易优化(Easier optimization):你可以独立改进和测试每个材料评估的提示词——若金属分析效果不好,只精调那一个提示词,不影响其他;③ 更好扩展(Better scalability):加新材料很直接——只需再加一个并行请求,无需重写现有提示词;④ 更可靠(Improved reliability):拆解复杂任务降低了 AI 模型的认知负荷,得到更一致、更可靠的结果。
⭐⭐ 本课第四号考点(D1)——四大好处是枚举/分析题: * ① Focused attention:一次专注一点,避免同时权衡 → 更深入准确。 * ② Easier optimization:各子提示词独立改进/测试(metal 不行只改 metal)。 * ③ Better scalability:加新项 = 加一个并行请求,不改旧提示词。 * ④ Improved reliability:降低认知负荷(cognitive load) → 更一致可靠。 * 记忆口诀:专注、易改、易扩、可靠。
六、⭐⭐ 何时用并行化(When to Use Parallelization)
官方原句:This pattern works well when you have a complex decision that can be broken down into independent evaluations. Look for situations where you're asking an AI to consider multiple criteria, compare several options, or make decisions that involve different domains of expertise.
The key is identifying tasks that can be meaningfully separated - each parallel sub-task should be able to operate independently and contribute a distinct piece of analysis to the final decision.
精译:当你有一个能拆成独立评估的复杂决策时,这个模式很有效。寻找那些你让 AI 考虑多个标准、比较几个选项、或做出涉及不同专业领域决策的情形。关键在于识别出能有意义的拆分的任务——每个并行子任务都应能独立运行,并给最终决策贡献一份独特的分析。
⭐⭐ 本课第五号考点(D1)——适用条件与关键判据: * 适用:
complex decision broken down into independent evaluations;特征 = 多标准 / 多选项比较 / 多领域专业。 * 关键判据:meaningfully separated(可有意义地分离)——子任务要独立运行且贡献 distinct piece of analysis。 * 记忆:判断「能否并行」= 看子任务是否真的独立、且各贡献独特信息。若子任务互相依赖,就另当别论(那是课时 3 链式)。
七、⭐ Key Takeaways(本课官方无独立 Key Takeaways 段,据正文反推)
- 并行化:复杂任务 → 多个独立、聚焦的并行子请求。
- 单提示词两病:单请求重活不可靠;巨型提示词同时权衡而混乱。
- 结构:Split → Run in parallel → Aggregate;子任务不必相同。
- 四好处:聚焦注意/易优化/易扩展/更可靠。
- 适用:可拆成独立评估的多标准/多选项/多领域决策;关键 = 子任务独立且有独特贡献。
🔤 本课新生词(临时小表 · 已回灌 30-单词表/04- 第 11 章分组)
| 星 | 词汇 | 音标 | 本课义 | 备注 |
|---|---|---|---|---|
| ⭐⭐ | parallelization (n.) |
/ˌpærəlelaɪˈzeɪʃn/ |
并行化 | 三大工作流之一 |
| ⭐ | on the surface |
— | 表面上 | 已在 §5 课时5 收录 |
| ⭐⭐ | break down (v.) |
— | 拆分、分解 | 已在 §4 课时1 收录 |
| ⭐ | manageable (adj.) |
/ˈmænɪdʒəbl/ |
可管理的 | manageable, focused pieces |
| ⭐⭐ | material designer |
— | 材料设计(应用) | 本课例子 |
| ⭐ | polymer (n.) |
/ˈpɑːlɪmər/ |
聚合物 | 可选材料之一 |
| ⭐ | ceramic (n.) |
/səˈræmɪk/ |
陶瓷 | 可选材料之一 |
| ⭐ | composite (n.) |
/kəmˈpɑːzɪt/ |
复合材料 | 可选材料之一 |
| ⭐ | elastomer (n.) |
/ɪˈlæstəmər/ |
弹性体 | 可选材料之一 |
| ⭐ | heavy lifting |
— | 重活、繁重工作 | 单请求的负担 |
| ⭐⭐ | juggle (v.) |
/ˈdʒʌɡl/ |
同时应付、权衡 | 巨型提示词的负担 |
| ⭐ | suboptimal (adj.) |
/sʌbˈɑːptɪməl/ |
次优的 | 巨型提示词的结果 |
| ⭐⭐ | cram (v.) / cramming |
/kræm/ |
硬塞、填塞 | cramming everything into one request |
| ⭐⭐ | simultaneously (adv.) |
/ˌsaɪmlˈteɪniəsli/ |
同时地 | 并行执行的标志 |
| ⭐⭐ | suitability (n.) |
/ˌsuːtəˈbɪləti/ |
适用性 | 评估的对象 |
| ⭐⭐ | aggregation (n.) / aggregate (v.) |
/ˌæɡrɪˈɡeɪʃn/ |
聚合 | 并行后的汇总步骤 |
| ⭐⭐ | sub-task (n.) |
— | 子任务 | Split 的产物 |
| ⭐ | distinct (adj.) |
/dɪˈstɪŋkt/ |
独特的、不同的 | distinct piece of analysis |
| ⭐ | scalability (n.) |
/ˌskeɪləˈbɪləti/ |
可扩展性 | 好处之一 |
| ⭐⭐ | cognitive load |
— | 认知负荷 | 拆解降低它→更可靠 |
| ⭐ | interfere (v.) |
/ˌɪntərˈfɪr/ |
干扰 | 新标准不干扰旧标准 |
| ⭐ | domain (n.) |
/doʊˈmeɪn/ |
领域 | different domains of expertise |
| ⭐ | meaningfully (adv.) |
/ˈmiːnɪŋfəli/ |
有意义地 | 已在 §4 课时4 收录(meaningful) |
| ⭐ | instinct (n.) |
/ˈɪnstɪŋkt/ |
直觉、本能 | first instinct(硬塞单提示词的直觉误区) |
| ⭐⭐ | massive (adj.) |
/ˈmæsɪv/ |
庞大的、海量的 | a single massive prompt(单巨型提示词反模式) |
| ⭐⭐ | identical (adj.) |
/aɪˈdentɪkl/ |
完全相同的 | don't need to be identical(并行子任务不必同构) |
课时 3 · Chaining workflows
类型:🎬 视频 | lesson ID:
287800| 官方直链
🎯 本课学习目标(据官方段落反推)
- 能定义 chaining workflow:把大而复杂的任务拆成更小的、顺序执行的子任务。
- 能举例 social media marketing 的链式分解。
- 能说出链式三大优势(拆小不可并行子任务/可选非 LLM 处理/保持 AI 聚焦)。
- 能解释 Long Prompt Problem(长提示词仍可能违反约束)与两步链式修正方案。
- 能列出链式的适用场景。
一、开场:链式看似显然实则重要
官方原句:Chaining workflows might seem obvious at first, but they're actually one of the most useful patterns you'll encounter. This approach becomes especially valuable when you're dealing with complex tasks or long prompts that the AI struggles to handle consistently.
精译:链式工作流起初看起来可能显而易见,但它其实是你会遇到的最有用的模式之一。当你处理复杂任务或长提示词——那些 AI 难以稳定处理的情形时,这种方法尤其有价值。
⭐ 承上启下(D1):三大工作流第二种。定位:complex tasks / long prompts 时最有用。
struggles to handle consistently(难以稳定处理)直接引出本课核心痛点——长提示词中 AI 会「漏守约束」。
二、⭐⭐ 什么是链式(What is Workflow Chaining?)
官方原句:A chaining workflow breaks down a large, complex task into smaller, sequential subtasks. Instead of asking the AI to do everything at once, you split the work into focused steps that build on each other.
Here's a practical example: imagine you're building a social media marketing tool that creates and posts videos automatically. Rather than asking the AI to handle everything in one massive prompt, you could break it down like this:
- Find related trending topics on Twitter
- Select the most interesting topic (using the AI)
- Research the topic (using the AI)
- Write a script for a short format video (using the AI)
- Use an AI avatar and text-to-speech to create a video
- Post the video to social media
精译:链式工作流把大而复杂的任务拆成更小的、顺序执行的子任务。与其让 AI 一次性做完所有事,不如把工作拆成相互衔接(build on each other)的聚焦步骤。一个实际例子:假设你在构建一个自动创建并发布视频的社交媒体营销工具。与其让 AI 在一个巨型提示词里处理所有事,你可以这样拆:① 在 Twitter 找相关热门话题 ② 选出最有趣的话题(用 AI)③ 研究该话题(用 AI)④ 为短视频写脚本(用 AI)⑤ 用 AI 虚拟形象和文本转语音(TTS)制作视频 ⑥ 把视频发布到社交媒体。
⭐⭐ 本课第一号考点(D1)——链式定义与例子: * 定义:
breaks down large, complex task into smaller, sequential subtasks——大→小、复杂→顺序;子任务build on each other(逐步递进/相互衔接,是「链」的含义)。 * 六步例:Trending topics → Select → Research → Script → Create video(avatar+TTS)→ Post。 * 关键:有的步骤用 AI(选/研究/写脚本),有的步骤是非 LLM 处理(找话题、TTS、发布)——这为 §四 的「可选非 LLM 处理」埋了伏笔。
三、⭐⭐ 为什么链式而非一个巨型提示词(Why Chain Instead of One Big Prompt?)
官方原句:You might wonder why not just combine all the the AI tasks into a single prompt. The key benefit is focus - when you give the AI one specific task at a time, it can concentrate on doing that task well rather than juggling multiple requirements simultaneously.
The chaining approach offers several advantages:
- Split large tasks into smaller, non-parallelizable subtasks**
- Optionally do non-LLM processing between each task
- Keep the AI focused on one aspect of the overall task
精译:你可能会想,为什么不用一个巨型提示词把 AI 任务合并。关键好处是聚焦(focus)——当你一次给 AI 一个具体任务时,它能专心做好那件事,而不是同时应付多个需求。链式方法有几个优势:把大任务拆成更小、不可并行(non-parallelizable)的子任务;可选地在每个任务之间做非 LLM 处理;让 AI 始终聚焦于整体任务的一个方面。
⭐⭐ 本课第二号考点(D1)——链式三大优势: * ① 拆小不可并行子任务:
non-parallelizable——链式是顺序的,子任务有依赖(对比课时 2 并行化的independent)。这是两模式的本质区别:并行靠独立,链式靠顺序依赖。 * ② 可选非 LLM 处理:步骤间可插入代码/工具处理(校验、转换、外部调用)。 * ③ 保持聚焦:focused on one aspect——与课时 2 并行化的「聚焦注意」同理,但这里是时间上的顺序聚焦。 * 核心收益:focus,避免juggling multiple requirements simultaneously。
四、⭐⭐ 长提示词问题(The Long Prompt Problem)
官方原句:You'll often encounter situations where you need the AI to write content with many specific constraints. Let's say you want the AI to write a technical article, and you specify that it should:
- Not mention that it's written by an AI**
- Avoid using emojis
- Skip clichéd or overly casual language**
- Write in a professional, technical tone**
Even with all these constraints clearly stated, the AI might still produce content that violates some of your rules. You might get back an article that still uses emojis, mentions AI authorship, or sounds unprofessional.
精译:你常会遇到需要 AI 在大量特定约束下写内容的情形。假设你想让 AI 写一篇技术文章,并规定:不要提及是 AI 写的;避免使用表情符号;跳过陈词滥调或过于随意的语言;用专业、技术性的语气写。即使这些约束都清楚写明了,AI 仍可能产出违反其中一些规则的内容。你可能得到一篇仍用 emoji、提到 AI 作者身份、或听上去不专业的文章。
⭐⭐ 本课第三号考点(D1/D3)——Long Prompt Problem 的机制: * 现象:约束写得很清楚(四条),AI 仍漏守/违反部分约束。 * 原因:一个提示词里约束太多,AI 在生成与守约之间失衡(
balancing content creation with constraint adherence,见 §五)。 * 四条约束例:不提及 AI 身份/不用 emoji/不用陈词滥调与随意语言/专业技术语气。 * 这是「巨型提示词」在内容生成场景的失败面(呼应课时 2 的 suboptimal)。
五、⭐⭐ 链式解法:两步修正(The Chaining Solution)
官方原句:Instead of fighting with one massive prompt, use a two-step chaining approach:
Step 1: Send your initial prompt and accept that the first result might not be perfect. the AI will generate an article, but it might violate some of your constraints.
Step 2: Make a follow-up request that focuses specifically on fixing the issues. Provide the article the AI just wrote and give it targeted revision instructions:
Revise the article provided below. Follow these steps to rewrite the article: 1. Identify any location where the text identifies the author as an AI and remove them 2. Find and remove all emojis 3. Locate any cringey writing and replace it with text that would be written by a technical writerThis approach works because the AI can focus entirely on the revision task rather than trying to balance content creation with constraint adherence.
精译:与其跟一个巨型提示词较劲,不如用两步链式:第 1 步:发送初始提示词,接受第一次结果可能不完美——AI 会生成一篇文章,但可能违反部分约束。第 2 步:做一个专门聚焦修问题的后续请求——把AI 刚写的文章给它,并给有针对性的改写指令:「改写下面提供的文章。按以下步骤重写:1. 找出文中任何把作者标识为 AI 的地方并删除 2. 找到并移除所有 emoji 3. 找出任何尴尬(cringey)的写法,替换成技术作家会写的那种文字」。这个方法有效,因为 AI 能完全专注于改写任务,而不是试图在内容创作与守约之间找平衡。
⭐⭐ 本课第四号考点(D1/D3)——两步链式是核心解法,改写指令是送分点: * Step 1:先正常生成,接受不完美。 * Step 2:后续请求,聚焦修问题——输入=AI 刚写的文章,指令=针对性改写指令。 * 改写指令三步:① 删除 AI 身份标识 ② 移除所有 emoji ③ 替换 cringey 写法为技术作家风格。 * 机制:
focus entirely on the revision task——把「创作」与「守约」分离成两次请求,各自聚焦。这是链式「非并行子任务 + 保持聚焦」在内容场景的落地。
六、⭐⭐ 何时用链式(When to Use Chaining)
官方原句:Chaining workflows are particularly useful when:
- You have complex tasks with multiple requirements**
- the AI consistently ignores some constraints in long prompts
- You need to process or validate outputs between steps**
- You want to keep each interaction focused and manageable**
While chaining might seem like extra work, it often produces better results than trying to cram everything into a single prompt. The key is recognizing when a task is complex enough to benefit from being broken down into focused, sequential steps.
精译:链式工作流在以下情况特别有用:有多重需求的复杂任务;AI 在长提示词里持续忽略某些约束;你需要在步骤之间处理或验证输出;你想让每次交互都聚焦且可管理。虽然链式可能看起来像额外工作,但它常常比把一切硬塞进单个提示词产出更好的结果。关键在于识别任务是否复杂到值得被拆成聚焦、顺序的步骤。
⭐⭐ 本课第五号考点(D1)——适用场景与判据: * 四场景:① 多需求复杂任务 ② AI 持续忽略长提示词约束 ③ 需步骤间处理/验证输出 ④ 想每次交互聚焦可管理。 * 价值判断:看似extra work,实则更优(对比 cram everything into single prompt)。 * 判据:
task is complex enough→ 值得拆成focused, sequential steps。 * 对比记忆:并行化 = 子任务独立(一锤子并发);链式 = 子任务顺序依赖(逐步递进、可插非 LLM 处理)。
七、⭐ Key Takeaways(本课官方无独立 Key Takeaways 段,据正文反推)
- 链式:大而复杂任务 → 小、顺序、递进的子任务。
- 优势:拆不可并行子任务/可选非 LLM 处理/保持聚焦(避免同时权衡)。
- Long Prompt Problem:长提示词里 AI 会漏守约束。
- 两步链式:先生成(接受不完美)→ 后续请求针对性修正(改约束违规处)。
- 适用:多需求复杂任务/持续忽略约束/需步骤间处理验证。
🔤 本课新生词(临时小表 · 已回灌 30-单词表/04- 第 11 章分组)
| 星 | 词汇 | 音标 | 本课义 | 备注 |
|---|---|---|---|---|
| ⭐⭐ | chaining (n.) / chain (v.) |
/ˈtʃeɪnɪŋ/ |
链式 | 三大工作流之一 |
| ⭐⭐ | sequential (adj.) |
/sɪˈkwenʃl/ |
顺序的 | 链式子任务的特征 |
| ⭐ | build on (v.) |
— | 在……基础上递进 | 已在 §5 课时1 收录 |
| ⭐⭐ | non-parallelizable (adj.) |
— | 不可并行的 | 链式子任务的特征(对比并行) |
| ⭐ | trending topics |
— | 热门话题 | 营销例子第一步 |
| ⭐ | text-to-speech |
— | 文本转语音(TTS) | 视频制作环节 |
| ⭐ | avatar (n.) |
/ˈævətɑːr/ |
虚拟形象 | 视频制作环节 |
| ⭐⭐ | clichéd (adj.) |
/kliːˈʃeɪd/ |
陈词滥调的 | 技术文章要避免之一 |
| ⭐ | overly casual |
— | 过于随意的 | 技术文章要避免之一 |
| ⭐⭐ | violate (v.) |
/ˈvaɪəleɪt/ |
违反 | 约束被违反 |
| ⭐ | emojis (n.) |
/ɪˈmoʊdʒiːz/ |
表情符号 | 约束之一 |
| ⭐ | authorship (n.) |
/ˈɔːθərʃɪp/ |
作者身份 | 不提 AI authorship |
| ⭐⭐ | follow-up (adj./n.) |
— | 后续的 | follow-up request |
| ⭐⭐ | revision (n.) |
/rɪˈvɪʒn/ |
改写、修订 | 第 2 步的任务 |
| ⭐ | cringey (adj.) |
/ˈkrɪndʒi/ |
尴尬的、令人不适的 | 要替换的写法 |
| ⭐⭐ | constraint adherence |
— | 遵守约束 | 创作与守约的平衡 |
| ⭐ | validate (v.) |
/ˈvælɪdeɪt/ |
验证 | 步骤间处理/验证输出 |
课时 4 · Routing workflows
类型:🎬 视频 | lesson ID:
287801| 官方直链
🎯 本课学习目标(据官方段落反推)
- 能定义 routing workflow:给不同类型的请求分门别类并路由到专门的处理管线。
- 能说出通用提示词的问题(一个提示词难同时兼顾多种内容类型)。
- 能举例内容类别(Entertainment / Educational / Comedy / Personal vlog / Reviews / Storytelling)。
- 能描述路由的两步过程(Categorization → Specialized Processing)并读懂类别化示例。
- 能说出路由架构(Router → 单管线)与适用场景。
一、开场:路由解决什么问题
官方原句:Routing workflows solve a common problem in AI applications: different types of user requests need different handling approaches. Instead of using a one-size-fits-all prompt, you can categorize incoming requests and route them to specialized processing pipelines.
精译:路由工作流解决 AI 应用里的一个常见问题:不同类型的用户请求需要不同的处理方式。与其用一个一刀切(one-size-fits-all)的提示词,不如给进来的请求分类,并把它们路由到专门的处理管线。
⭐ 承上启下(D1):三大工作流第三种。核心:分门别类 + 路由到专门管线。
one-size-fits-all(一刀切)是反面对照——单一提示词难适配多样请求。
二、⭐⭐ 通用提示词的问题(The Problem with Generic Prompts)
官方原句:Consider a social media marketing tool that generates video scripts from user topics. A user might enter "programming" or "surfing" as their topic, but these should produce very different types of content:
Programming* topics call for educational content with clear explanations and definitions. Surfing topics work better with entertainment-focused scripts that emphasize excitement and visual appeal. A single generic prompt* can't handle both effectively.
精译:考虑一个根据用户主题生成视频脚本的社媒营销工具。用户可能输入「编程」或「冲浪」作为主题,但它们应产出非常不同类型的内容:编程主题需要教育性内容,要清晰的解释和定义;冲浪主题更适合娱乐导向的脚本,强调刺激感和视觉吸引力。一个通用提示词无法有效同时处理这两者。
⭐⭐ 本课第一号考点(D1/D3)——通用提示词的失败: * 场景:一个工具、多种输入主题(programming vs surfing),需要的输出类型不同。 * 矛盾:programming → educational;surfing → entertainment。 * 结论:
single generic prompt can't handle both effectively——这就是路由要解决的。记忆:不同输入类型 → 不同处理管线。
三、⭐⭐ 定义内容类别(Setting Up Content Categories)
官方原句:The first step is defining the different types of content your application might need to generate. You might categorize requests into genres like:
- Entertainment - High-energy, culturally relevant content with trendy language**
- Educational - Clear, engaging explanations with relatable examples**
- Comedy - Sharp, unexpected content with clever observations and timing**
- Personal vlog - Authentic, intimate content with conversational storytelling**
- Reviews - Decisive, experience-based content highlighting strengths and weaknesses**
- Storytelling - Immersive content using vivid details and emotional connection**
Each category gets its own specialized prompt template. For example, the educational prompt might ask the AI to "develop a clear, engaging script that transforms complex information into digestible insights using relatable examples and thought-provoking questions."
精译:第一步是定义你的应用可能要生成的各类内容。你可以把请求归入这样的体裁(genres):娱乐(Entertainment)——高能量、文化相关、用流行语言;教育(Educational)——清晰、吸引人的解释,配接地气的例子;喜剧(Comedy)——犀利、出人意料,配巧妙的观察与节奏;个人 vlog——真实、亲密的对话式叙事;测评(Reviews)——果断、基于体验,突出优缺点;讲故事(Storytelling)——用生动细节和情感连接的沉浸式内容。每个类别都有自己专门的提示词模板。例如,教育类提示词可能让 AI「开发一个清晰、吸引人的脚本,用接地气的例子和引人深思的问题把复杂信息转化为易于理解的洞见」。
⭐⭐ 本课第二号考点(D1/D3)——六大体裁是枚举/匹配题: * 六类:Entertainment / Educational / Comedy / Personal vlog / Reviews / Storytelling。 * 每类一句话特征:娱乐=高能量流行语;教育=清晰解释+接地气例子;喜剧=巧妙观察与节奏;vlog=真实对话叙事;测评=果断+优缺点;故事=生动细节+情感。 * 每类一模板:
specialized prompt template——类别 ↔ 模板一对一。 * 记忆:先定类别清单,再为每类配模板——这是路由的「准备阶段」。
四、⭐⭐ 路由如何工作(How Routing Works in Practice)
官方原句:The routing process happens in two steps:
- Categorization - Send the user's topic to the AI with a request to categorize it into one of your predefined genres**
- Specialized Processing - Use the category result to select the appropriate prompt template and generate content
For example, if a user enters "Python functions" as their topic, you'd first ask the AI to categorize it:
``` Categorize the topic of a video into one of the listed categories: <topic>Python functions</topic>
<categories> - Educational - Entertainment - Comedy - Personal vlog - Reviews - Storytelling </categories> ```
the AI responds with "Educational", so you then use the educational prompt template to generate the actual script content.
精译:路由过程分两步:① 分类(Categorization):把用户主题发给 AI,请求把它归入预定义体裁之一;② 专门处理(Specialized Processing):用分类结果去选择对应的提示词模板并生成内容。例如,用户输入「Python functions」作为主题,你先让 AI 分类:「把视频主题归入下列类别之一:<topic>Python functions</topic>、<categories>(Educational / Entertainment / Comedy / Personal vlog / Reviews / Storytelling)</categories>」。AI 回答「Educational」,于是你用教育类提示词模板生成实际脚本内容。
⭐⭐ 本课第三号考点(D1/D4)——两步路由是核心流程: * 两步:① Categorization(分类,AI 把主题归入预定义体裁)→ ② Specialized Processing(按类别选模板生成)。 * 分类示例:
Categorize the topic...+ XML 标签(<topic>包主题、<categories>包类别清单)——又是课时 5 的 XML 标签技巧(第 5 章)在架构里的复用。 * 决策点:AI 分类输出「Educational」→ 程序据此选模板(这是代码逻辑,不是 AI 决定用哪个模板——分类归 AI、选模板归代码)。
五、⭐⭐ 路由架构(Routing Workflow Architecture)
官方原句:A routing workflow follows this pattern:
- User input goes to a router component first
- The router categorizes the request using an initial the AI call**
- Based on the category, the input gets forwarded to one specific processing pipeline**
- Each pipeline can have its own workflow, prompts, or tools optimized for that category
The key insight is that user input only goes to one specialized pipeline, not all of them. This allows each pipeline to be highly optimized for its specific use case.
精译:路由工作流遵循这一模式:① 用户输入先到路由组件(router component);② 路由用一次初始 AI 调用给请求分类;③ 基于类别,输入被转发到某一条特定的处理管线;④ 每条管线可以有自己为该类优化的工作流、提示词或工具。关键洞察是:用户输入只进入一条专门管线,而非全部。这让每条管线都能针对其特定用例高度优化。
⭐⭐ 本课第四号考点(D1)——路由架构是架构题范本: * 四要素:Router(路由组件)→ Categorize(初始 AI 调用)→ Forward(转单管线)→ Optimized pipeline(各自工作流/提示词/工具)。 * 关键洞察:
input only goes to one specialized pipeline——一次只走一条(不是全部)。 * 价值:每条管线高度优化(highly optimized)——这与并行化「全部分发」、链式「顺序走完」都不同:路由是「选一条走」。
六、⭐⭐ 何时用路由(When to Use Routing)
官方原句:Routing workflows work well when:
- Your application handles diverse types of requests that need different approaches**
- You can clearly define categories that cover your use cases
- The categorization step can be handled reliably by the AI
- The performance benefit of specialized processing outweighs the overhead of the routing step
This pattern is especially valuable for customer service bots, content generation tools, and any application where the "right" response depends heavily on understanding the type of request being made.
精译:路由工作流在以下情况很有效:你的应用处理需要不同方式的多种类型请求;你能清楚定义覆盖你用例的类别;分类步骤能被 AI 可靠处理;专门处理的性能收益大于路由步骤的开销。这一模式对客服机器人、内容生成工具,以及任何「正确」回答高度依赖理解请求类型的应用尤其有价值。
⭐⭐ 本课第五号考点(D1)——适用条件四判据: * ① 请求多样需不同处理 ② 类别可清晰定义 ③ AI 分类可靠 ④ 收益 > 路由开销。 * ④ 是工程权衡点:
performance benefit outweighs overhead——路由本身有额外一次 AI 调用的成本,要划算才用。 * 典型场景:客服机器人、内容生成工具、响应依赖请求类型的应用。 * 记忆:类别清晰 + 分类可靠 + 收益>成本 → 用路由。
七、⭐ Key Takeaways(本课官方无独立 Key Takeaways 段,据正文反推)
- 路由:不同类型请求 → 分类 → 路由到专门管线(非一刀切)。
- 六大体裁:Entertainment / Educational / Comedy / Personal vlog / Reviews / Storytelling,各配模板。
- 两步:Categorization(AI 分类)→ Specialized Processing(代码选模板生成)。
- 架构:Router → 单管线;输入只走一条、各管线高度优化。
- 适用:请求多样、类别清晰、分类可靠、收益>开销。
🔤 本课新生词(临时小表 · 已回灌 30-单词表/04- 第 11 章分组)
| 星 | 词汇 | 音标 | 本课义 | 备注 |
|---|---|---|---|---|
| ⭐⭐ | routing (n.) / router (n.) |
/ˈruːtɪŋ/ |
路由 / 路由组件 | 三大工作流之一 |
| ⭐⭐ | one-size-fits-all (adj.) |
— | 一刀切的 | 反面做法 |
| ⭐⭐ | categorize (v.) |
/ˈkætəɡəraɪz/ |
分类 | 路由第一步 |
| ⭐⭐ | pipeline (n.) |
/ˈpaɪplaɪn/ |
管线、处理流程 | 路由的目标单元 |
| ⭐ | generic (adj.) |
/dʒəˈnerɪk/ |
通用的、泛化的 | generic prompt |
| ⭐ | genre (n.) |
/ˈʒɑːnrə/ |
体裁、类型 | 内容类别 |
| ⭐⭐ | entertainment (n.) |
/ˌentərˈteɪnmənt/ |
娱乐 | 体裁之一 |
| ⭐⭐ | educational (adj.) |
/ˌedʒuˈkeɪʃənl/ |
教育的 | 体裁之一 |
| ⭐ | comedy (n.) |
/ˈkɑːmədi/ |
喜剧 | 体裁之一 |
| ⭐ | vlog (n.) |
/vlɑːɡ/ |
视频博客 | 体裁之一 |
| ⭐ | review (n.) |
/rɪˈvjuː/ |
测评 | 已在 §4 课时1 收录 |
| ⭐⭐ | storytelling (n.) |
/ˈstɔːritelɪŋ/ |
讲故事 | 体裁之一 |
| ⭐ | trendy (adj.) |
/ˈtrendi/ |
流行的、时髦的 | 娱乐类特征 |
| ⭐ | relatable (adj.) |
/rɪˈleɪtəbl/ |
接地气的、能引起共鸣的 | 教育类特征 |
| ⭐ | digestible (adj.) |
/daɪˈdʒestəbl/ |
易于消化的、易懂的 | digestible insights |
| ⭐ | thought-provoking (adj.) |
— | 引人深思的 | 教育类模板特征 |
| ⭐ | immersive (adj.) |
/ɪˈmɜːrsɪv/ |
沉浸式的 | 故事类特征 |
| ⭐ | vivid (adj.) |
/ˈvɪvɪd/ |
生动的 | vivid details |
| ⭐⭐ | forward (v.) |
/ˈfɔːrwərd/ |
转发 | 已在 §3 课时10 收录 |
| ⭐ | overhead (n.) |
/ˈoʊvərhed/ |
开销、额外成本 | 路由步骤的成本 |
| ⭐ | outweigh (v.) |
/ˌaʊtˈweɪ/ |
大于、超过 | 收益>开销 |
| ⭐ | customer service bot |
— | 客服机器人 | 典型应用场景 |
| ⭐ | emphasize (v.) |
/ˈemfəsaɪz/ |
强调、侧重 | emphasizes practical tips(体裁提示词侧重) |
| ⭐ | clever (adj.) |
/ˈklevər/ |
巧妙的、机智的 | clever punchlines(喜剧管线特征) |
| ⭐ | authentic (adj.) |
/ɔːˈθentɪk/ |
真实的、地道的 | authentic, intimate content(Vlog管线特征) |
| ⭐⭐ | outweigh the overhead (phr.) |
— | 收益超越开销 | 收益>开销(路由模式落地的核心判据) |
课时 5 · Agents and tools
类型:🎬 视频 | lesson ID:
287803| 官方直链
🎯 本课学习目标(据官方段落反推)
- 能说出 agents 与 workflows 的分界:步骤已知用 workflow,步骤未知用 agent。
- 能解释 agent 的运行方式:给目标(goal) + 一组工具(tools),由模型自行组合达成。
- 能举例说明简单工具如何被链式组合成复杂行为(datetime 三工具 · 1→2→3 次调用)。
- 能说出 agent 会主动识别信息缺口并追问(90 天保修例子)。
- 能说出工具设计两条原则:抽象(abstract)而非过度专门化、可组合(combinable)。
一、开场:从工作流到智能体的转向
官方原句:Agents represent a shift from the structured workflows we've been working with. While workflows are perfect when you know the exact steps needed to complete a task, agents shine when you're not sure what those steps should be. Instead of defining a rigid sequence, you give the AI a goal and a set of tools, then let it figure out how to combine those tools to achieve the objective.
精译:智能体代表了对我们此前一直在用的结构化工作流的一次转向。当你明确知道完成任务所需的确切步骤时,工作流是完美的;而当你不确定这些步骤应该是什么时,智能体才大放异彩。与其定义一条僵化的序列,不如给 the AI 一个目标和一组工具,然后让它自己摸索如何组合这些工具来达成目标。
⭐ 承上启下(D1):前三课时的 Parallelization / Chaining / Routing 都是步骤由人定死;本课的 agent 是步骤由模型自己定。分水岭只有一句:你知道步骤 → workflow;你不知道 → agent。
二、⭐⭐ 灵活性及其代价(Flexibility and Its Trade-offs)
官方原句:This flexibility makes agents attractive for building applications that need to handle varied, unpredictable tasks. You can create an agent once, ensure it works reasonably well, and then deploy it to solve a wide range of problems. However, this flexibility comes with trade-offs in reliability and cost that we'll explore later.
精译:这种灵活性让智能体对需要处理多变、不可预测任务的应用很有吸引力。你可以一次创建一个智能体,确保它表现得还算不错,然后部署它去解决广泛的问题。然而,这种灵活性伴随着可靠性与成本上的权衡,我们稍后会探讨。
⭐⭐ 本课第一号考点(D1)——agent 的卖点与代价必须成对答: * 卖点:一次构建、广泛适用(
create once → solve a wide range of problems),适配 varied / unpredictable 任务。 * 代价:reliability(可靠性) 与 cost(成本) 两项 trade-off——官方明说「稍后探讨」,对应本章后续课时。 * ⚠️ 考场避坑:问「为什么不全部用 agent」时,标准答案是可靠性与成本,不是「技术上做不到」。
三、⭐⭐ 工具造就智能体(How Tools Make the Agent)
官方原句:The real power of agents lies in their ability to combine simple tools in unexpected ways. Consider a basic set of datetime tools:
get_current_datetime- Gets the current date and timeadd_duration_to_datetime- Adds time to a given dateset_reminder- Creates a reminder for a specific timeThese tools seem simple individually, but the AI can chain them together to handle surprisingly complex requests: For "What's the time?", the AI simply calls
get_current_datetime. But for "What day of the week is it in 11 days?", it chainsget_current_datetimefollowed byadd_duration_to_datetime. For setting a gym reminder next Wednesday, it might use all three tools in sequence.
精译:智能体的真正威力在于它能以出人意料的方式组合简单工具。看一组最基础的 datetime 工具:get_current_datetime 取当前日期与时间、add_duration_to_datetime 给给定日期加一段时间、set_reminder 为特定时间创建提醒。这些工具单个看起来都很简单,但 the AI 可以把它们串起来处理惊人复杂的请求:问「现在几点?」时,它只调用 get_current_datetime;问「11 天后是星期几?」时,它链式调用 get_current_datetime 再接 add_duration_to_datetime;要设一个「下周三去健身房的提醒」时,它可能按顺序用上全部三个工具。
⭐⭐ 本课第二号考点(D1/D4)——三个例子是难度递增的标准答案: * 1 个工具:What's the time? →
get_current_datetime(直呼即得)。 * 2 个工具:What day is it in 11 days? →get_current_datetime+add_duration_to_datetime(先取基准再推算)。 * 3 个工具:下周三健身房提醒 →get_current_datetime+add_duration_to_datetime+set_reminder(推算完再落地)。 * 命题点:工具本身没变,变的是组合方式与调用次数——这正是 agent 相对 workflow 的增量价值所在。
四、⭐⭐ 会主动索取缺失信息(Recognizing Missing Information)
官方原句:the AI can even recognize when it needs more information. If you ask "When does my 90-day warranty expire?", it knows to ask when you purchased the item before calculating the expiration date.
精译:the AI 甚至能意识到自己需要更多信息。如果你问「我的 90 天保修什么时候到期?」,它知道在计算到期日之前先问你是哪天买的。
⭐⭐ 本课第三号考点(D1)——缺参追问是 agent 的标志性行为: * 行为:不硬猜,先反问缺失参数(购买日期),拿到后再算。 * 对比:workflow 遇到缺参只能报错或走死分支;agent 会补一轮对话把它拿回来。 * ⚠️ 考场避坑:这不是「工具调用失败」,而是模型主动识别信息缺口——属 agent 自主性的体现。
五、⭐⭐ 工具应当抽象(Tools Should Be Abstract)
官方原句:The key insight for building effective agents is providing reasonably abstract tools rather than hyper-specialized ones. AI Code Assistant demonstrates this principle perfectly.
AI Code Assistant has access to generic, flexible tools like: *
bash- Run any command *read- Read any file *write- Create any file *edit- Modify files *glob- Find files *grep- Search file contentsIt notably doesn't have specialized tools like "refactor code" or "install dependencies." Instead, the AI figures out how to use the basic tools to accomplish these complex tasks. This abstraction allows it to handle countless programming scenarios that the developers never explicitly planned for.
精译:构建高效智能体的关键洞察是:提供适度抽象的工具,而不是过度专门化的工具。AI Code Assistant 完美示范了这一原则。它拥有的是通用、灵活的工具:bash 运行任意命令、read 读任意文件、write 创建文件、edit 修改文件、glob 查找文件、grep 搜索文件内容。值得注意的是,它并没有「重构代码」或「安装依赖」这类专门工具。相反,the AI 自己琢磨如何用这些基础工具完成这些复杂任务。这种抽象让它能应对开发者从未明确规划过的无数编程场景。
⭐⭐ 本课第四号考点(D4)——工具抽象度是工具设计的头号判据: * 原则:
reasonably abstract>hyper-specialized;通用原语 > 任务专用封装。 * 正面样板(AI Code Assistant 六工具):bash/read/write/edit/glob/grep——六个原语覆盖全部编程场景。 * 反面对照:官方明确点名不该做refactor code、install dependencies这类工具。 * 理由:countless scenarios the developers never explicitly planned for——组合空间 > 枚举空间。 * ⚠️ 考场连线:与第 6 章 tool schema 设计、第 9 章 MCP 三原语同一条设计哲学,可跨章作答。
六、⭐⭐ 最佳实践:可组合的工具(Best Practice: Combinable Tools)
官方原句:When designing agents, provide tools that the AI can combine in creative ways. For example, a social media video agent might include: *
bash- Access to FFMPEG for video processing *generate_image- Create images from prompts *text_to_speech- Convert text to audio *post_media- Upload content to social platformsThis tool set enables both simple workflows (create and post a video) and more interactive experiences where the agent might generate a sample image first, get user approval, then proceed with video creation. The agent can adapt its approach based on user feedback and preferences, something that would be difficult to achieve with a rigid workflow. This flexibility is what makes agents powerful for building dynamic, user-responsive applications.
精译:设计智能体时,要提供能被 the AI 创造性组合的工具。例如,一个社媒视频智能体可能包含:bash(调用 FFMPEG 做视频处理)、generate_image(据提示词生图)、text_to_speech(文本转语音)、post_media(上传内容到社交平台)。这套工具既支持简单工作流(生成并发布视频),也支持更强的交互体验——智能体可以先生成一张样图、取得用户认可,再继续做视频。智能体能根据用户反馈与偏好调整自己的做法,而这在僵化的工作流里很难实现。正是这种灵活性,让智能体成为构建动态、能响应用户的应用的利器。
⭐⭐ 本课第五号考点(D1/D4)——可组合工具集的三层价值: * 一套工具两种用法:既有简单直通路径(create → post),也有带人参与的交互路径(生图 → 等确认 → 做视频)。 * 关键差异点:
adapt based on user feedback——运行中据反馈改道,这是 rigid workflow 做不到的。 * 选型判据:需要动态、随用户响应而变化的应用 → agent;流程固定 → workflow。 * 记忆:工具要少而通用、留出组合空间;交互路径上留一个 human approval 节点。
七、⭐ Key Takeaways(本课官方无独立 Key Takeaways 段,据正文反推)
- 分界:步骤已知用 workflow,步骤未知用 agent(给 goal + tools)。
- 代价:灵活性换来的是 reliability 与 cost 两项权衡(后续课时展开)。
- 威力来源:简单工具的意外组合——datetime 三工具从 1 次到 3 次调用。
- 自主性:能识别信息缺口并追问(90 天保修先问购买日期)。
- 工具设计:抽象而非过度专门化、可组合、留出人在环路。
🔤 本课新生词(临时小表 · 已回灌 30-单词表/04- 第 11 章分组)
| 星 | 词汇 | 音标 | 本课义 | 备注 |
|---|---|---|---|---|
| ⭐⭐ | shift (n.) |
/ʃɪft/ | 转变、转向 | agents 对 workflows 的转向 |
| ⭐⭐ | rigid (adj.) |
/ˈrɪdʒɪd/ | 僵化的、固定的 | rigid sequence / rigid workflow |
| ⭐ | sequence (n.) |
/ˈsiːkwəns/ | 序列 | 与课时3 sequential 同源 |
| ⭐⭐ | objective (n.) |
/əbˈdʒektɪv/ | 目标 | achieve the objective |
| ⭐⭐ | flexibility (n.) |
/ˌfleksəˈbɪləti/ | 灵活性 | agent 的卖点 |
| ⭐ | attractive (adj.) |
/əˈtræktɪv/ | 有吸引力的 | makes agents attractive |
| ⭐⭐ | trade-off (n.) |
— | 权衡、代价 | 可靠性与成本两项 |
| ⭐⭐ | abstract (adj.) |
/ˈæbstrækt/ | 抽象的 | reasonably abstract tools |
| ⭐ | hyper-specialized (adj.) |
— | 过度专门化的 | 反面对照 |
| ⭐⭐ | combinable (adj.) |
— | 可组合的 | 最佳实践标题词 |
| ⭐ | bash (n.) |
/bæʃ/ | 命令行 | AI Code Assistant 工具之一 |
| ⭐ | glob (n./v.) |
/ɡlɑːb/ | 文件通配查找 | AI Code Assistant 工具之一 |
| ⭐ | grep (n./v.) |
/ɡrep/ | 文件内容检索 | AI Code Assistant 工具之一 |
| ⭐⭐ | refactor (v.) |
/ˌriːˈfæktər/ | 重构 | 官方点名「不该做成工具」 |
| ⭐ | dependency (n.) |
/dɪˈpendənsi/ | 依赖项 | install dependencies |
| ⭐ | FFMPEG |
— | 视频处理工具 | 经 bash 调用 |
| ⭐ | generate_image |
— | 生图工具 | 社媒视频智能体工具 |
| ⭐ | post_media |
— | 发布媒体工具 | 社媒视频智能体工具 |
| ⭐⭐ | approval (n.) |
/əˈpruːvl/ | 认可、批准 | get user approval |
| ⭐⭐ | adapt (v.) |
/əˈdæpt/ | 调整、适应 | 据反馈改道 |
| ⭐ | warranty (n.) |
/ˈwɔːrənti/ | 保修 | 90 天保修例子 |
| ⭐ | expire (v.) |
/ɪkˈspaɪər/ | 到期 | warranty expire |
| ⭐⭐ | unpredictable (adj.) |
/ˌʌnprɪˈdɪktəbl/ | 不可预测的 | agent 适用场景 |
| ⭐ | duration (n.) |
/duˈreɪʃn/ | 时长 | add_duration_to_datetime |
| ⭐ | reminder (n.) |
/rɪˈmaɪndər/ | 提醒 | set_reminder |
| ⭐⭐ | recognize (v.) |
/ˈrekəɡnaɪz/ | 识别、察觉 | recognize when it needs more info(主动追问能力) |
| ⭐ | demonstrate (v.) / demonstrates |
/ˈdemənstreɪt/ | 展示、证明 | demonstrates an important agent behavior |
| ⭐⭐ | abstraction (n.) |
/æbˈstrækʃn/ | 抽象、抽象度 | 工具设计的合适抽象层级(既不专门化也不过泛) |
| ⭐⭐ | explicitly (adv.) |
/ɪkˈsplɪsɪtli/ | 明确地、显式地 | primitive tools ... explicitly combined |
课时 6 · Environment inspection
类型:🎬 视频 | lesson ID:
287798| 官方直链
🎯 本课学习目标(据官方段落反推)
- 能定义 environment inspection(环境检视):让 AI 观察并理解自身行为的结果。
- 能解释为什么它必不可少(以 computer use 的截图回传为例)。
- 能说出先读后写这条文件操作铁律及其目的(不破坏既有功能)。
- 能写出引导检视的系统提示词(whisper.cpp 字幕 + FFmpeg 抽帧 + 对照需求)。
- 能复述四项收益与四个落地做法,并说出设计时的那句自问。
一、开场:智能体其实是"盲"的
官方原句:When building AI agents, one crucial concept often gets overlooked: environment inspection. the AI operates blindly - it needs to be able to observe and understand the results of its actions to work effectively.
精译:构建 AI 智能体时,有一个关键概念常被忽视:环境检视(environment inspection)。the AI 是盲目运作的——它需要能够观察并理解自己行为的结果,才能有效工作。
⭐ 承上启下(D1):课时 5 说 agent 靠「目标 + 工具」自主行动;本课补上闭环的另一半——没有观察,行动就没有反馈。记忆:agent loop = 行动 → 观察 → 再决策,缺了「观察」这一环,agent 就退化成盲目的命令执行器。
二、⭐⭐ 为什么环境检视至关重要(Why Environment Inspection Matters)
官方原句:Think about how the AI works with computer use. Every time the AI performs an action like typing text or clicking a button, it immediately receives a screenshot to understand what happened. This isn't just a nice-to-have feature - it's essential.
From the AI's perspective, clicking a button could navigate to a new page, open a menu, or trigger any number of changes. Without being able to see the results, the AI has no way to understand whether its action succeeded or what the new state of the environment looks like.
精译:想想 the AI 在 computer use 里是怎么工作的。每次它执行一个动作,比如输入文字或点击按钮,都会立刻收到一张截图,以理解发生了什么。这不只是锦上添花的特性,而是必不可少的。在 the AI 看来,点击一个按钮可能跳转到新页面、打开一个菜单,或触发任意多种变化。如果看不到结果,它就无从判断自己的动作是否成功,也不知道环境的新状态长什么样。
⭐⭐ 本课第一号考点(D1)——「为什么必须有检视」的标准答法: * 机制:每次动作(typing / clicking)之后立即回传一张截图。 * 定性:
not just a nice-to-have — it's essential——不是加分项,是必需品。 * 根因:同一个动作的结果不确定——点一个按钮可能跳转 / 开菜单 / 触发任意变化。 * 后果:看不到结果 → 无法判断成功与否,也拿不到环境新状态(new state of the environment)。 * ⚠️ 考场避坑:不要答成"为了用户体验"或"为了日志审计",标准答案是让模型能判断动作成败并获知新状态。
三、⭐⭐ 先读后写(Reading Before Writing)
官方原句:This same principle applies to file operations. Before the AI can modify any file, it needs to understand the current contents. This might seem obvious, but it's a pattern you should always follow when building agents.
In the example above, when asked to add a new route to a Python file, the AI first reads the existing code to understand the current structure. Only then can it safely make the requested changes without breaking existing functionality.
精译:同一条原则也适用于文件操作。在 the AI 修改任何文件之前,它需要先理解当前内容。这看似显而易见,但这是你构建智能体时应始终遵循的模式。在上例中,当被要求给一个 Python 文件添加一条新路由时,the AI 先读取现有代码以理解当前结构。只有这样,它才能安全地做出所要求的改动,而不破坏既有功能。
⭐⭐ 本课第二号考点(D1/D2)——read before write 是铁律级模式: * 铁律:改文件前先读文件(
read before write)——官方说这是a pattern you should always follow。 * 实例:给 Python 文件加一条新路由(route) → 先读现有代码摸清结构 → 再改。 * 目的:without breaking existing functionality——不破坏既有功能。 * ⭐ 跨课连线:这正是课时 5 讲的 AI Code Assistant 六原语里read/edit存在的理由——光有"能写的工具"不够,还必须配"能看的工具"。
四、⭐⭐ 用系统提示词引导环境检视(System Prompts for Environment Inspection)
官方原句:You can guide the AI to inspect its environment through system prompts. For complex tasks like video generation, this becomes especially important.
Consider a video creation agent that needs to: * Generate video content using tools like FFmpeg * Verify that audio dialogue is placed correctly * Check that visual elements appear as expected
You might include system prompt instructions like: * Use the bash tool to run whisper.cpp and generate caption files with timestamps to verify dialogue placement * Use FFmpeg to extract screenshots from the video at regular intervals to visually inspect the output * Compare the generated content against the original requirements
精译:你可以通过系统提示词引导 the AI 去检视它的环境。对于视频生成这类复杂任务,这一点尤其重要。设想一个视频创作智能体需要:用 FFmpeg 之类的工具生成视频内容、验证音频对白的位置是否正确、检查视觉元素是否如期出现。你可以加入这样的系统提示词指令:用 bash 工具运行 whisper.cpp,生成带时间戳的字幕文件,以验证对白位置;用 FFmpeg 按固定间隔从视频中抽取截图,以目视检视产出;把生成的内容与原始需求做对照。
⭐⭐ 本课第三号考点(D1/D3)——检视要写进 system prompt,不能指望模型自发: * 手段:用 system prompt 主动规定检视动作(
guide ... through system prompts)。 * 三条指令(背下来):①bash跑 whisper.cpp 生成带时间戳的字幕文件 → 验证对白摆放;② 用 FFmpeg 按固定间隔抽帧 → 目视检视画面;③ 产出与原始需求对照。 * ⭐ 与课时 5 闭环:课时 5 的社媒视频智能体只有bash/generate_image/text_to_speech/post_media——只有"生成能力";本课给它补上"怎么验"。生成能力 + 检视能力,才构成一个完整智能体。 * ⚠️ 考场要点:题目问「如何让智能体验证自己的产出」,答在系统提示词中明确要求检视步骤,而不是"换更强的模型"或"多跑几次"。
五、⭐⭐ 环境检视的四项收益(Benefits of Environment Inspection)
官方原句:When the AI can inspect its environment, several things improve: * Better progress tracking - the AI can gauge how close it is to completing a task * Error handling - Unexpected results can be detected and corrected * Quality assurance - Output can be verified before considering a task complete * Adaptive behavior - the AI can adjust its approach based on what it observes
精译:当 the AI 能检视环境时,有几点会改善:更好的进度跟踪——它能判断自己离完成任务还有多远;错误处理——意外结果能被发现并纠正;质量保证——在判定任务完成之前先验证产出;自适应行为——它能根据观察到的情况调整做法。
⭐⭐ 本课第四号考点(D1)——四项收益是可直接命题的枚举题: * ① progress tracking:
gauge how close it is to completing——能估进度。 * ② error handling:unexpected results detected and corrected——能发现并纠错。 * ③ quality assurance:output verified before considering a task complete——完成前先验货。 * ④ adaptive behavior:adjust its approach based on what it observes——据观察改打法。 * 记忆:估进度 · 能纠错 · 先验货 · 会改道——四项顺序也常作为选项顺序出现。
六、⭐⭐ 落地实现:一句自问与四个做法(Practical Implementation)
官方原句:When designing your own agents, always ask: "How will the AI know if this action worked?" Whether you're working with files, APIs, or user interfaces, provide tools and instructions that let the AI observe the results of its actions.
This might mean: * Reading file contents before modifications * Taking screenshots after UI interactions * Checking API responses for expected data * Validating generated content against requirements
精译:设计你自己的智能体时,永远要问:「the AI 怎么会知道这个动作生效了?」无论你处理的是文件、API 还是用户界面,都要提供能让 the AI 观察到自身行为结果的工具与指令。这可能意味着:修改前先读文件内容、UI 交互后截图、检查 API 响应里是否有预期数据、对照需求校验生成的内容。
⭐⭐ 本课第五号考点(D1/D4)——设计期自问是本节最可迁移的一句话: * 自问:
How will the AI know if this action worked?——每设计一个动作都问一遍。 * 四个做法:改前读文件(files)/交互后截图(UIs)/查 API 响应(APIs)/产出对照需求校验(generated content)。 * 覆盖面:files / APIs / UIs 三类环境都要配观察手段——只给工具不给观察 = 盲执行。 * ⚠️ 考场连线:与 D4「工具设计」直接咬合——工具集里必须同时有「作用型」与「观察型」两类工具。
七、⭐ Key Takeaways(本课官方无独立 Key Takeaways 段,据正文反推)
官方收尾原句:Environment inspection transforms the AI from a blind executor of commands into an agent that can truly understand and adapt to its working environment. 精译:环境检视把 the AI 从一个盲目的命令执行者,转变为真正能理解并适应其工作环境的智能体。
- 定义:环境检视=观察并理解自身行为的结果;AI 默认盲目运作。
- 必要性:不是加分项是必需——同一个动作结果不确定,不看来就不知成败与新状态。
- 铁律:先读后写(改 Python 文件加路由前先读现有代码),目的是不破坏既有功能。
- 手段:用 system prompt 规定检视动作(whisper.cpp 带时间戳字幕 → 验对白;FFmpeg 定期抽帧 → 验画面;产出对照需求)。
- 四项收益:估进度 · 能纠错 · 先验货 · 会改道。
- 落地:设计每个动作都自问「AI 怎么知道这步生效了?」,并为 files / APIs / UIs 各配观察手段。
🔤 本课新生词(临时小表 · 已回灌 30-单词表/04- 第 11 章分组)
| 星 | 词汇 | 音标 | 本课义 | 备注 |
|---|---|---|---|---|
| ⭐⭐ | environment inspection |
— | 环境检视 | 本课核心术语 |
| ⭐⭐ | blindly (adv.) |
/ˈblaɪndli/ | 盲目地 | operates blindly |
| ⭐⭐ | observe (v.) |
/əbˈzɜːrv/ | 观察 | 检视的动作 |
| ⭐⭐ | screenshot (n.) |
/ˈskriːnʃɑːt/ | 截图 | computer use 的回传物 |
| ⭐ | nice-to-have (adj.) |
— | 锦上添花的 | 官方否定项 |
| ⭐ | navigate (v.) |
/ˈnævɪɡeɪt/ | 跳转、导航 | 点按钮的可能结果之一 |
| ⭐ | trigger (v.) |
/ˈtrɪɡər/ | 触发 | trigger any number of changes |
| ⭐⭐ | state (n.) |
/steɪt/ | 状态 | new state of the environment |
| ⭐⭐ | gauge (v.) |
/ɡeɪdʒ/ | 判断、衡量 | gauge how close |
| ⭐⭐ | unexpected (adj.) |
/ˌʌnɪkˈspektɪd/ | 意外的 | unexpected results |
| ⭐⭐ | quality assurance |
— | 质量保证 | 四项收益之一 |
| ⭐⭐ | adaptive (adj.) |
/əˈdæptɪv/ | 自适应的 | 与课时5 adapt 同源 |
| ⭐ | whisper.cpp |
— | 语音转写工具 | 经 bash 生成字幕 |
| ⭐ | caption (n.) |
/ˈkæpʃn/ | 字幕 | caption files |
| ⭐⭐ | timestamp (n.) |
/ˈtaɪmstæmp/ | 时间戳 | 验证对白位置的关键 |
| ⭐⭐ | interval (n.) |
/ˈɪntərvl/ | 间隔 | at regular intervals |
| ⭐⭐ | extract (v.) |
/ɪkˈstrækt/ | 提取、抽取 | FFmpeg 抽帧 |
| ⭐ | dialogue (n.) |
/ˈdaɪəlɔːɡ/ | 对白 | audio dialogue |
| ⭐⭐ | visual element |
— | 视觉元素 | 需检视的对象 |
| ⭐⭐ | route (n.) |
/ruːt/ | (代码)路由 | Python 文件加 route |
| ⭐⭐ | executor (n.) |
/ɪɡˈzekjətər/ | 执行者 | blind executor |
| ⭐ | modify (v.) |
/ˈmɑːdɪfaɪ/ | 修改 | 需先读后写 |
| ⭐ | existing functionality |
— | 既有功能 | 不能被破坏的对象 |
| ⭐⭐ | crucial (adj.) |
/ˈkruːʃl/ | 关键的 | crucial concept |
| ⭐⭐ | overlooked (adj.) |
/ˌoʊvərˈlʊkt/ | 被忽视的 | often gets overlooked |
课时 7 · Workflows vs agents
类型:🎬 视频 | lesson ID:
287794| 官方直链
🎯 本课学习目标(据官方段落反推)
- 能给出 workflows 与 agents 的正式定义,并说出各自的适用前提(步骤能否预先想清)。
- 能逐条复述 Workflows 四项优势与 Agents 四项优势。
- 能逐条复述 Workflows 三项劣势与 Agents 三项劣势。
- 能说出工程师的第一目标是可靠地解决问题,而非做出花哨的智能体。
- 能背下官方选型建议:优先 workflow,只在真正必需时才用 agent,并给出两条判据。
一、开场:两条架构路线的取舍
官方原句:When building AI-powered applications, you'll often need to choose between two different architectural approaches: workflows and agents. Each has distinct advantages and trade-offs that make them suitable for different scenarios.
精译:构建 AI 驱动的应用时,你常常需要在两种不同的架构路线之间做选择:工作流与智能体。二者各有不同的优势与权衡,因而适用于不同场景。
⭐ 承上启下(D1):课时 1 抛出「Workflows vs Agents」的分界,课时 2–4 讲三种 workflow 模式,课时 5–6 讲 agent 与它的观察闭环;本课把两条线正式对撞并给出选型结论——本章的题眼就在这一课。
二、⭐⭐ 什么是 Workflows(What Are Workflows?)
官方原句:Workflows are a predefined series of calls to the AI designed to solve a known problem or set of problems. You use workflows when you can picture the flow of steps ahead of time - essentially when you know the exact sequence needed to complete a task.
Think of workflows as breaking down a big task into much smaller, more specific subtasks. Each step focuses on a single area, which allows the AI to work more precisely.
精译:工作流是一系列预先定义好的 AI 调用,用于解决一个已知问题或一组已知问题。当你能提前想清步骤的流向时就该用工作流——本质上就是你明确知道完成任务所需的确切顺序时。可以把工作流理解为把一个大任务拆成更小、更具体的子任务。每一步只聚焦一个方面,这让 AI 工作得更精确。
⭐⭐ 本课第一号考点(D1)——Workflows 的定义三要素: * ①
predefined series of calls——预先定义好的一串调用(不是运行时才定的)。 * ②solve a known problem——解决已知问题。 * ③picture the flow of steps ahead of time——提前能想清步骤流向。 * 拆分观:breaking down a big task into smaller, more specific subtasks——大任务 → 小且具体的子任务,每步只管一件事 → 更精确。
三、⭐⭐ 什么是 Agents(What Are Agents?)
官方原句:With agents, the AI gets a set of basic tools and is expected to formulate a plan to use these tools to complete a task. Unlike workflows, you don't know exactly what tasks will be provided, so the system needs to be more adaptive.
Agents can creatively figure out how to handle a wide variety of challenges by combining tools in unexpected ways.
精译:在智能体模式下,AI 拿到一组基础工具,并被要求自行制定计划来使用这些工具完成任务。与工作流不同,你并不确切知道会被交给什么任务,因此系统需要更具适应性。智能体能创造性地通过以出人意料的方式组合工具,弄明白如何应对各种各样的挑战。
⭐⭐ 本课第二号考点(D1)——Agents 的定义三要素: * ①
a set of basic tools——一组基础工具(配合课时 5 的抽象、可组合原则)。 * ②formulate a plan——自己制定计划(步骤不是人写死的)。 * ③more adaptive——任务不可预知 → 系统必须更自适应。 * 能力来源:combining tools in unexpected ways→ 能应对 a wide variety of challenges。
四、⭐⭐ 优势对照(Benefits)
官方原句 · Workflows 的四项优势: * the AI can focus on one subtask at a time, generally leading to higher accuracy * Far easier to evaluate and test, since you know each exact step * More predictable and reliable execution * Better suited for solving specific, well-defined problems
官方原句 · Agents 的四项优势: * Allow for more flexible user experience * Far more flexible task completion - the AI can combine tools in unexpected ways to complete a wide variety of tasks * Can handle novel situations that weren't anticipated during development * Can ask users for additional input when needed
精译:Workflows 的优势是——AI 一次只聚焦一个子任务,通常带来更高的准确率;由于你清楚每一个确切步骤,评估与测试要容易得多;执行更可预测、更可靠;更适合解决具体且定义良好的问题。Agents 的优势是——容许更灵活的用户体验;任务完成方式灵活得多,AI 能以意外的方式组合工具去完成各种各样的任务;能应对开发时未曾预见的新情况;需要时能向用户索要补充信息。
⭐⭐ 本课第三号考点(D1)——八项优势必须能左右对举:
| Workflows 的优势 | Agents 的优势 | |
|---|---|---|
| 1 | 一次只做一件事 → 准确率更高 | 用户体验更灵活 |
| 2 | 步骤已知 → 极易评估与测试 | 完成方式灵活:意外组合工具做大范围任务 |
| 3 | 执行更可预测、更可靠 | 能处理开发时未预见的新情况 |
| 4 | 适合具体、定义良好的问题 | 缺信息时可向用户追问 |
⚠️ 记忆法:Workflows 全在「准、稳、可测、边界清」这一侧;Agents 全在「活、广、新、会追问」这一侧。 ⭐ 跨课连线:第 4 项「向用户追问」正是课时 5 的保修例子(先问购买日期),第 4 章讲的 eval 之所以难,也正对应下面 Agents 的第二项劣势。
五、⭐⭐ 劣势对照(Downsides)
官方原句 · Workflows 的三项劣势: * Far less flexible - dedicated to solving specific types of tasks * Generally more constrained user experience - you need to know the exact inputs to the flow * Require more upfront planning and design work
官方原句 · Agents 的三项劣势: * Lower successful task completion rate compared to workflows * More challenging to instrument, test, and evaluate since you often don't know what series of steps an agent will execute * Less predictable behavior
精译:Workflows 的劣势是——灵活性差得多,专用于解决特定类型的任务;用户体验通常更受限——你必须事先知道流程的确切输入;需要更多前期规划与设计工作。Agents 的劣势是——与工作流相比,任务成功完成率更低;埋点、测试与评估都更困难,因为你往往不知道智能体会执行怎样一串步骤;行为更不可预测。
⭐⭐ 本课第四号考点(D1)——六项劣势是最常见的「反选」陷阱:
| Workflows 的劣势 | Agents 的劣势 | |
|---|---|---|
| 1 | 灵活性差:只解特定类型任务 | 任务成功率更低(lower completion rate) |
| 2 | 用户体验受限:需预知确切输入 | 难埋点/难测试/难评估(instrument, test, and evaluate) |
| 3 | 前期规划与设计工作量更大 | 行为更不可预测(less predictable) |
⚠️ 考场避坑:问「agent 的最大问题是什么」,首选成功率与可测性,不要答"成本"——成本在课时 5 提过,但本课官方列的硬指标是 completion rate 与 instrument/test/evaluate。 ⭐ 跨章连线:第 2 项与第 4 章 Prompt Evaluation 直接咬合——步骤未知 ⇒ 无法构造确定性测试集,这是 eval 难的根因。
六、⭐⭐ 何时用哪个(When to Use Each Approach)
官方原句:Your primary goal as an engineer is to solve problems reliably. Users probably don't care that you've built a fancy agent - they want a product that works consistently.
The general recommendation is to always focus on implementing workflows where possible, and only resort to agents when they are truly required. Workflows provide the reliability and predictability that most production applications need, while agents offer flexibility for scenarios where the exact requirements can't be predetermined.
Consider workflows when you have well-defined processes and agents when you need to handle unpredictable, varied user requests that require creative problem-solving.
精译:作为工程师,你的首要目标是可靠地解决问题。用户大概并不在乎你做了一个多花哨的智能体——他们要的是能稳定工作的产品。总体建议是:尽可能始终优先实现工作流,只在真正必需时才诉诸智能体。工作流提供多数生产级应用所需的可靠性与可预测性;而智能体则为那些确切需求无法预先确定的场景提供灵活性。流程定义良好时用工作流;需要应对不可预测、多样化的用户请求、且需要创造性解题时用智能体。
⭐⭐ 本课第五号考点(D1)——官方选型结论,几乎必考: * 第一原则:
primary goal ... is to solve problems reliably——可靠地解决问题优先于技术炫技;users don't care about a fancy agent——用户只在乎稳定。 * 官方推荐(背下来):always focus on implementing workflows where possible, and only resort to agents when they are truly required——能上 workflow 就上 workflow,agent 是最后手段。 * 分工:workflow = 可靠性 + 可预测性(生产应用刚需);agent = 灵活性(需求无法预先确定的场景)。 * 两条判据:① 流程 well-defined → workflow;② 请求 unpredictable / varied 且需 creative problem-solving → agent。 * ⚠️ 考场避坑:题目问「应该默认选哪个」时,答案是 workflow,不是 agent——哪怕题干把业务描述得很复杂。
七、⭐ Key Takeaways(本课官方无独立 Key Takeaways 段,据正文反推)
- Workflows:预定义的调用序列,解已知问题,提前能想清步骤;本质是大任务拆小、每步只管一件事。
- Agents:一组基础工具 + 自行制定计划;任务不可预知 ⇒ 系统必须自适应,靠意外组合解题。
- 优势对举:Workflows=准、稳、可测、边界清;Agents=活、广、新、会追问。
- 劣势对举:Workflows=不灵活、输入受限、前期设计重;Agents=成功率低、难埋点测试评估、行为不可预测。
- 选型总则:目标是可靠解题;优先 workflow,agent 仅在真正必需时;流程明确 → workflow,请求多变需创造性 → agent。
🔤 本课新生词(临时小表 · 已回灌 30-单词表/04- 第 11 章分组)
| 星 | 词汇 | 音标 | 本课义 | 备注 |
|---|---|---|---|---|
| ⭐⭐ | architectural approach |
— | 架构路线 | two different architectural approaches |
| ⭐⭐ | picture (v.) |
/ˈpɪktʃər/ | 构想、想见 | picture the flow of steps |
| ⭐⭐ | ahead of time |
— | 提前、事先 | workflow 的适用前提 |
| ⭐⭐ | flow of steps |
— | 步骤流向 | 能否预先想清是分水岭 |
| ⭐⭐ | formulate (v.) |
/ˈfɔːrmjuleɪt/ | 制定(计划) | formulate a plan |
| ⭐⭐ | creatively (adv.) |
/kriˈeɪtɪvli/ | 创造性地 | agent 的解题方式 |
| ⭐⭐ | accuracy (n.) |
/ˈækjərəsi/ | 准确率 | workflow 优势之一 |
| ⭐⭐ | well-defined (adj.) |
— | 定义良好的 | well-defined problems / processes |
| ⭐⭐ | novel (adj.) |
/ˈnɑːvl/ | 新颖的、未曾预见的 | novel situations |
| ⭐⭐ | downside (n.) |
/ˈdaʊnsaɪd/ | 劣势、缺点 | 本课对照词 |
| ⭐⭐ | constrained (adj.) |
/kənˈstreɪnd/ | 受限的 | 与课时1 constrain 同源 |
| ⭐⭐ | dedicated to |
— | 专用于 | dedicated to specific tasks |
| ⭐⭐ | completion rate |
— | 完成率 | lower successful task completion rate |
| ⭐⭐ | instrument (v.) |
/ˈɪnstrəment/ | 埋点、插桩 | instrument, test, and evaluate |
| ⭐⭐ | fancy (adj.) |
/ˈfænsi/ | 花哨的 | a fancy agent |
| ⭐⭐ | consistently (adv.) |
/kənˈsɪstəntli/ | 稳定地、一贯地 | works consistently |
| ⭐⭐ | primary goal |
— | 首要目标 | solve problems reliably |
| ⭐⭐ | resort to (phr.) |
/rɪˈzɔːrt/ | 诉诸、求助于 | only resort to agents |
| ⭐⭐ | predetermined (adj.) |
/ˌpriːdɪˈtɜːrmɪnd/ | 预先确定的 | can't be predetermined |
| ⭐⭐ | production application |
— | 生产级应用 | 需要可靠与可预测 |
| ⭐⭐ | varied (adj.) |
/ˈverid/ | 多样的 | unpredictable, varied user requests |
| ⭐⭐ | creative problem-solving |
— | 创造性解题 | 选 agent 的判据之一 |
| ⭐ | evaluate (v.) |
/ɪˈvæljueɪt/ | 评估 | 与第 4 章 prompt evaluation 同源 |
| ⭐ | requirement (n.) |
/rɪˈkwaɪərmənt/ | 需求 | exact requirements |
| ⭐ | scenario (n.) |
/səˈnærioʊ/ | 场景 | different scenarios |
| ⭐⭐ | anticipated (adj.) / anticipate (v.) |
/ænˈtɪsɪpeɪtɪd/ |
预料到的 | weren't anticipated during development |
| ⭐⭐ | reliably (adv.) |
/rɪˈlaɪəbli/ |
可靠地 | solve problems reliably(工程师首要目标) |
课时 8 · Quiz on Agents and Workflows
类型:📝 测验 | lesson ID:
289130| 官方直链
测验战绩:🎉 You have passed! · 6 of 7 Correct (85%) · 耗时 3 分钟
CCAR-F 核心考点:D1(系统架构与智能体编排,27%)+ D4(工具使用与抽象,18%)
🎯 测验总览与考点映射
本测验共 7 道单选题,全面覆盖第 11 章四大工作流模式与智能体选型准则: * Q1:智能体工具设计准则(抽象度与可组合性 · 课时 5) * Q2:自我评估与优化循环(Evaluator-Optimizer 模式识别 · 课时 1)⚠️ 重点错题剖析 * Q3:多体裁内容定向处理(Routing 工作流识别 · 课时 4) * Q4:长提示词违规解法(Chaining 解决 Long Prompt Problem · 课时 3) * Q5:多独立维度决策评估(Parallelization 并行化分治 · 课时 2) * Q6:架构选型首要判据(追求可靠性选 Workflow · 课时 7) * Q7:确定性序列业务选型(已知确切步骤选 Workflow · 课时 1 / 7)
📝 全真试题逐题精析
Question 1 · 智能体工具设计的抽象度原则(课时 5 · D4/D1)
官方原题:You're building an agent with tools. Which approach will give Claude the most flexibility to handle unexpected requests?
题目翻译:你正在用工具构建一个智能体。哪种方法能赋予 Claude 最大的灵活性来处理未曾预料到的请求?
- [ ] A. Give Claude only one powerful tool(只给 Claude 一个功能强大的单一工具)
- [ ] B. Provide very specific tools like "write_python_function" and "debug_code"(提供非常具体的工具,如 "write_python_function" 和 "debug_code")
- [x] C. Provide abstract tools like "read_file", "write_file", and "run_command"(提供抽象的基础工具,如 "read_file"、"write_file" 和 "run_command") ✅ Correct
- [ ] D. Provide tools that only work for planned scenarios(提供仅适用于预设规划场景的工具)
⭐ 考点精析(课时 5): * 正解解析:官方在课时 5(Agents and tools)以 AI Code Assistant 为例明确指出:不要给过度专门化(hyper-specialized)的死板工具(如
refactor_code、debug_code),而应提供适度抽象(reasonably abstract)、原子化的基础工具(如read_file、write_file、bash/run_command)。这些基础工具能被模型在运行时像乐高积木一样灵活显式组合(explicitly combined),从而赋予模型应对未知复杂挑战(unexpected requests)的最大灵活性。 * 干扰项避坑:选项 A 单一工具缺乏组合能力;选项 B 是典型的 hyper-specialized 反模式;选项 D 违背了智能体自适应的核心价值。
Question 2 · 报告检查与自我迭代优化(课时 1 · D1)⚠️ 重点错题复盘
官方原题:You want Claude to write a report, then check if it's good enough, and improve it if needed. What pattern are you using?
题目翻译:你想让 Claude 写一份报告,然后检查报告是否足够好,并在需要时进行改进。你使用的是哪种模式?
- [ ] A. Chaining workflow(链式工作流)
- [x] B. Evaluator-Optimizer pattern(评估-优化模式) ✅ Correct answer
- [ ] C. Parallelization workflow(并行化工作流)
- [ ] D. Routing workflow(路由工作流)
⚠️ 错题深度复盘与辨析: * 易混淆点诊断:很多学员容易误选 Chaining workflow,直觉认为这是“先写报告、再检查、再改写”的三步流水线。 * 本质区别(必背): * Chaining(链式):是单向、固定序列(sequential)流转。每一步接收上一步输出,没有自我评估通过与否的判断逻辑,更没有循环回流机制。 * Evaluator-Optimizer(评估-优化):拥有完整的闭环四要素: 1. Producer(写报告:
write a report) 2. Grader(依据标准检查是否合格:check if it's good enough) 3. Feedback loop(不合格时打回反馈:feedback goes back) 4. Iteration(重复改进直到通过:improve it if needed) * 考场触发词(Trigger):题干中只要出现「check if it's good enough(评判合格性)」+「improve if needed / iterate(按反馈改进迭代)」,必选 Evaluator-Optimizer,绝非普通 Chaining!
Question 3 · 多体裁内容路由管线分流(课时 4 · D1)
官方原题:Your app generates different types of social media content. Programming topics need educational scripts, while sports topics need entertainment-focused content. What pattern should you use?
题目翻译:你的应用生成不同类型的社交媒体内容。编程类主题需要教育型文案,而体育类主题需要娱乐型内容。你应该使用什么模式?
- [x] A. Route requests to specialized processing pipelines(将请求路由到专门的处理管线) ✅ Correct
- [ ] B. Use the same prompt for everything(对所有内容使用同一个提示词)
- [ ] C. Ask users to write their own content(让用户自己写内容)
- [ ] D. Always use the entertainment approach(始终使用娱乐化方案)
⭐ 考点精析(课时 4): * 正解解析:课时 4(Routing workflows)的核心正是解决通用提示词(generic prompt)无法同时胜任不同内容体裁的问题。编程(Programming)需要要点清晰、突出实用的教育脚本(educational),而体育(Sports)需要紧跟潮流、幽默有趣的娱乐文案(entertainment)。通过第一步 Router 分类,将不同请求分别派发至专门高度优化的子管线(specialized processing pipelines),是该场景的标准架构解法。 * 干扰项避坑:选项 B 是典型的「一刀切(one-size-fits-all)」反模式;选项 D 忽略了不同领域的专业调性要求。
Question 4 · 长提示词漏守规则解法(课时 3 · D1/D3)
官方原题:Claude keeps ignoring some of your rules when you give it a long prompt with many requirements. What workflow approach would help?
题目翻译:当你给 Claude 一个包含众多要求的长提示词时,它总是忽略你的某些规则。哪种工作流方法会有帮助?
- [ ] A. Make the prompt even longer with more rules(把提示词写得更长,塞入更多规则)
- [ ] B. Run everything in parallel(把所有事情并行执行)
- [ ] C. Use a routing workflow to categorize first(先使用路由工作流进行分类)
- [x] D. Chain the task into focused sequential steps(将任务链式拆解为更聚焦的顺序步骤) ✅ Correct
⭐ 考点精析(课时 3): * 正解解析:课时 3 专门深入讨论了 Long Prompt Problem(长提示词综合症):当单提示词充斥大量创作要求与消极约束时,模型因注意力分散极易违规(如漏掉无 emoji、泄露 AI 身份等)。官方推荐的根治方案是链式分步(Chaining): * Step 1(聚焦创作):先专注写出内容初稿,接受其可能存在瑕疵。 * Step 2(聚焦审查修正):专门发一条后续请求,只做合规性审查与修订(Revision)。拆分后每一步只管一件事,准确率大幅提升。 * 干扰项避坑:选项 A 火上浇油;选项 B 子任务间有先后依赖(必须先有草稿才能审查),不可并行;选项 C 路由用于类型分流,无法解决单任务多约束遗漏问题。
Question 5 · 多材料独立决策并行化评估(课时 2 · D1)
官方原题:You need Claude to recommend the best material for a part by considering metal, plastic, ceramic, and wood options. Each material has different criteria. What's the best approach?
题目翻译:你需要 Claude 综合考虑金属、塑料、陶瓷和木材选项,为某个零件推荐最佳材料。每种材料有不同的评估标准。最好的方法是什么?
- [ ] A. Chain the evaluations one after another(将各项评估串联依次执行)
- [ ] B. Ask Claude to pick randomly(让 Claude 随机挑选)
- [x] C. Send separate requests for each material type in parallel(为每种材料类型并行发送独立的评估请求) ✅ Correct
- [ ] D. Put all criteria in one big prompt(将所有评估标准放入一个巨型提示词中)
⭐ 考点精析(课时 2): * 正解解析:完全契合课时 2(Parallelization workflows)官方材料设计器案例(material designer example)!针对金属、塑料、陶瓷、木材等候选材料,各自的物理特性与评估标准互不干扰(interfere)。如果按选项 D 硬塞入单巨型提示词(massive prompt),会导致模型认知负荷过载(cognitive load)并给出次优推荐(suboptimal)。最佳实践是Split 分流并行发送独立请求(in parallel),最后进行聚合决策(Aggregation)。 * 考点连线:正如我们在课时 2 重点学到的:并行化的子任务不必完全相同(not need to be identical),每种材料都可以携带专门针对该材质的 prompt 和 criteria。
Question 6 · 架构选型首要判据:可靠性优先(课时 7 · D1)
官方原题:You need to choose between a workflow and an agent for your app. Reliability and predictable results are most important to you. Which should you pick?
题目翻译:你需要在工作流与智能体之间为你的应用做选择。可靠性与可预测的结果对你最为重要。你应该选哪个?
- [ ] A. Always use an agent for maximum flexibility(始终使用智能体以获得最大灵活性)
- [x] B. Use a workflow since it's more reliable and testable(使用工作流,因为它更可靠且更易测试) ✅ Correct
- [ ] C. Combine both approaches equally(将两种方法五五平分混合)
- [ ] D. Use whichever is easier to code(哪个好写代码就用哪个)
⭐ 考点精析(课时 7): * 正解解析:课时 7 官方选型第一戒律:Your primary goal as an engineer is to solve problems reliably. Users don't care about a fancy agent - they want a product that works consistently. 工作流的四项核心优势正是高准确率、极易测试与评估(testable/evaluable)、执行可预测、可靠性高。当可靠性(Reliability)和结果可预测(Predictable results)是第一诉求时,毫不犹豫选 Workflow! * 官方推荐背诵:
always focus on implementing workflows where possible, and only resort to agents when they are truly required。
Question 7 · 确定性流程场景选型(课时 1 / 7 · D1)
官方原题:You're building an app where users upload photos of damaged car parts and always get repair cost estimates. You know exactly what steps are needed each time. What should you use?
题目翻译:你正在构建一个应用,用户上传受损汽车零件的照片,每次都能获取维修费用估算。你非常明确每次需要执行的确切步骤。你应该使用什么?
- [ ] A. Multiple agents working together(多个智能体协同工作)
- [ ] B. A single complex prompt(单个复杂的单提示词)
- [ ] C. An agent with many specialized tools(配有许多专用工具的智能体)
- [x] D. A workflow with predetermined steps(具有预定义步骤的工作流) ✅ Correct
⭐ 考点精析(课时 1 / 7): * 正解解析:与课时 1 的 Image to CAD 经典范式完全同构!场景满足选 Workflow 的核心黄金判据:明确知道每一步该做什么(know exactly what steps are needed),能够提前在脑海中描摹出流程的流向(picture the flow of steps ahead of time)。因此,由代码固化的预定义步骤工作流(workflow with predetermined steps)是唯一正确选择。 * 干扰项避坑:步骤已明确确定的任务,强行上 Agent 不仅引入随机性导致失败率上升,还会大幅增加运行延迟与 Token 成本。
📊 章末测验全真考点规律与高频触发词矩阵
| 题目 | 场景描述 | 官方核心判定词 | 正确方案 | 归属课时 |
|---|---|---|---|---|
| Q1 | 赋予模型最大灵活性处理未知请求 | flexibility to handle unexpected requests | 抽象、原子化基础工具 (read/write/run) |
课时 5 |
| Q2 | 生成内容后检查是否合格,并按需改进 | check if it's good enough, and improve it if needed | Evaluator-Optimizer Pattern | 课时 1 |
| Q3 | 编程需要教育型脚本,体育需要娱乐型文案 | different topics need different specialized content | Routing to specialized pipelines | 课时 4 |
| Q4 | 长提示词多约束导致模型反复漏守规则 | Claude keeps ignoring rules in a long prompt | Chaining sequential steps | 课时 3 |
| Q5 | 针对金属、塑料、陶瓷、木材等多选项独立标准决策 | different materials with distinct criteria | Parallel requests in parallel | 课时 2 |
| Q6 | 系统首要诉求是稳定可靠与结果可预测 | Reliability and predictable results are most important | Workflow (more reliable & testable) | 课时 7 |
| Q7 | 用户上传受损零件图测算维修费,确切步骤完全已知 | know exactly what steps are needed each time | Workflow with predetermined steps | 课时 1 / 7 |
✅ 本章进度
- [x] 抓取本章讲稿/字幕(课时 1–7 正课讲稿全部解析完备)
- [x] 逐课精译(8 课时)—— 进度 8/8 全通关 ✅:课时 1–7 正课逐课精译 + 课时 8 章末测验全真 7 题精析
- [x] 生词回灌
30-单词表/04-—— 已建「第 11 章」速查分组(课时 1–7 + 全真测验 · 160 条) - [x] 章节测验/练习(课时 8 Quiz)—— ✅ 已全量收录精析(首考 85% 通过,7 题题干/选项/错题诊断已全部归档)
🔗 关联
- 上级:
课程 004 README - 导读:
01-课程导读与大纲全景 - 生词表:
30-单词表/04-(已建 · 第 11 章分组 160 条) - 登录 SOP:
40-认证事务/08-Partner SSO