Scenario 3 · 主考 Domain 1 / 2 / 5
S3 · Multi-Agent Research Systemcoordinator 委派四类 subagent,产出带引用的研究报告
官方设定:用 Claude Agent SDK 构建多 agent 研究系统。一个 coordinator 委派给专业化 subagent——一个搜网、一个分析文档、一个综合发现、一个生成报告 ;系统研究主题并产出全面的、带引用的 报告。 官方样题里有三道(Q7、Q8、Q9)出自这里,是样题密度最高的场景。
设定里藏着两个评分标准 — 「comprehensive , cited reports」。comprehensive 指向分解质量(覆盖全不全),cited 指向 provenance(来源保不保得住)。这个场景的题几乎都可以先归到这两个词之一,再找准则。
一、从零设计:拓扑与边界
四类 subagent 加一个 coordinator,第一个设计决定是谁跟谁说话 。答案是 hub-and-spoke:所有跨 subagent 的通信、错误处理与信息路由都经过 coordinator,subagent 之间没有横向连线。
理由是三条可以单独出题的收益:observability (唯一的观察点)、consistent error handling (恢复策略集中一处)、controlled information flow (谁看到什么由 coordinator 决定)。
第二个决定:上下文怎么过去
subagent 以隔离上下文运行,不会自动继承 coordinator 的对话历史 ,多次调用之间也不共享记忆。 所以 synthesis agent 要看到 search 与 analysis 的产出,只有一条路:把完整发现直接写进它的 prompt 。传递时用结构化格式把 content 与 metadata(source URL、文档名、页码)分离,attribution 才能活到最后。
配置上有一条硬性要求:coordinator 的 allowedTools 必须包含 "Task" ,否则它一个 subagent 都派不出去。并行的机制是在单次响应里发出多个 Task 调用 ——分散到多个回合就退化成串行。
第三个决定:coordinator prompt 写什么
写研究目标与质量准则 ,不写逐步的过程脚本。 脚本化会锁死 subagent 的适应性,也会让 coordinator 对所有查询都走完整流水线——而它本该按查询复杂度动态选择调用谁 。
二、上线:三次踩坑,三道官方样题
踩坑 ①:每个组件都成功,报告却不完整
官方样题 Q7 考的就是这个签名。正确项的要旨是 coordinator 的 task decomposition 过窄 ——判断轴一句话:subagent 正确执行了各自被分配的任务,问题在于它们被分配了什么 。三个错误项的共同工艺是把责任推给工作正常的下游组件(D4 甩锅错位)。同型自编题见本章 Q1。
踩坑 ②:search subagent 超时
官方样题 Q8 问的是失败信息该怎么流回 coordinator。正确项的要旨是结构化错误上下文 ——failure type、attempted query、partial results、potential alternatives 四件套。 判断轴是「coordinator 能否据此决定改查询重试 / 走替代方案 / 带着部分结果继续」;三个错误项分别是 D5 的三种形态:糊(只回一个泛化状态)、吞(失败标成功)、炸(单点失败终止全流程)。同型自编题见本章 Q2。
踩坑 ③:跨角色的高频小需求
官方样题 Q9 的正确项要旨是给 synthesis agent 一个 scoped verify_fact 工具 覆盖常见的简单核查,复杂核实继续经 coordinator 委派;官方解析的关键词是 least privilege (P4)。判断轴容易被记漏:例外成立的前提是那类需求既高频又简单 , 而不是「往返太贵所以放宽权限」。错误项的共同点是要么把权限一次给足,要么用一个猜测性机制绕开协调路径。
这条前提有两个方向可以被考:把简单档变成少数派(那时正确答案是维持委派——见 ch11 Q3),或者已经给出 scoped 工具之后如何守住它的边界(本章 Q3)。
三、修复之后:让报告经得起查
① claim-source 映射要贯穿
来源归属最容易在摘要步骤 丢失。要求 subagent 输出结构化的 claim-source 映射(source URL、文档名、相关摘录),并由 synthesis 在合并时保留 它们。 每条 finding 至少要有:claim、evidence excerpt、source、publication date。
② 冲突与时间
两个可信来源数字不一致 → 双值保留 + 来源标注 ,由 coordinator 决定如何调和,不擅自选取。要求输出含发布/采集日期 ——但日期是供解读 的,不是用来裁决谁胜出的。报告要显式区分 well-established 与 contested。
③ 缺口要声明
synthesis 输出带 coverage annotations :哪些发现有充分支撑、哪些主题因来源不可用而存在缺口。 这让「不完整」变成一个被声明的状态。
④ 迭代精化循环
多 agent 系统不是一趟直线流水线。coordinator 拿到 synthesis 第一版后要评估缺口 → 用定向查询重新委派 → 再次综合 ,直到覆盖充分。
四、坑位地图
决策点 正确直觉 常见干扰项工艺
1. 覆盖不全 看 coordinator 的分解,不看 subagent D4 怪 synthesis / search / analysis
2. 结果重复 按互不重叠的子主题或来源类型划分范围 D3 下游去重;D1 让 subagent 互相通信
3. 引用对不上 前序发现显式写进 subagent prompt;claim-source 映射贯穿 D6 要求「不要编造引用」;D2 事后补搜来源
4. subagent 失败 结构化错误四件套;transient 先本地恢复 D5 吞(空结果标成功)/ 炸(终止全流程)/ 糊(generic status)
5. 跨角色高频需求 scoped 专用工具覆盖常见情形,复杂的走 coordinator D2 给全套工具;D2 投机缓存;D3 攒批造阻塞
6. 并行没生效 单次响应里发多个 Task 调用 D1 subagent 互相启动;D2 合并成一个多工具 agent
7. 来源数字冲突 双值保留 + 来源标注 + 日期,区分 well-established / contested D6「新的胜出」;D5 取平均;D5 返回 null
8. synthesis 上下文吃紧 改上游返回结构化数据(key facts、citations、relevance scores) D3 中途做散文摘要;D2 给 synthesis 加检索工具
外部课程 · CertSafari — 本章 7 个考点(展开查看)
用于补读和错题复盘;第三方 AI 生成练习材料,非官方题库。核验答案时以 Exam Guide 和官方文档为依据。复盘方法 · 链接核对:2026-10-16。
考点回链 — 本场景覆盖:TS 1.2、TS 1.3、TS 2.2、TS 2.3、TS 5.1、TS 5.3、TS 5.6。官方样题精讲:Q7(coordinator 分解过窄)、Q8(结构化错误上下文)、Q9(scoped verify_fact)。
场景题组
ch17 · Q1 · 准则 P1
A run on "global approaches to carbon pricing" returns a report covering only European emissions trading. All four subagents completed successfully. The coordinator log shows three subtasks: "EU ETS phase 4 allocation", "EU carbon border adjustment", "EU ETS price history". What is the root cause?
A The document analysis agent's relevance criteria are filtering out non-European sources before they ever reach synthesis.
B The search subagent's queries were not broad enough and need to include non-European sources.
C The synthesis agent lacks instructions to identify coverage gaps in the findings it receives, so a report assembled entirely from EU material reads as complete to it.
D The coordinator's task decomposition is too narrow, so the subagent assignments do not cover the relevant domains of the topic.
正确 D TS 1.2 与官方样题 Q7 同构:三个子任务全部落在欧盟这一个维度上——分解过窄导致覆盖不全。subagent 正确完成了各自被分配的任务,问题在于它们被分配了什么 。「每个组件都成功但结果不完整」是这个根因的签名。
D4 甩锅错位 违反 P1 A :分析 agent 只收到了 search 按欧盟子题检索回来的材料,它面前从来没有出现过非欧洲来源可供过滤。
D4 甩锅错位 违反 P1 B :search agent 在被分配的范围内工作正常——它被要求查 "EU ETS phase 4 allocation",它查到了。任务本身没让它去查非欧洲来源。
D3 治标不治本 违反 P1 C :让 synthesis 标注缺口有价值(TS 5.3 的 coverage annotations),但它只能报告 缺口不能填补 ——没有任何 subagent 被派去查非欧洲的碳定价,数据根本不在系统里。
ch17 · Q2 · 准则 P6
The web search subagent times out mid-topic after retrieving results for two of five planned queries. How should this reach the coordinator so it can recover intelligently?
A Raise the search subagent's timeout and retry budget high enough that partial completions stop occurring, so the coordinator only ever receives complete result sets.
B Catch the timeout and return an empty result set marked successful, so the pipeline is not interrupted.
C Return structured error context: failure type, the queries attempted, the partial results already retrieved, and potential alternative approaches.
D Propagate the timeout to a top-level handler that terminates the research run so no partial report is produced.
正确 C TS 5.3 与官方样题 Q8 的四件套:failure type、attempted、partial results、alternatives。这四样正是 coordinator 判断「改查询重试 / 走替代路径 / 带着部分结果继续」所需的全部输入。
D3 治标不治本 违反 P1 A :调大超时能压低发生频率,但题干问的是失败信息该怎么流回 coordinator ——这个设计问题原封未动。真正的失败仍会发生,届时系统依旧没有任何恢复所需的信息;而且超长超时会把整轮研究拖在一个已经无望的查询上。
D5 吞错或炸链 违反 P6 B :把访问失败伪装成有效空结果。coordinator 会以为这个主题确实没有资料,缺口无人知晓——官方样题 Q8 的 C 选项。
D5 吞错或炸链 违反 P6 D :单点失败终止整个 workflow,在恢复策略本可奏效时放弃全部已完成的工作——官方样题 Q8 的 D 选项。
ch17 · Q3 · 准则 P4
The synthesis agent has a scoped check_claim(source_id, claim) tool that returns the closest matching passage from one already-retrieved source. An audit of 300 delivered claims finds 41 whose quoted passage does not support the claim it is attached to. Traces show one recurring shape: synthesis calls the tool against three or four sources that never covered the sub-topic, keeps the least-bad passage, and writes the claim as verified instead of handing the gap back to the coordinator. What is the most effective change?
A Replace it with a constrained tool that judges support in its implementation and returns an explicit not_supported verdict for that source instead of a nearest passage, turning the gap into something the coordinator can re-delegate.
B Have the coordinator inspect every check_claim call the synthesis agent issues and reject the ones whose claim falls outside the subject area of the source being checked, so the boundary is enforced where routing already lives.
C Have the report agent flag any claim whose quoted passage does not mention the claim's subject, so unsupported claims are caught before the report reaches the reader and no verification path needs to change.
D Rewrite the tool's description to state its boundary — one already-retrieved source, simple checks only — with examples of the harder cases that belong back with the coordinator, since descriptions are what drive tool selection.
正确 A TS 2.3 的受约束的替代品 :把能力收窄到安全的子集,约束写进工具实现而不是写进嘱托(guide 的原例是用会校验 URL 的 load_document 替换能抓任意 URL 的 fetch_url)。越界之所以可能,是因为这个工具只有「最接近的段落」一个出口——没有 not_supported 的返回值,调用方就只能把缺口包装成结论。给出显式判定后,缺口重新变成 coordinator 可以定向再委派的事实,也才接得上 coverage annotations(TS 5.3)。
D2 过度工程 违反 P2 B :给每一次调用加一道 coordinator 审查,正好把这个 scoped 工具当初要省掉的往返又装回来;而 coordinator 手上没有源文本,要判断「这个 claim 是否落在该来源的主题内」,需要的恰恰是它还没做的那次检索。
D4 甩锅错位 违反 P1 C :把边界维护的责任推给一个工作正常的下游组件。它只能在交付前拦,且靠主题词面匹配——「同主题但并不支撑」的那批照样漏过去。根因在工具缺少一个表达「查不到」的出口,位置在工具,不在 report agent。
D6 概率当保证 违反 P3 D :描述决定的是模型倾向 选哪个工具(TS 2.1),它不构成执行期的边界——工具本身依然会为任何来源返回一段最接近的文字。而这里的后果是带引用的报告里出现无支撑的断言,属于需要确定性机制的那一档。
ch17 · Q4 · 准则 P1
Your reports cite sources that the search agent never returned. Traces confirm the search agent hands well-formed results with URLs to the coordinator, which then invokes synthesis with the prompt: "Synthesize the research findings into a cited report." What is the root cause?
A The synthesis agent's prompt does not sufficiently stress that every citation must be a real retrieved source, so the model fills the gap with plausible-looking references.
B The search agent returns URLs in a shape the synthesis agent cannot parse, so it substitutes plausible ones.
C The findings are never passed into the synthesis agent's prompt; subagents run with isolated context and inherit nothing, so it is inventing sources it cannot see.
D The coordinator should run synthesis twice and keep only citations appearing in both runs.
正确 C TS 1.3:subagent 不自动继承 coordinator 的对话历史,前序发现必须显式写进它的 prompt。题干给的 coordinator prompt 是一句空指令,没带任何 search 结果——一个被要求「综合研究发现」却看不到任何发现的 agent 只能编。
D6 概率当保证 违反 P3 A :加重措辞让模型「不要编造它看不见的东西」——它没有可引用的真实来源,再严厉的指令也变不出来。缺的是数据,不是纪律。
D4 甩锅错位 违反 P1 B :题干明确 search agent 返回了 well-formed 带 URL 的结果并送达 coordinator。把根因指向一个被证明工作正常的组件。
D2 过度工程 违反 P2 D :双跑取交集把成本翻倍,而两次都看不到来源的 agent 会编出两批不同的假来源。它甚至没有触及缺数据这个根因。
ch17 · Q5 · 准则 P6
Two credible industry reports give different market-size figures for the same segment: $4.1B from a survey collected in Q1 and $5.3B from one collected in Q3 of the same year. What should the document analysis subagent return to the coordinator?
A The Q3 figure, since more recent data supersedes older data and the analysis agent is better placed than the coordinator to judge which survey reflects the segment today.
B Both figures with source attribution and collection dates, explicitly annotated as conflicting, letting the coordinator decide how to reconcile before synthesis.
C The midpoint ($4.7B) with a note that sources varied, so synthesis receives one usable number rather than a range it has no basis to resolve on its own.
D Neither — return null for the market-size field, since conflicting data cannot be reliably extracted.
正确 B TS 5.6:完成文档分析时把冲突值一并包含并显式标注 ,由 coordinator 决定在进入 synthesis 前如何调和;同时要求输出含采集日期以支持正确的时间解读。信息保全(P6)的标准形态。
D4 甩锅错位 违反 P6 A :用日期裁决正是 TS 5.6 要避免的——日期是附上去供解读 的,不是用来淘汰另一个可信来源。两次调查也可能口径不同。
D5 吞错或炸链 违反 P6 C :取中点制造了一个两个来源都没说过的数字,冲突被伪装成共识——最彻底的信息销毁。
D5 吞错或炸链 违反 P6 D :返回 null 把「有两个各有出处的候选值」伪装成「没有数据」。null 的正当用途是信息在源文档中确实不存在(防编造),不是冲突处理手段。
ch17 · Q6 · 准则 P5
Your coordinator delegates three independent subtopics in three consecutive turns, waiting for each before issuing the next. None of the three depends on another's output. End-to-end latency is roughly the sum of the three. What change reduces it?
A Let each subagent start the next one directly when it finishes, removing the coordinator from the critical path.
B Merge the three subtopics into one subagent invocation carrying all three research goals.
C Submit the three subtopic requests through the Message Batches API, which handles independent requests together at 50% of the standard cost.
D Have the coordinator emit all three Task tool calls within a single response, spawning the subagents in parallel.
正确 D TS 1.3 的原话级机制:并行 spawn 就是 coordinator 在单次响应中发出多个 Task tool 调用 ,而不是分散在多个回合。题干把前提铺满了——三个子任务互相独立,没有数据依赖。
D1 凭空捏造 违反 P1 A :subagent 互相启动违背 hub-and-spoke(TS 1.2 要求所有跨 subagent 通信经 coordinator),这种横向调用机制并不存在;而且它仍然是串行的。
D3 治标不治本 违反 P7 B :合成一次调用消除了往返,但三个主题在同一个上下文与注意力预算里竞争,正是 P7 的稀释场景;而且这与 TS 1.2 按子主题划分范围以最小化重复的方向相反。
D2 过度工程 违反 P5 C :Batches API 的适配轴是延迟容忍 的非阻塞负载,它省成本不省延迟——最长 24 小时处理窗口且无 latency SLA。用它降低交互延迟是机制与负载的彻底错配。
ch17 · Q7 · 准则 P6
Two subagents were assigned "renewable capacity additions" and "grid-scale storage deployment." Review finds roughly half their findings are the same sources summarized twice, while transmission constraints and interconnection queues — clearly in scope — appear nowhere. What is the fix?
A Fix the partitioning: assign genuinely distinct subtopics or source types so scope does not overlap, and widen the decomposition to cover the missing areas.
B Run the two subagents sequentially and pass the first one's sources into the second as an exclusion list.
C Add a deduplication step in synthesis that drops findings whose source URLs already appeared.
D Have the two subagents share their in-progress findings so each can avoid what the other has covered.
正确 A TS 1.2 点名的 skill:跨 subagent 划分研究范围以最小化重复(分配互不相同的子主题或来源类型)。题干的两个症状是同一个分解缺陷的两面——重叠说明切分不互斥,遗漏说明切分不完备。
D2 过度工程 违反 P5 B :为解决分解问题而牺牲本可并行的两个独立任务,把延迟翻倍;exclusion list 还会随范围增长而膨胀。
D3 治标不治本 违反 P1 C :去重只是把浪费藏起来——两次检索的成本已经花掉,而「输电约束无人调查」这半个问题完全没被触及。
D1 凭空捏造 违反 P1 D :subagent 之间交换在途结果违背 hub-and-spoke,且 subagent 上下文隔离,没有可以互相订阅的共享状态。
ch17 · Q8 · 准则 P6
A report is delivered on schedule, but the topic's regulatory dimension was never covered because the relevant database was unreachable for the whole run. The report reads as if coverage were complete. What should the synthesis output have included?
A A confidence score on the report as a whole, so readers can judge how much to trust it.
B Coverage annotations indicating which findings are well-supported and which topic areas have gaps due to unavailable sources.
C An appendix listing every tool call the system made, so gaps can be reconstructed from the log.
D Nothing extra — the run should have been failed and retried rather than delivering a partial report.
正确 B TS 5.3 的原话级 skill:synthesis 输出应带 coverage annotations ,标明哪些发现有充分支撑、哪些主题因来源不可用而存在缺口。它把「不完整」变成一个被声明的状态,而不是读者看不出来的状态。
D6 概率当保证 违反 P8 A :整份报告一个笼统的置信分数既未经校准(TS 5.5),也无法定位哪一块 缺失——读者仍然不知道监管维度整个没查。
D4 甩锅错位 违反 P6 C :把从工具调用日志里反推覆盖缺口的工作转嫁给读者。系统自己已经知道哪次访问失败了,声明它比让人考古便宜得多。
D5 吞错或炸链 违反 P6 D :整轮判失败会丢掉其余维度上已完成的全部研究。TS 5.3 的立场是带着 partial results 继续并标注缺口 ,不是全有或全无。
ch17 · Q9 · 准则 P6
The coordinator now selects subagents per query instead of running the full pipeline. On a question about interconnection queue costs it invoked search_agent and analysis_agent but skipped market_data_agent, judging the topic qualitative. The delivered report reads as complete and confident; a reviewer later finds it omits published tariff figures that would have reversed its conclusion. Neither the synthesis output nor the report records that a subagent was skipped. What should change?
A Go back to invoking every subagent on every query, so that no source type can ever be dropped from a report; the added latency is simply the price of guaranteed coverage.
B Have the report agent append a standing caveat that some data sources may not have been consulted, so readers calibrate their trust accordingly.
C Have the coordinator score its own confidence that the selected subagents covered the query, and surface that score with the report.
D Record each subagent the coordinator skipped and the reason it was skipped, and carry those gaps into the delivered report as explicit coverage annotations.
正确 D 动态选择本身是对的——TS 1.2 要求 coordinator 分析查询需求、决定调用哪些 subagent。但它把「哪些源没查」变成了一个只存在于 coordinator 一次判断里的事实。TS 5.3 给的配套机制正是 coverage annotations :synthesis 输出要标明哪些结论扎实、哪些因为源没被覆盖而留有缺口。题干的坏处不是跳过了 market_data_agent,而是跳过没有留下痕迹 ——读者拿到的是一份看不出缺口的报告。
D2 过度工程 违反 P2 A :为了让缺口不再隐形,把动态选择整个退掉,代价是每个简单查询都付满流水线的延迟与成本。缺口可见性只需要一条记录。而且跑满流水线并不保证覆盖完整——它只是把「跳过了」换成「查了但没查到」,同样无人知晓。
D3 治标不治本 违反 P1 B :每份报告都挂同一句「可能有源没查」,等于没说——它不区分这一次究竟跳过了什么。题干已指明根因是跳过决策没有被记录,通用免责声明碰不到那一环,反而让读者对真正有缺口的报告更迟钝。
D6 概率当保证 违反 P8 C :自报置信度未经校准,而且它恰恰会在「我判断这题不需要数据源」这类判断上自信——本次失误正是这个形态。需要的是它做了什么 的事实记录,不是它感觉如何 的分数。