Foundations Mock Exam 1 — 60 Scenario Questions, Timed (Q529–Q588)
A full-length CCAR-F practice simulation, built like the official exam: 60 questions in 120 minutes, under 4 scenarios drawn from the bank of 6, 15 questions per scenario. This mock uses Customer Support Resolution Agent · Code Generation with Claude Code · Multi-Agent Research System · Structured Data Extraction. Every question was written for this guide against a task statement of the official Claude Certified Architect – Foundations Exam Guide (v1.0, July 2026), and the domain counts follow its blueprint. 4 questions are multiple-response and say “Select TWO”; the rest say “Select ONE”. This is not an official Anthropic or Pearson VUE exam. It does not reproduce, reconstruct or recall any live exam item, and the guide’s sample questions are used only as a model of style. Other full mocks: Mock 2 · Mock 3 · Mock 4.
Time remaining: 02:00:00
Loading the timed runner…
| Official domain | Study it here | Blueprint weight | Questions here |
|---|---|---|---|
| Agentic Architecture & Orchestration (official Domain 1) | Domain 1 lesson | 27% | 16 |
| Tool Design & MCP Integration (official Domain 2) | Domain 4 lesson | 18% | 11 |
| Claude Code Configuration & Workflows (official Domain 3) | Domain 2 lesson | 20% | 12 |
| Prompt Engineering & Structured Output (official Domain 4) | Domain 3 lesson | 20% | 12 |
| Context Management & Reliability (official Domain 5) | Domain 5 lesson | 15% | 9 |
How to read your result. The runner reports a practice score: raw questions correct out of 60, a per-domain breakdown, the elapsed time and the unanswered count. Unanswered questions count as incorrect. The live exam reports a scaled score (pass mark 720 on 100–1,000); this page does not convert a raw score into a scaled score, because no public conversion exists. A useful study heuristic: aim for 80% here, with no domain under 65%, on a mock you have not seen before. Untimed practice by domain lives in Practice Questions and Concept Drills.
Foundations mock exam 1 · 60 questions (Q529–Q588)
Scenario 1 · Customer Support Resolution Agent
Q529. You are drafting the escalation section of Larkspur's system prompt. Reviewers found the agent handing calm customers with routine returns to humans while it kept handling cases it should have passed on. Which two situations should the section list as reasons to escalate? (Select TWO.) A) The customer explicitly asks to talk to a person, even when the agent believes it could resolve the issue itself in its next message. B) The agent's own self-reported confidence in its planned resolution drops below 70%, suggesting the case is probably beyond its abilities. C) The customer requests something the refund policy does not cover, such as reimbursing a hotel night spent waiting for a replacement tent. D) The sentiment score of the customer's latest message falls below a set threshold, showing a level of frustration a person may handle better.
Understand Foundations Mock Exam 1 · Q529 · the situation and each part of the question
The real situation behind this question
Larkspur's reviewers see two opposite failures. Some calm customers with ordinary returns end up with humans, wasting staff time. Other customers ask for things the policy never mentions, such as paying for a hotel night, and the agent improvises an answer. The team is rewriting the escalation section of the system prompt and must choose triggers that match what truly needs a person.
Read the question in parts
Part 1 · handing calm customers with routine returns to humans
the agent escalates cases it can resolve, so the triggers in use are poor signals
Part 2 · kept handling cases it should have passed on
some cases genuinely need a human, so the criteria must name those situations concretely
What you are being asked to decide
Which situations really need a human: an explicit request, a policy gap, low sentiment or low self-confidence? Tests choosing reliable escalation triggers over sentiment and self-reported confidence.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Escalation | handing the case to a human agent through escalate_to_human |
| Calibration | how well a stated confidence matches real accuracy; the agent's self-reported scores are not calibrated |
Study: Escalation and ambiguity: when to hand off, when to ask Escalation Calibration HITL
Understand Foundations Mock Exam 1 · Q529's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Escalate on signals that track a real need for a human: an explicit request for a person and a policy gap or exception. Sentiment and self-reported confidence look objective but do not measure case complexity.
Connect the design to the situation
A calm customer with a routine return is escalated, while a request outside policy is handled by the agent.
Best answer: AC. An explicit request for a human should be honored, and a request the policy is silent on is a policy gap the agent must not resolve by guessing. Sentiment and self-reported confidence are unreliable proxies for case complexity: an upset customer may have a simple problem, and the model's stated confidence is not calibrated to its actual accuracy.
The decisive evidence in the stem
handing calm customers with routine returns to humans
The current triggers do not track what actually requires a human, so the criteria must name concrete situations such as explicit requests and policy gaps.
Official objective tested: Task 5.2 · Design effective escalation and ambiguity resolution patterns
What each choice would do here
A · Why this does not meet the full requirement
The customer explicitly asks to talk to a person, even when the agent believes it could resolve the issue itself in its next message.
Honors a direct customer request, a reliable trigger.
When the customer says 'I want to speak to a person', the agent calls escalate_to_human right away with a structured summary. It does not first try to change the customer's mind, because the request itself is the trigger.
B · Why this does not meet the full requirement
The agent's own self-reported confidence in its planned resolution drops below 70%, suggesting the case is probably beyond its abilities.
Relies on a self-report that does not match actual accuracy.
The model's stated confidence is often high on wrong answers and low on easy ones. Using it as a trigger sends unpredictable cases to humans and lets confident mistakes through.
C · Why this does not meet the full requirement
The customer requests something the refund policy does not cover, such as reimbursing a hotel night spent waiting for a replacement tent.
Catches a policy gap the agent must not fill by guessing.
The policy covers refunds and replacements but says nothing about hotel costs. The agent recognizes the gap and escalates instead of inventing a rule, so a human decides the exception with full context.
D · Why this does not meet the full requirement
The sentiment score of the customer's latest message falls below a set threshold, showing a level of frustration a person may handle better.
Measures mood, which does not show whether a case needs a human.
A sentiment threshold sends upset customers with simple problems to humans and keeps calm customers with policy gaps with the agent. The reviewers' two failures would both continue, because mood is not complexity.
Check your understanding · explain the design in your own words
Which situations really need a human: an explicit request, a policy gap, low sentiment or low self-confidence?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Escalation and ambiguity: when to hand off, when to ask
Study: Escalation and ambiguity: when to hand off, when to ask Escalation Calibration HITL
Return to Foundations Mock Exam 1 · Q529's situation and clause-by-clause explanation
Answer
**AC.** An explicit request for a human should be honored, and a request the policy is silent on is a policy gap the agent must not resolve by guessing. Sentiment and self-reported confidence are unreliable proxies for case complexity: an upset customer may have a simple problem, and the model's stated confidence is not calibrated to its actual accuracy.Q530. Policy answers come from 60 documents behind a search_policies tool. Logs show the agent averages five exploratory search_policies calls per chat just to learn which documents exist, adding about eight seconds per reply. The documents change monthly. Which change best reduces these exploratory calls? (Select ONE.) A) Cap search_policies at two calls per conversation in the harness, so the agent stops exploring and answers from whatever policy text it has found by then. B) Expose the policy catalog, with titles, topics and short summaries, as an MCP resource the agent sees up front, then fetch only the documents it needs. C) Paste all 60 policy documents into the system prompt so the agent never needs to search, and update the prompt each time a policy changes. D) Replace search_policies with a fine-grained keyword index tool, so that each search returns more precise matches on the first attempt.
Understand Foundations Mock Exam 1 · Q530 · the situation and each part of the question
The real situation behind this question
Larkspur's policies cover returns, warranties, shipping, price adjustments and more, spread over 60 documents. The agent does not know which documents exist, so it searches repeatedly: 'returns', 'return policy', 'refund window'. Each search adds time, and customers wait about eight extra seconds per reply. The content changes monthly, so whatever the team builds must stay current without manual prompt edits.
Read the question in parts
Part 1 · just to learn which documents exist
the agent lacks visibility into the catalog, so the fix is to show it the catalog
Part 2 · The documents change monthly
the solution should update with the source, not depend on hand-edited prompts
What you are being asked to decide
The agent keeps searching just to find out which policy documents exist. How do you give it that list directly? Tests exposing a content catalog as an MCP resource to avoid exploratory tool calls.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| MCP resource | read-only content an MCP server exposes, here a catalog of the 60 policy documents the agent can see up front |
| Progressive discovery | seeing a short catalog first, then loading only the documents that matter |
Study: MCP resources and config scoping MCP resource MCP Progressive discovery
Understand Foundations Mock Exam 1 · Q530's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The wasted calls were catalog discovery. An MCP resource that lists the available policy documents gives the agent that visibility up front, so it reads only the documents it needs.
Connect the design to the situation
Five search_policies calls per chat before the agent finds the returns policy.
Best answer: B. The agent is calling a search tool to discover what content exists. An MCP resource that lists the catalog gives it that map up front, so it can request the one or two relevant documents directly. Pasting all 60 documents into the prompt removes searching but fills every request with mostly irrelevant text and must be re-edited each month.
The decisive evidence in the stem
just to learn which documents exist
The calls are spent on discovering the catalog, not on reading content, which is the job an MCP resource listing is designed for.
Official objective tested: Task 2.4 · Integrate MCP servers into Claude Code and agent workflows
What each choice would do here
A · Why this does not meet the full requirement
Cap search_policies at two calls per conversation in the harness, so the agent stops exploring and answers from whatever policy text it has found by then.
Cuts exploration by force, so answers may rest on the wrong document.
Exploration drops, but only because the agent is cut off. When two searches do not find the right policy, the agent answers from a partial or wrong document, which hurts accuracy more than the delay did.
B · Why this meets the requirement
Expose the policy catalog, with titles, topics and short summaries, as an MCP resource the agent sees up front, then fetch only the documents it needs.
Gives the agent a map of what exists so it fetches only what it needs.
The server publishes a catalog resource listing each document's title, topic and summary. The agent reads it, sees 'Returns and exchanges, updated monthly', and fetches that document directly. Exploratory searches disappear, and the catalog updates when documents change.
C · Why this does not meet the full requirement
Paste all 60 policy documents into the system prompt so the agent never needs to search, and update the prompt each time a policy changes.
Removes searching but bloats every request and needs monthly prompt edits.
Every chat carries all 60 documents, most of them irrelevant to the question, which raises token use and can bury the relevant policy. Someone must edit the prompt every month, and a missed update gives customers outdated policy.
D · Why this does not meet the full requirement
Replace search_policies with a fine-grained keyword index tool, so that each search returns more precise matches on the first attempt.
Improves search precision but still makes the agent discover the catalog.
Better matches help once the agent knows what to look for, but it still has no view of which documents exist. It keeps probing with several queries, so the exploratory calls only partly decrease.
Check your understanding · explain the design in your own words
The agent keeps searching just to find out which policy documents exist. How do you give it that list directly?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: MCP resources and config scoping
Study: MCP resources and config scoping MCP resource MCP Progressive discovery
Return to Foundations Mock Exam 1 · Q530's situation and clause-by-clause explanation
Answer
**B.** The agent is calling a search tool to discover what content exists. An MCP resource that lists the catalog gives it that map up front, so it can request the one or two relevant documents directly. Pasting all 60 documents into the prompt removes searching but fills every request with mostly irrelevant text and must be re-edited each month.D3 · Prompting & Structured Output
Q531. After each chat, the agent must write a wrap-up record to the CRM with category, order IDs, resolution and refund amount. You currently ask for JSON in the final message, and 3% of records fail to parse because of prose before the JSON or a missing bracket. Which approach fixes this most reliably? (Select ONE.) A) Add a stronger instruction such as 'respond with JSON only, no other text', and include one complete example record in the system prompt. B) Keep the free-text JSON, but add a regular-expression parser that strips prose and repairs missing brackets before the record is saved. C) Lower the temperature to zero for the wrap-up turn, so that the model produces the JSON format more consistently across all chats. D) Define a record_resolution tool whose input_schema is the CRM record, force it with tool_choice at wrap-up, and read the fields from the tool_use input.
Understand Foundations Mock Exam 1 · Q531 · the situation and each part of the question
The real situation behind this question
Larkspur's managers rely on the CRM to see why customers contacted support and how much was refunded. Each chat ends with a JSON record the agent writes in its last message. About 3 in 100 records are broken: a sentence before the JSON, or a missing bracket. Those chats vanish from reports, and someone has to fix them by hand every week.
Read the question in parts
Part 1 · ask for JSON in the final message
the current design depends on free-text output that the model formats itself
Part 2 · prose before the JSON or a missing bracket
the failures are structural, which tool use with a schema is designed to remove
What you are being asked to decide
The CRM record is sometimes broken JSON. What makes the format reliable? Tests using a forced tool call with a JSON schema for guaranteed structured output.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Forced tool extraction | making the model call record_resolution so the record arrives as structured tool input, not free text |
| tool_choice | the request field that can require one named tool, here record_resolution at wrap-up |
Study: Structured output: the engineering ladder Forced tool extraction tool_choice JSON Schema
Understand Foundations Mock Exam 1 · Q531's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The failures are syntax and format errors in free text. Defining the record as a tool's JSON schema and forcing that tool removes them at the source; note that a schema still does not prove the values themselves are correct.
Connect the design to the situation
'Here is the summary: {"category": "return" ...' with a missing closing bracket.
Best answer: D. A tool with a JSON schema, forced with tool_choice, makes the model return its answer as structured tool input, which removes prose and syntax errors at the source. Stronger wording and an example improve consistency but remain requests, so a small parse-failure rate stays. Repair parsers treat symptoms and can silently produce wrong records.
The decisive evidence in the stem
3% of records fail to parse because of prose before the JSON or a missing bracket
These are syntax and format failures, the exact class that schema-based tool use eliminates instead of merely reducing.
Official objective tested: Task 4.3 · Enforce structured output using tool use and JSON schemas
What each choice would do here
A · Why this does not meet the full requirement
Add a stronger instruction such as 'respond with JSON only, no other text', and include one complete example record in the system prompt.
Asks more firmly but still depends on free-text output.
Failures probably drop below 3%, but the output is still free text. Long chats and unusual cases still produce stray sentences or broken JSON now and then, and someone still fixes records by hand.
B · Why this does not meet the full requirement
Keep the free-text JSON, but add a regular-expression parser that strips prose and repairs missing brackets before the record is saved.
Repairs symptoms in code and may save wrong records silently.
Many records are recovered, but repair rules guess. A stripped sentence may contain the resolution, and an added bracket may close the wrong object, so wrong records can enter the CRM without anyone noticing.
C · Why this does not meet the full requirement
Lower the temperature to zero for the wrap-up turn, so that the model produces the JSON format more consistently across all chats.
Reduces variation but does not guarantee valid JSON.
Lower temperature reduces random variation in wording, but formatting errors are not only randomness. The output is still free text with no structural guarantee, so prose and missing brackets can still appear.
D · Why this meets the requirement
Define a record_resolution tool whose input_schema is the CRM record, force it with tool_choice at wrap-up, and read the fields from the tool_use input.
Removes syntax errors by returning the record as schema-shaped tool input.
At wrap-up the request sets tool_choice to {"type": "tool", "name": "record_resolution"}. The model's answer arrives as a tool_use block whose input already matches the schema shape, so no prose wraps it and brackets cannot go missing.
Check your understanding · explain the design in your own words
The CRM record is sometimes broken JSON. What makes the format reliable?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Structured output: the engineering ladder
Study: Structured output: the engineering ladder Forced tool extraction tool_choice JSON Schema
Return to Foundations Mock Exam 1 · Q531's situation and clause-by-clause explanation
Answer
**D.** A tool with a JSON schema, forced with tool_choice, makes the model return its answer as structured tool input, which removes prose and syntax errors at the source. Stronger wording and an example improve consistency but remain requests, so a small parse-failure rate stays. Repair parsers treat symptoms and can silently produce wrong records.Q532. Larkspur added a check_store_credit tool with a detailed description covering balances, expiry dates and gift-card credit. Yet for 'how much store credit is on my account?' the agent still calls get_customer and answers from its sparse loyalty field. The system prompt contains: 'For any question about the customer's account, call get_customer first.' What should you change first? (Select ONE.) A) Remove the loyalty field from get_customer's output, so the agent must look for another tool whenever a customer asks about stored credit. B) Make check_store_credit's description much longer, with more example questions, so that it outweighs the get_customer rule in the system prompt. C) Add a routing classifier before the agent that detects store-credit questions and calls check_store_credit directly, bypassing the model's choice. D) Rewrite the system prompt rule to cover identity and profile questions only, and point store-credit and balance questions to check_store_credit.
Understand Foundations Mock Exam 1 · Q532 · the situation and each part of the question
The real situation behind this question
Larkspur's customers ask about store credit often, so the team built check_store_credit and wrote it a careful description. Nothing changed: the agent keeps calling get_customer and reads a loyalty field that shows only points, not credit. An engineer finally reads the system prompt and finds an old sentence from before the new tool existed: any question about the account must start with get_customer.
Read the question in parts
Part 1 · with a detailed description covering balances, expiry dates and gift-card credit
the tool description is already good, so rewriting it again is not the first step
Part 2 · 'For any question about the customer's account, call get_customer first.'
a broad keyword rule in the system prompt can steer tool choice more strongly than a description
What you are being asked to decide
A good new tool exists, but one sentence in the system prompt keeps sending the agent to the old one. What do you fix first? Tests spotting a keyword-sensitive system prompt rule that overrides a well-written tool description.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Tool description | the text in check_store_credit's definition that tells the model what the tool does and when to use it |
| System prompt | the standing instructions your application sends with every request; here it contains the over-broad 'account' rule |
Study: Writing tool definitions that score points Tool selection Tool description System prompt
Understand Foundations Mock Exam 1 · Q532's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A well-described tool was ignored because a keyword rule in the system prompt overrode it. Review and fix that instruction first; only then judge whether descriptions or extra routing are needed.
Connect the design to the situation
'How much store credit is on my account?' triggers the 'account' rule and calls get_customer.
Best answer: D. The keyword 'account' in the system prompt creates a strong association that overrides an already good tool description, so the first fix is the instruction itself. A longer description competes with the rule instead of removing the conflict, and a routing classifier adds a new component for a problem caused by one sentence.
The decisive evidence in the stem
'For any question about the customer's account, call get_customer first.'
This keyword-triggered instruction matches the customer's wording 'my account' and sends the agent to get_customer before it ever weighs the better tool.
Official objective tested: Task 2.1 · Design effective tool interfaces with clear descriptions and boundaries
What each choice would do here
A · Why this does not meet the full requirement
Remove the loyalty field from get_customer's output, so the agent must look for another tool whenever a customer asks about stored credit.
Damages a useful tool output to work around a prompt problem.
Customers asking about loyalty points lose that data, and the agent may still call get_customer first because the rule says so. It breaks a working output instead of fixing the instruction that misroutes.
B · Why this does not meet the full requirement
Make check_store_credit's description much longer, with more example questions, so that it outweighs the get_customer rule in the system prompt.
Competes with the conflicting rule instead of removing it.
The agent now sees a long description and a direct instruction pointing elsewhere. Explicit instructions usually win such conflicts, so selection may barely change, and the prompt still says the wrong thing.
C · Why this does not meet the full requirement
Add a routing classifier before the agent that detects store-credit questions and calls check_store_credit directly, bypassing the model's choice.
Adds a new layer around a problem caused by one prompt sentence.
The classifier routes some questions correctly, but it is a new system to build, test and maintain, and it misses phrasings it was not trained on. The conflicting prompt rule is still there for every question that reaches the agent.
D · Why this meets the requirement
Rewrite the system prompt rule to cover identity and profile questions only, and point store-credit and balance questions to check_store_credit.
Removes the keyword conflict at its source and points to the right tool.
With the rule narrowed to identity and profile questions and a pointer for balances, nothing pushes store-credit questions toward get_customer. The detailed check_store_credit description can now do its job, and selection follows it.
Check your understanding · explain the design in your own words
A good new tool exists, but one sentence in the system prompt keeps sending the agent to the old one. What do you fix first?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Writing tool definitions that score points
Study: Writing tool definitions that score points Tool selection Tool description System prompt
Return to Foundations Mock Exam 1 · Q532's situation and clause-by-clause explanation
Answer
**D.** The keyword 'account' in the system prompt creates a strong association that overrides an already good tool description, so the first fix is the instruction itself. A longer description competes with the rule instead of removing the conflict, and a routing classifier adds a new component for a problem caused by one sentence.Q533. Larkspur's agent loop ends the turn whenever the model's response contains a text block. Logs show many replies such as 'Let me pull up that order for you' arriving together with a lookup_order tool_use block; the loop returns that sentence to the customer and never runs the tool. Which change to the loop control fixes this? (Select ONE.) A) Continue the loop while stop_reason is "tool_use", run each requested tool and append its result, and finish only when stop_reason is "end_turn". B) Keep the text check but require at least three loop iterations before returning, so short acknowledgement sentences such as 'one moment' no longer end the turn early. C) Search the text block for completion phrases such as 'anything else?' or 'resolved', and end the turn only when one of those phrases appears in the reply. D) Instruct the model in the system prompt never to write text in the same response as a tool call, so a text block reliably signals that the turn is complete.
Understand Foundations Mock Exam 1 · Q533 · the situation and each part of the question
The real situation behind this question
Larkspur's support chats sometimes stall in a strange way. A customer asks where a tent order is, the agent replies 'Let me pull up that order for you', and then nothing happens. The engineers find the cause in their own loop code: it treats any text in the model's response as the final answer. The model was also asking for lookup_order in that same response, but the loop never ran it. The team needs a stopping rule that matches what the API actually reports.
Read the question in parts
Part 1 · ends the turn whenever the model's response contains a text block
the current stopping rule depends on text presence, which is not the signal the API defines for completion
Part 2 · never runs the tool
the requested tool_use is dropped, so the model never receives the order data it asked for
What you are being asked to decide
The loop stops as soon as it sees text, but the model was also asking for a tool. What should decide when the loop stops? Tests using stop_reason, not the presence of text, to control the agentic loop.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| stop_reason | the field in every API response that says whether the model wants a tool run (tool_use) or has finished (end_turn) |
| Agent loop | your application code that sends the request, runs the requested tools, appends results and sends again |
Study: The agentic loop: the exam's core object Agent loop Stop reason stop_reason
Understand Foundations Mock Exam 1 · Q533's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A response can hold text and a tool request together. So the loop must branch on stop_reason: run the tools and continue on tool_use, finish on end_turn. Text content, phrases and iteration counts are not completion signals.
Connect the design to the situation
The model writes 'Let me pull up that order' and requests lookup_order in the same response.
Best answer: A. The API already states why the model stopped: stop_reason "tool_use" means a requested tool must run and its result must go back, and "end_turn" means the model has finished. Telling the model never to mix text and tool calls keeps a fragile text-based signal alive behind a prompt rule that will sometimes fail, while minimum iteration counts and phrase matching are the other named loop anti-patterns.
The decisive evidence in the stem
arriving together with a lookup_order tool_use block
One response can carry both text and a tool request, so the presence of text cannot mean the model has finished; only stop_reason reports that reliably.
Official objective tested: Task 1.1 · Design and implement agentic loops for autonomous task execution
What each choice would do here
A · Why this meets the requirement
Continue the loop while stop_reason is "tool_use", run each requested tool and append its result, and finish only when stop_reason is "end_turn".
Uses the field the API provides for exactly this decision.
Your application reads stop_reason after each response. On tool_use it runs lookup_order, appends a tool_result block with the matching tool_use_id, and sends the request again. On end_turn it returns the final text. Text that arrives with a tool request is just part of the turn.
B · Why this does not meet the full requirement
Keep the text check but require at least three loop iterations before returning, so short acknowledgement sentences such as 'one moment' no longer end the turn early.
Adds an arbitrary iteration count instead of reading the stop signal.
A minimum of three iterations forces extra requests even for simple answers, and after the third pass the loop still ends on any text. The number has no link to whether a tool request is pending, so the failure just moves later in the conversation.
C · Why this does not meet the full requirement
Search the text block for completion phrases such as 'anything else?' or 'resolved', and end the turn only when one of those phrases appears in the reply.
Parses natural language to guess completion, a named anti-pattern.
Phrase matching breaks whenever the model words a reply differently, and a customer's own words can trigger it. It guesses completion from prose although stop_reason gives a definite answer in every response the loop receives.
D · Why this does not meet the full requirement
Instruct the model in the system prompt never to write text in the same response as a tool call, so a text block reliably signals that the turn is complete.
Keeps a fragile text signal and protects it only with a prompt rule.
The model may follow the instruction most of the time, but prompt rules are probabilistic. Any response that still mixes text and a tool call ends the turn early again, and the loop still ignores the field that actually reports whether a tool is pending.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Loop control that branches on stop_reason (illustrative)
def run_turn(client, messages, tools, execute_tool):
while True:
response = client.messages.create(model=MODEL, max_tokens=1024, tools=tools, messages=messages)
messages.append({"role": "assistant", "content": response.content})
if response.stop_reason != "tool_use":
return response # end_turn: the model has finished
results = []
for block in response.content:
if block.type == "tool_use":
output = execute_tool(block.name, block.input)
results.append({"type": "tool_result", "tool_use_id": block.id, "content": output})
messages.append({"role": "user", "content": results})Text blocks in the same response are kept in history but never end the loop; only stop_reason does. MODEL is a placeholder.
Not supplied in this example · settings and defaults
context_management — not supplied here. No server compaction strategy is enabled by this body. Host/manual compaction is separate.
output_config — not supplied here. No output_config schema or effort override is supplied. A prompt asking for JSON does not provide schema enforcement.
tool_choice — not supplied here. With tools supplied, the default is auto: the model chooses whether to request a tool. Without tools, no supplied tool can be selected.
system — not supplied here. No application system instructions are supplied through this field. User messages still provide task text.
stop_sequences — not supplied here. No custom stop strings are configured. Generation can still stop for end_turn, tool_use, max_tokens, or another documented reason.
stream — not supplied here. For a direct non-streaming create/parse call, the result is one message rather than an event stream. A stream helper configures this separately.
thinking — not supplied here. No explicit thinking override is shown. Behavior depends on the selected model; omission does not universally mean thinking is off.
cache_control — not supplied here. No top-level automatic cache marker is supplied. Check nested system/tool/content blocks for separate cache_control markers.
metadata — not supplied here. No application user reference is supplied through metadata. Authentication still comes from the request credentials.
betas — not explicitly supplied. No beta list appears in these calls. SDK/client configuration can add headers; inspect those before assuming no beta header is sent.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The loop stops as soon as it sees text, but the model was also asking for a tool. What should decide when the loop stops?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: The agentic loop: the exam's core object
Study: The agentic loop: the exam's core object Agent loop Stop reason stop_reason
Return to Foundations Mock Exam 1 · Q533's situation and clause-by-clause explanation
Answer
**A.** The API already states why the model stopped: stop_reason "tool_use" means a requested tool must run and its result must go back, and "end_turn" means the model has finished. Telling the model never to mix text and tool calls keeps a fragile text-based signal alive behind a prompt rule that will sometimes fail, while minimum iteration counts and phrase matching are the other named loop anti-patterns.Q534. A customer gives only the name 'Jordan Ellis'. get_customer returns three active accounts with that name in different states. The agent currently picks the account with the most recent order and continues, and one such guess led to a refund on a stranger's order. What should the agent do? (Select ONE.) A) Escalate to a human every time get_customer returns more than one match, since identity questions are outside the agent's scope. B) Ask the customer for another identifier, such as the order number or the account email, and continue only when exactly one account matches. C) Pick the most recent account but block process_refund on it until the customer confirms the order total in a later message. D) Choose the account whose recent orders best match the products the customer mentioned, and confirm that choice with the customer in the closing summary.
Understand Foundations Mock Exam 1 · Q534 · the situation and each part of the question
The real situation behind this question
Common names are a real problem at Larkspur's scale. When a customer says only 'Jordan Ellis', get_customer finds three different people. The agent has been picking the one with the most recent order, which sounds sensible, until it refunded an order belonging to a different Jordan Ellis. Money went to the wrong person, and private order details were discussed with a stranger.
Read the question in parts
Part 1 · gives only the name 'Jordan Ellis'
the identifier provided is not unique, so the agent needs a stronger one
Part 2 · one such guess led to a refund on a stranger's order
acting on a heuristic choice causes harm, so the agent must not guess
What you are being asked to decide
Three customers share the same name. How should the agent choose the right account? Tests asking for additional identifiers instead of choosing among multiple matches by heuristic.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Multiple matches | a get_customer result that contains several accounts, so identity is not yet established |
| Escalation | handing the case to a human; not needed here because one clarifying question resolves it |
Study: Escalation and ambiguity: when to hand off, when to ask Escalation tool_result Trust boundary
Understand Foundations Mock Exam 1 · Q534's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Multiple matches mean identity is unknown. The agent should ask for an identifier that resolves it and act only on a single confirmed match, never pick an account by heuristic.
Connect the design to the situation
Three 'Jordan Ellis' accounts in Oregon, Ohio and Texas.
Best answer: B. Several matches mean the agent does not yet know who it is talking to, so it must ask for an identifier that settles it. Choosing by recent orders or mentioned products is still a heuristic guess, and acting on a guessed identity is what caused the wrong refund. Escalating every multi-match is unnecessary because one extra question usually resolves it.
The decisive evidence in the stem
returns three active accounts with that name
The tool result is ambiguous about identity, so the next step must remove the ambiguity with more information, not pick one account.
Official objective tested: Task 5.2 · Design effective escalation and ambiguity resolution patterns
What each choice would do here
A · Why this does not meet the full requirement
Escalate to a human every time get_customer returns more than one match, since identity questions are outside the agent's scope.
Sends a case to humans that one question could resolve.
Every common-name case becomes a human task, adding queue time for something a single question solves. First-contact resolution drops, and humans would simply ask for the order number anyway.
B · Why this meets the requirement
Ask the customer for another identifier, such as the order number or the account email, and continue only when exactly one account matches.
Removes the ambiguity before any account action happens.
The agent says it found more than one account and asks for the order number or the account email. When one account matches, it continues with confidence. No stranger's data is shown and no refund goes to the wrong person.
C · Why this does not meet the full requirement
Pick the most recent account but block process_refund on it until the customer confirms the order total in a later message.
Starts on a guessed account and relies on a late check.
The agent discusses the chosen account's orders before identity is settled, which may expose a stranger's data. The late refund block helps, but other actions and disclosures happen on a guessed account.
D · Why this does not meet the full requirement
Choose the account whose recent orders best match the products the customer mentioned, and confirm that choice with the customer in the closing summary.
Still guesses identity, only with a different heuristic.
Matching products narrows the field but can still be wrong, for example when two people bought the same popular tent. The agent still acts on an unconfirmed identity, and other customers' details may be discussed before the guess is checked.
Check your understanding · explain the design in your own words
Three customers share the same name. How should the agent choose the right account?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Escalation and ambiguity: when to hand off, when to ask
Study: Escalation and ambiguity: when to hand off, when to ask Escalation tool_result Trust boundary
Return to Foundations Mock Exam 1 · Q534's situation and clause-by-clause explanation
Answer
**B.** Several matches mean the agent does not yet know who it is talking to, so it must ask for an identifier that settles it. Choosing by recent orders or mentioned products is still a heuristic guess, and acting on a guessed identity is what caused the wrong refund. Escalating every multi-match is unnecessary because one extra question usually resolves it.Q535. The system prompt tells Larkspur's agent never to refund more than $300 per order without a human. An audit of 40,000 chats finds 52 process_refund calls above that limit, each after a customer pushed back several times. Finance requires zero such refunds. What should you implement? (Select ONE.) A) A PostToolUse hook that reads each completed process_refund result and lists every refund above $300 in a daily finance report so the team can claw it back later. B) Repeat the $300 limit at the end of the system prompt in capital letters, and add few-shot examples of the agent politely declining refunds after repeated pushback. C) A hook that intercepts every outgoing process_refund call, blocks any amount above $300, and redirects the case to escalate_to_human with the amount attached. D) A classifier that scores pushback in each customer message and switches the agent to a stricter system prompt once the score is high.
Understand Foundations Mock Exam 1 · Q535 · the situation and each part of the question
The real situation behind this question
Larkspur's finance team found 52 refunds above the $300 limit in one audit. Each one happened after a customer argued long enough that the agent gave in, even though the system prompt says it must not. Finance does not want a lower violation rate; it wants none at all, because each over-limit refund is lost money and an audit finding. The engineering team must choose a mechanism that the model cannot talk its way around.
Read the question in parts
Part 1 · Finance requires zero such refunds
the requirement is a guarantee, so the control must be enforced by code, not requested in a prompt
Part 2 · each after a customer pushed back several times
the prompt rule already exists and fails under social pressure, so more wording is unlikely to close the gap
What you are being asked to decide
The prompt says 'no refunds above $300', but the agent sometimes does it anyway. How do you make it impossible? Tests choosing a pre-execution hook over prompt rules when compliance must be guaranteed.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Hook | code the Agent SDK runs at a fixed point, here before a process_refund call executes, which can deny the call |
| Deterministic | the same input always gives the same outcome: a $410 refund request is blocked every time |
Study: Agent SDK hooks: block a call, clean up a result Hook Deterministic Guardrail
Understand Foundations Mock Exam 1 · Q535's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The rule must hold every time, and money moves when the tool runs. So the check belongs in a hook that intercepts process_refund before execution, blocks amounts above $300 and redirects to escalation.
Connect the design to the situation
A customer pushes back three times and the agent issues a $410 refund despite the prompt rule.
Best answer: C. Finance needs a guarantee, and only code that runs before the tool executes can give one: a pre-execution hook sees the amount, denies the call and sends the case to a human. Stronger prompt wording and examples lower the rate but cannot reach zero, and a PostToolUse hook runs after the money has already moved.
The decisive evidence in the stem
Finance requires zero such refunds
A zero-tolerance business rule needs deterministic enforcement before execution; any prompt-based approach keeps a small but real failure rate.
Official objective tested: Task 1.5 · Apply Agent SDK hooks for tool call interception and data normalization
What each choice would do here
A · Why this does not meet the full requirement
A PostToolUse hook that reads each completed process_refund result and lists every refund above $300 in a daily finance report so the team can claw it back later.
Runs after the refund executes, so it detects violations instead of preventing them.
The report finds every violation, but only after the refund has been sent. Finance must then reverse payments and contact customers, which is the outcome it wanted to prevent. Detection after the fact is not enforcement.
B · Why this does not meet the full requirement
Repeat the $300 limit at the end of the system prompt in capital letters, and add few-shot examples of the agent politely declining refunds after repeated pushback.
Strengthens guidance, which still fails under pressure some of the time.
Repetition and examples may reduce violations from 52 to a smaller number, but the model can still be persuaded in a long chat. The control remains text the model reads, so the 'zero' requirement is never actually guaranteed.
C · Why this meets the requirement
A hook that intercepts every outgoing process_refund call, blocks any amount above $300, and redirects the case to escalate_to_human with the amount attached.
Blocks the call before money moves and routes the case to a human.
Before process_refund runs, the hook reads the amount from the tool input. Above $300 it denies the call and returns a message that tells the agent to escalate with the requested amount. The refund cannot execute, whatever the conversation says.
D · Why this does not meet the full requirement
A classifier that scores pushback in each customer message and switches the agent to a stricter system prompt once the score is high.
Adds a probabilistic detector and still relies on a prompt to obey.
The classifier may catch some pushback, but customers push in many ways and the stricter prompt is still only guidance. Two probabilistic layers in a row still allow over-limit refunds to execute.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
PreToolUse-style check for process_refund (illustrative)
REFUND_LIMIT = 300
async def refund_limit_hook(input_data, tool_use_id, context):
if input_data["tool_name"] != "mcp__support__process_refund":
return {}
amount = input_data["tool_input"].get("amount", 0)
if amount > REFUND_LIMIT:
return {"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": f"Refund {amount} exceeds {REFUND_LIMIT}. Call escalate_to_human with this amount."}}
return {}The tool name and output shape are illustrative; check the current Agent SDK hook documentation for exact field names.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The prompt says 'no refunds above $300', but the agent sometimes does it anyway. How do you make it impossible?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Agent SDK hooks: block a call, clean up a result
Study: Agent SDK hooks: block a call, clean up a result Hook Deterministic Guardrail
Return to Foundations Mock Exam 1 · Q535's situation and clause-by-clause explanation
Answer
**C.** Finance needs a guarantee, and only code that runs before the tool executes can give one: a pre-execution hook sees the amount, denies the call and sends the case to a human. Stronger prompt wording and examples lower the rate but cannot reach zero, and a PostToolUse hook runs after the money has already moved.Q536. A customer writes that a camp stove arrived dented, that they were charged twice for it, and that their account still shows an old email address. The agent currently handles only the first problem it notices and ends the chat, and 31% of multi-issue customers contact support again. Which design should you adopt? (Select ONE.) A) Have the agent split the message into separate issues, investigate each using the shared customer context, then give one combined resolution covering all three. B) Ask the model to rank the three issues by urgency, resolve only the most urgent one fully, and mention the others in its closing message. C) Escalate every message that mentions more than one problem to a human, since multi-issue requests are too complex for autonomous handling. D) Resolve the dent now, then invite the customer to open a new chat for the double charge and a third chat for the email change.
Understand Foundations Mock Exam 1 · Q536 · the situation and each part of the question
The real situation behind this question
Customers often bundle problems. This one has a damaged stove, a duplicate charge and an outdated email address, all in one message. Larkspur's agent fixes the dent, says goodbye, and the customer comes back the next day about the money. Almost a third of multi-issue customers return this way, which hurts the first-contact resolution target and costs a second chat for each of them.
Read the question in parts
Part 1 · handles only the first problem it notices
the agent does not identify all the issues, so the plan must start by listing them
Part 2 · 31% of multi-issue customers contact support again
the metric that must improve is repeat contact, so every issue must be resolved in one chat
What you are being asked to decide
One message contains three different problems, and the agent fixes only one. How should it handle such messages? Tests decomposing a multi-concern request into items, investigating each, and answering once.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Decomposition | splitting the customer's message into three separate items the agent must each resolve |
| Parallelization | checking the order, the payment records and the account at the same time when they do not depend on each other |
Study: Harness controls: what makes an agent production-grade Decomposition Parallelization Escalation
Understand Foundations Mock Exam 1 · Q536's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Several independent issues in one message means the agent must split the request, investigate each item with the shared verified context, and send one unified resolution. That is how a bundled request becomes a single resolved contact.
Connect the design to the situation
Dented stove, double charge and an outdated email address, all in one message.
Best answer: A. Decomposing the request into distinct issues, investigating each with the same verified customer context (in parallel where they are independent) and then answering once is what removes the repeat contacts. Escalating every multi-issue chat gives up on cases that are within the agent's tools and works against the 80% resolution target.
The decisive evidence in the stem
handles only the first problem it notices
The failure is incomplete coverage of one message with several independent issues, so the fix is to decompose and cover each one.
Official objective tested: Task 1.4 · Implement multi-step workflows with enforcement and handoff patterns
What each choice would do here
A · Why this meets the requirement
Have the agent split the message into separate issues, investigate each using the shared customer context, then give one combined resolution covering all three.
Covers every issue with shared context and one final answer.
The agent lists three items, verifies the customer once, checks the order for damage, the payments for the duplicate charge and the account for the email in parallel, then writes one reply that resolves all three. Nothing is left for a second contact.
B · Why this does not meet the full requirement
Ask the model to rank the three issues by urgency, resolve only the most urgent one fully, and mention the others in its closing message.
Still leaves two issues unresolved inside the same conversation.
Ranking helps the agent choose an order, but resolving only one item still sends the customer back. Mentioning the other issues does not refund the duplicate charge or update the email address.
C · Why this does not meet the full requirement
Escalate every message that mentions more than one problem to a human, since multi-issue requests are too complex for autonomous handling.
Gives up on solvable cases and lowers first-contact resolution.
Every bundled message goes to a person, including easy ones such as an email change and a clear double charge. Human queues grow, first-contact resolution by the agent falls, and the issues were within the agent's tools all along.
D · Why this does not meet the full requirement
Resolve the dent now, then invite the customer to open a new chat for the double charge and a third chat for the email change.
Turns one contact into three, which is exactly the repeat-contact problem.
The customer must start over twice. Each new chat repeats identity checks and context, and each counts as a separate contact, so the repeat-contact rate gets worse instead of better.
Check your understanding · explain the design in your own words
One message contains three different problems, and the agent fixes only one. How should it handle such messages?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Harness controls: what makes an agent production-grade
Study: Harness controls: what makes an agent production-grade Decomposition Parallelization Escalation
Return to Foundations Mock Exam 1 · Q536's situation and clause-by-clause explanation
Answer
**A.** Decomposing the request into distinct issues, investigating each with the same verified customer context (in parallel where they are independent) and then answering once is what removes the repeat contacts. Escalating every multi-issue chat gives up on cases that are within the agent's tools and works against the 80% resolution target.Q537. During a database failover, lookup_order returned an empty orders list instead of an error for 20 minutes. The agent told 140 customers that no orders existed on their accounts, and several placed duplicate orders for items they had already bought. What change to lookup_order prevents this? (Select ONE.) A) Escalate to a human every conversation in which lookup_order returns no orders, since an empty result might hide a backend outage. B) Add a system prompt rule telling the agent to double-check with get_customer whenever lookup_order returns an empty orders list, before it tells the customer anything. C) Return an error marked transient and retryable when the order database is unreachable, and keep an empty list only for successful queries that find nothing. D) Cache each customer's last known orders inside the tool, and return the cached list whenever the database is unreachable, without informing the agent of the outage.
Understand Foundations Mock Exam 1 · Q537 · the situation and each part of the question
The real situation behind this question
Larkspur's order database switched to a backup server for twenty minutes. During that time, lookup_order did not fail loudly; it simply returned no orders. The agent believed it and told 140 customers they had no orders. Some customers panicked and bought the same items again. The team now needs the tool to say clearly when it could not check, so that the agent never reports an outage as a fact.
Read the question in parts
Part 1 · returned an empty orders list instead of an error
the tool's contract mixed up two different outcomes, which is where the fix must go
Part 2 · several placed duplicate orders
the wrong answer caused real customer harm, so the agent must be able to recognize unreliable results
What you are being asked to decide
During an outage the tool said 'no orders' instead of 'cannot check'. How should it report this? Tests distinguishing an access failure from a valid empty result in a tool's response.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Valid empty result | a successful query that found no orders, which the agent may report to the customer as fact |
| Graceful degradation | keeping the service honest and useful during an outage, here by saying 'we cannot check right now' |
Study: The MCP error contract: isError and structured error metadata Error taxonomy Graceful degradation tool_result
Understand Foundations Mock Exam 1 · Q537's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The tool must keep two outcomes apart: an error for 'could not query' and an empty list for 'queried and found nothing'. Only then can the agent choose between retrying, explaining a delay and reporting no orders.
Connect the design to the situation
The order database is failing over, and lookup_order returns [] for every customer.
Best answer: C. An empty list means 'the query worked and found nothing'; an unreachable database means 'we do not know'. The tool must report these differently so the agent can retry or tell the customer about a delay. Silently returning cached data hides the outage and may be stale, and escalating every empty result floods humans with valid no-order cases.
The decisive evidence in the stem
returned an empty orders list instead of an error
The tool turned an access failure into a valid-looking empty result, so the agent had no way to know the answer was unreliable.
Official objective tested: Task 2.2 · Implement structured error responses for MCP tools
What each choice would do here
A · Why this does not meet the full requirement
Escalate to a human every conversation in which lookup_order returns no orders, since an empty result might hide a backend outage.
Treats every genuine no-order case as a possible outage.
New customers and customers asking about someone else's order legitimately have no orders. Sending all of them to humans adds load, and the tool still does not say when the database was actually unreachable.
B · Why this does not meet the full requirement
Add a system prompt rule telling the agent to double-check with get_customer whenever lookup_order returns an empty orders list, before it tells the customer anything.
Adds an extra call that does not reveal whether orders exist.
get_customer returns profile data, not orders, so it cannot confirm whether orders exist. The agent still sees an empty list that looks valid, and still has no signal that the database was down.
C · Why this meets the requirement
Return an error marked transient and retryable when the order database is unreachable, and keep an empty list only for successful queries that find nothing.
Lets the agent tell 'nothing found' apart from 'could not check'.
During a failover the agent receives isError true with a transient category and a retryable flag. It retries once, then tells the customer the order system is temporarily unavailable. A real empty list still means no orders, and the agent can say so with confidence.
D · Why this does not meet the full requirement
Cache each customer's last known orders inside the tool, and return the cached list whenever the database is unreachable, without informing the agent of the outage.
Hides the outage and may serve stale order data as current.
Customers may see orders that are hours old, missing recent purchases or cancellations, and the agent presents them as current. The outage is invisible, so nobody, including the agent, knows the data might be wrong.
Check your understanding · explain the design in your own words
During an outage the tool said 'no orders' instead of 'cannot check'. How should it report this?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: The MCP error contract: isError and structured error metadata
Study: The MCP error contract: isError and structured error metadata Error taxonomy Graceful degradation tool_result
Return to Foundations Mock Exam 1 · Q537's situation and clause-by-clause explanation
Answer
**C.** An empty list means 'the query worked and found nothing'; an unreachable database means 'we do not know'. The tool must report these differently so the agent can retry or tell the customer about a delay. Silently returning cached data hides the outage and may be stale, and escalating every empty result floods humans with valid no-order cases.Q538. process_refund returns {"error": "Operation failed"} both when the payment gateway times out and when an order is outside the 30-day window. Logs show the agent retrying window violations three times, then telling customers 'a temporary issue occurred, please try later.' How should the tool report failures? (Select ONE.) A) Tell the agent to stop retrying after the first failure of any kind and to escalate to a human every time any refund call returns an error of any type. B) Keep one generic message but add a numeric status code to it, and list in the system prompt which codes the agent may retry and which it may not. C) Return isError true with an errorCategory such as transient or business, an isRetryable flag, and a customer-safe explanation of the failure. D) Retry gateway timeouts inside the tool up to five times with backoff, and return the same 'Operation failed' text once every attempt has been used up.
Understand Foundations Mock Exam 1 · Q538 · the situation and each part of the question
The real situation behind this question
When a Larkspur refund fails, the agent sees only 'Operation failed'. Sometimes the payment gateway was briefly down, and a retry would work. Other times the order is simply too old for a refund, and no retry will ever work. The agent cannot tell the difference, so it retries policy failures and then blames a 'temporary issue', which misleads customers about why they are not getting their money.
Read the question in parts
Part 1 · both when the payment gateway times out and when an order is outside the 30-day window
one message covers a retryable and a non-retryable failure, so recovery cannot be chosen correctly
Part 2 · then telling customers 'a temporary issue occurred, please try later.'
the agent also lacks a truthful, customer-safe explanation for business-rule failures
What you are being asked to decide
Two very different failures return the same 'Operation failed' message. What should the error look like? Tests returning structured, categorized error metadata so the agent can choose the right recovery.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Error taxonomy | the categories (transient, validation, business, permission) that tell the agent how to respond to a failure |
| isRetryable | an illustrative field in the tool result saying whether trying again could succeed |
Study: The MCP error contract: isError and structured error metadata Error taxonomy MCP server Idempotency
Understand Foundations Mock Exam 1 · Q538's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Recovery depends on the kind of failure. So the tool must return structured error metadata: isError, a category, a retryable flag and a customer-safe description that the agent can act on directly.
Connect the design to the situation
A gateway timeout and a closed return window both produce 'Operation failed'.
Best answer: C. The agent cannot choose the right recovery because both failures look the same. Structured error metadata (category, retryable flag and a plain explanation) lets it retry the timeout and explain the policy decision honestly. A numeric code plus a prompt lookup table moves the meaning into instructions the model must remember, instead of putting it in the result it is reading.
The decisive evidence in the stem
both when the payment gateway times out and when an order is outside the 30-day window
A transient failure and a business-rule failure need opposite responses, so the error must tell the agent which one occurred.
Official objective tested: Task 2.2 · Implement structured error responses for MCP tools
What each choice would do here
A · Why this does not meet the full requirement
Tell the agent to stop retrying after the first failure of any kind and to escalate to a human every time any refund call returns an error of any type.
Replaces wasted retries with needless escalations of simple policy answers.
No more repeated retries, but every closed-window case now goes to a human although the agent could explain the policy itself. Escalations rise and first-contact resolution falls.
B · Why this does not meet the full requirement
Keep one generic message but add a numeric status code to it, and list in the system prompt which codes the agent may retry and which it may not.
Encodes the meaning in a prompt table instead of in the result itself.
The agent must map numbers to meanings from a list in its instructions, and the list can drift from the server's real codes. The customer-facing explanation is still missing, so the agent still invents wording for policy failures.
C · Why this meets the requirement
Return isError true with an errorCategory such as transient or business, an isRetryable flag, and a customer-safe explanation of the failure.
Tells the agent what failed, whether to retry and what to say.
The tool returns, for example, isError true, errorCategory 'business', isRetryable false and 'order is outside the 30-day return window'. The agent stops retrying, explains the policy and offers alternatives; on a transient timeout it retries instead.
D · Why this does not meet the full requirement
Retry gateway timeouts inside the tool up to five times with backoff, and return the same 'Operation failed' text once every attempt has been used up.
Fixes timeouts locally but still hides the policy violation.
Local retries of timeouts are useful, but policy failures still come back as 'Operation failed'. The agent still cannot tell a closed window from an outage, and still says 'temporary issue' to customers.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Two structured failures from process_refund (illustrative)
{
"timeout_example": {"isError": true, "content": [{"type": "text", "text": "{\"errorCategory\": \"transient\", \"isRetryable\": true, \"description\": \"Payment gateway timed out after 10 s.\"}"}]},
"policy_example": {"isError": true, "content": [{"type": "text", "text": "{\"errorCategory\": \"business\", \"isRetryable\": false, \"description\": \"Order 5521 was delivered 41 days ago; the return window is 30 days.\"}"}]}
}isError is the MCP result flag; the category, retry flag and description inside the text are your own illustrative contract.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Two very different failures return the same 'Operation failed' message. What should the error look like?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: The MCP error contract: isError and structured error metadata
Study: The MCP error contract: isError and structured error metadata Error taxonomy MCP server Idempotency
Return to Foundations Mock Exam 1 · Q538's situation and clause-by-clause explanation
Answer
**C.** The agent cannot choose the right recovery because both failures look the same. Structured error metadata (category, retryable flag and a plain explanation) lets it retry the timeout and explain the policy decision honestly. A numeric code plus a prompt lookup table moves the meaning into instructions the model must remember, instead of putting it in the result it is reading.Q539. lookup_order reads from two warehouse systems. The legacy one returns delivered_at as a Unix timestamp; the newer one returns an ISO 8601 string with a time-zone offset. The agent misjudges Larkspur's 30-day return window on about 9% of legacy orders and on none of the others. What is the most reliable fix? (Select ONE.) A) Add a PostToolUse hook that converts every delivered_at value to one ISO 8601 UTC format before the result reaches the model, whatever its source. B) Ask the model to state the delivery date it computed before deciding eligibility, so reviewers can catch conversion mistakes in the logs. C) Move the agent to a larger model with stronger arithmetic, since the errors come from converting epoch seconds into dates during reasoning. D) Add system prompt instructions that explain how to convert Unix timestamps into calendar dates, with two worked examples of the 30-day calculation.
Understand Foundations Mock Exam 1 · Q539 · the situation and each part of the question
The real situation behind this question
Larkspur is halfway through a warehouse migration. Older orders come from the legacy system, which reports delivery time as a number of seconds since 1970; newer orders come with readable ISO dates. When a customer asks to return a jacket, the agent must decide whether the 30-day window is still open. It gets this wrong for some legacy orders, telling customers they are too late or approving late returns.
Read the question in parts
Part 1 · returns delivered_at as a Unix timestamp
one source uses a format the model must convert mentally before it can compare dates
Part 2 · What is the most reliable fix
the question asks for the approach with the lowest remaining failure rate, which points to deterministic code
What you are being asked to decide
Two systems report delivery dates in different formats, and the agent gets the date math wrong for one of them. Where do you fix it? Tests using a PostToolUse hook to normalize mixed data formats before the model reasons over them.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| PostToolUse hook | code that runs after lookup_order returns and rewrites the result before the model reads it |
| tool_result | the block that carries lookup_order's output back to the model, here after the hook has normalized the date |
Study: Agent SDK hooks: block a call, clean up a result Hook tool_result Deterministic
Understand Foundations Mock Exam 1 · Q539's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The failure follows one data format. So the right place to fix it is the data, in code, before the model reads it: a PostToolUse hook that normalizes every delivered_at value into one format.
Connect the design to the situation
delivered_at arrives as 1760054400 from one system and as 2025-10-10T00:00:00-07:00 from the other.
Best answer: A. The errors appear only on the legacy format, so the cause is inconsistent data, not weak reasoning. A PostToolUse hook normalizes every delivered_at value deterministically before the model sees it, so there is nothing left to convert. Prompt instructions for the conversion keep the error-prone step in the model's reasoning and only lower the failure rate.
The decisive evidence in the stem
on about 9% of legacy orders and on none of the others
The failure follows the data format, which shows the fix is to normalize the format in code rather than to teach the model a conversion.
Official objective tested: Task 1.5 · Apply Agent SDK hooks for tool call interception and data normalization
What each choice would do here
A · Why this meets the requirement
Add a PostToolUse hook that converts every delivered_at value to one ISO 8601 UTC format before the result reaches the model, whatever its source.
Removes the inconsistent format before the model ever reasons about it.
The hook detects an integer delivered_at, converts it to the same ISO 8601 UTC string the newer system uses, and passes the result on. The model always compares two readable dates, so the legacy-only error disappears.
B · Why this does not meet the full requirement
Ask the model to state the delivery date it computed before deciding eligibility, so reviewers can catch conversion mistakes in the logs.
Makes errors visible after the fact but does not prevent them.
Reviewers see the stated date and can spot errors, but only after the customer has received a wrong answer. It is a monitoring aid, and the agent still performs the risky conversion on each legacy order.
C · Why this does not meet the full requirement
Move the agent to a larger model with stronger arithmetic, since the errors come from converting epoch seconds into dates during reasoning.
Treats a data-format problem as a model-capability problem.
A larger model may convert more accurately, but it still converts, and it costs more on every request. The root cause, two formats for one field, remains in place and will affect the next field that differs.
D · Why this does not meet the full requirement
Add system prompt instructions that explain how to convert Unix timestamps into calendar dates, with two worked examples of the 30-day calculation.
Teaches a conversion the model will still sometimes get wrong.
The model gets a recipe, and many conversions will improve. But the conversion still happens in the model's reasoning on every legacy order, so a fraction of window decisions stays wrong, and the instruction adds prompt length to every chat.
Check your understanding · explain the design in your own words
Two systems report delivery dates in different formats, and the agent gets the date math wrong for one of them. Where do you fix it?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Agent SDK hooks: block a call, clean up a result
Study: Agent SDK hooks: block a call, clean up a result Hook tool_result Deterministic
Return to Foundations Mock Exam 1 · Q539's situation and clause-by-clause explanation
Answer
**A.** The errors appear only on the legacy format, so the cause is inconsistent data, not weak reasoning. A PostToolUse hook normalizes every delivered_at value deterministically before the model sees it, so there is nothing left to convert. Prompt instructions for the conversion keep the error-prone step in the model's reasoning and only lower the failure rate.Q540. Human agents who receive Larkspur escalations spend about six minutes per case re-asking customers for order numbers and what was already tried. The escalate_to_human call currently sends one free-text field, for example 'Customer needs help with a refund.' What change would most reduce this rework? (Select ONE.) A) Attach the full chat transcript and every raw tool result as files on the escalation ticket, so human agents can read the complete history themselves before replying. B) Tell the agent in the system prompt to write a more detailed escalation message, and review a sample of escalation texts each week for quality. C) Route all escalations to a senior queue, where experienced agents can resolve cases quickly without needing background from the conversation. D) Make escalate_to_human require structured fields: customer ID, order IDs, root cause found, actions already taken, amount at stake and a recommended next step.
Understand Foundations Mock Exam 1 · Q540 · the situation and each part of the question
The real situation behind this question
Larkspur's human support team takes over the chats the agent cannot finish. Their tickets are thin: one sentence saying the customer needs help with a refund. So every human agent starts by asking the customer for the order number, what the bot already checked, and what went wrong. Customers repeat themselves and get annoyed, and each case loses about six minutes. The team wants escalations that let a human continue the case instead of restarting it.
Read the question in parts
Part 1 · re-asking customers for order numbers and what was already tried
the human lacks specific case facts that the agent already collected during the chat
Part 2 · one free-text field
the current tool definition allows any text, so nothing guarantees which facts arrive with the ticket
What you are being asked to decide
Humans who take over escalated chats keep asking customers the same questions again. What should the escalation send them? Tests designing a structured handoff for humans who cannot see the conversation.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Handoff | the moment the case moves from the agent to a human, together with the data that travels with it |
| input_schema | the JSON Schema on escalate_to_human that can make fields such as customer ID and recommended action required |
Study: Escalation design (scenario 1 territory) Handoff Escalation Tool input schema
Understand Foundations Mock Exam 1 · Q540's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Human agents see only the ticket. Therefore the ticket must carry the case facts in a fixed shape. A structured handoff with required fields is the design; more text, more transcript or a different queue does not deliver the missing facts.
Connect the design to the situation
An escalation ticket that says only 'Customer needs help with a refund.'
Best answer: D. The human agents see only the ticket, so the handoff itself must carry the facts they need to act: who, which orders, what was found, what was tried and what to do next. Attaching the full transcript and raw tool output moves the reading work to the human instead of giving them a decision-ready summary, and a prompt request for 'more detail' leaves the content optional and inconsistent.
The decisive evidence in the stem
re-asking customers for order numbers and what was already tried
The missing information is specific and predictable, so a handoff with required structured fields can deliver it every time instead of hoping a free-text note includes it.
Official objective tested: Task 1.4 · Implement multi-step workflows with enforcement and handoff patterns
What each choice would do here
A · Why this does not meet the full requirement
Attach the full chat transcript and every raw tool result as files on the escalation ticket, so human agents can read the complete history themselves before replying.
Moves the reading work to the human instead of summarizing the case.
Human agents receive the whole history, but they must read a long transcript and raw JSON to find the order IDs and the root cause. The six minutes of re-asking may become six minutes of reading, and the most important facts are still not highlighted.
B · Why this does not meet the full requirement
Tell the agent in the system prompt to write a more detailed escalation message, and review a sample of escalation texts each week for quality.
Asks for more detail but leaves the content optional and inconsistent.
Some messages will improve, but the content stays at the model's discretion. A weekly review finds problems after customers were already asked to repeat themselves, and nothing forces the order IDs or the recommended action to appear in every ticket.
C · Why this does not meet the full requirement
Route all escalations to a senior queue, where experienced agents can resolve cases quickly without needing background from the conversation.
Changes who receives the case, not what information they receive.
Senior agents may be faster, but they still open a ticket that says only 'needs help with a refund'. They still have to ask the customer for order numbers, because the problem is missing information, not missing experience.
D · Why this meets the requirement
Make escalate_to_human require structured fields: customer ID, order IDs, root cause found, actions already taken, amount at stake and a recommended next step.
Gives humans the decision-ready facts they lack in a fixed shape.
The tool's input_schema makes each fact required, so the agent must fill customer ID, orders, root cause, actions taken, amount and a recommendation before the call succeeds. The human opens a ticket that already says what happened and what to do next.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
escalate_to_human input schema (illustrative)
{
"name": "escalate_to_human",
"description": "Hand the case to a human agent who cannot see this chat. Fill every field from facts confirmed in the conversation.",
"input_schema": {
"type": "object",
"properties": {
"customer_id": {"type": "string"},
"order_ids": {"type": "array", "items": {"type": "string"}},
"root_cause": {"type": "string"},
"actions_taken": {"type": "array", "items": {"type": "string"}},
"amount_at_stake": {"type": ["number", "null"]},
"recommended_action": {"type": "string"}
},
"required": ["customer_id", "order_ids", "root_cause", "actions_taken", "recommended_action"]
}
}Field names are illustrative. The required list is what makes the handoff complete on every escalation.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Humans who take over escalated chats keep asking customers the same questions again. What should the escalation send them?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Escalation design (scenario 1 territory)
Study: Escalation design (scenario 1 territory) Handoff Escalation Tool input schema
Return to Foundations Mock Exam 1 · Q540's situation and clause-by-clause explanation
Answer
**D.** The human agents see only the ticket, so the handoff itself must carry the facts they need to act: who, which orders, what was found, what was tried and what to do next. Attaching the full transcript and raw tool output moves the reading work to the human instead of giving them a decision-ready summary, and a prompt request for 'more detail' leaves the content optional and inconsistent.Q541. In long chats, Larkspur summarizes older turns to save context. A review finds that after summarization the agent sometimes quotes the wrong refund amount: a customer promised $84.20 on order 5521 was later offered 'a partial refund of about $80.' Which design keeps such details reliable? (Select ONE.) A) Summarize more often with shorter summaries, so that each summary covers fewer turns and has less room to drop numerical details. B) Stop summarizing and send the complete transcript every time, accepting slower and costlier requests so that no detail can ever be lost. C) Instruct the summarizer to be more careful with numbers, and add a final step asking the model to confirm any amount it plans to quote. D) Keep a persistent case-facts block of order IDs, amounts, dates and promises made, included in every request outside the summarized history.
Understand Foundations Mock Exam 1 · Q541 · the situation and each part of the question
The real situation behind this question
Larkspur's long chats, such as complicated billing disputes, can run for dozens of turns. To stay within budget, the application summarizes older turns. But summaries are approximate by nature. One customer was promised exactly $84.20 on order 5521; forty turns later the agent offered 'about $80'. The customer felt cheated, and the team must make sure promises and amounts survive any summarization.
Read the question in parts
Part 1 · summarizes older turns to save context
summarization stays, so the design must protect the facts that summaries tend to blur
Part 2 · a customer promised $84.20 on order 5521
exact amounts, order IDs and commitments are the details that must survive unchanged
What you are being asked to decide
Summarizing old turns turned an exact refund promise into 'about $80'. How do you keep exact facts safe? Tests keeping transactional facts in a persistent block outside summarized history.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Case-facts block | a short structured list of order IDs, amounts, dates and promises that your application sends with every request |
| Compaction | replacing older conversation turns with a summary to save context, which can blur exact numbers |
Study: Long-conversation strategy (support agent scenario) Compaction Context budget Context window
Understand Foundations Mock Exam 1 · Q541's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Summaries blur exact values. Keep transactional facts such as amounts, dates, order IDs and promises in a persistent case-facts block sent with every request, separate from the summarized history.
Connect the design to the situation
$84.20 promised on order 5521 becomes 'about $80' after summarization.
Best answer: D. Progressive summarization tends to blur exact values and commitments. Extracting them into a case-facts block that is sent with every request, and kept outside the summary, preserves them exactly. Sending the full transcript avoids loss but gives up the reason for summarizing, and on long chats it still risks details getting lost in the middle.
The decisive evidence in the stem
'a partial refund of about $80.'
The exact amount and promise were turned into a vague approximation by summarization, which shows that transactional facts need storage outside the summary.
Official objective tested: Task 5.1 · Manage conversation context to preserve critical information across long interactions
What each choice would do here
A · Why this does not meet the full requirement
Summarize more often with shorter summaries, so that each summary covers fewer turns and has less room to drop numerical details.
Changes how often summaries happen but not what they lose.
Shorter, more frequent summaries still compress numbers each time, and repeated summarization can blur them further. The loss happens at a different rhythm but still happens.
B · Why this does not meet the full requirement
Stop summarizing and send the complete transcript every time, accepting slower and costlier requests so that no detail can ever be lost.
Avoids loss by giving up the benefit of summarizing at all.
Nothing is summarized away, but every request grows with the chat, raising cost and latency, and in very long chats key facts sit in the middle of a large input where they can still be overlooked.
C · Why this does not meet the full requirement
Instruct the summarizer to be more careful with numbers, and add a final step asking the model to confirm any amount it plans to quote.
Asks the same lossy step to try harder, with no guaranteed result.
A more careful summarizer still compresses, and a self-check asks the model to verify against the same blurred summary. If the summary already says 'about $80', the check has nothing exact to compare with.
D · Why this meets the requirement
Keep a persistent case-facts block of order IDs, amounts, dates and promises made, included in every request outside the summarized history.
Stores exact facts separately so summarization cannot blur them.
The application keeps a block such as 'order 5521, refund promised 84.20, approved on 10-14' and places it in every request. The summary can stay short, while the exact amount and promise remain visible on every turn.
Check your understanding · explain the design in your own words
Summarizing old turns turned an exact refund promise into 'about $80'. How do you keep exact facts safe?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Long-conversation strategy (support agent scenario)
Study: Long-conversation strategy (support agent scenario) Compaction Context budget Context window
Return to Foundations Mock Exam 1 · Q541's situation and clause-by-clause explanation
Answer
**D.** Progressive summarization tends to blur exact values and commitments. Extracting them into a case-facts block that is sent with every request, and kept outside the summary, preserves them exactly. Sending the full transcript avoids loss but gives up the reason for summarizing, and on long chats it still risks details getting lost in the middle.Q542. Yesterday a customer began a damaged-tent claim; the chat ended while the agent waited for photos. Overnight the warehouse shipped a replacement, so lookup_order now shows a new status. Today the customer returns with photos. Your application can resume yesterday's session, whose history still holds the old lookup_order results. What should it do? (Select ONE.) A) Resume yesterday's session and move to a model with a larger context window, so the old order data and today's photos both fit without summarizing. B) Start a new session seeded with a structured summary of yesterday's claim, noting the order changed overnight, so the agent calls lookup_order again. C) Fork yesterday's session into two branches, one assuming the replacement shipped and one assuming it did not, then keep the branch the customer confirms. D) Resume yesterday's session unchanged, so the agent has the full conversation, including the earlier lookup_order results, before it reviews the photos.
Understand Foundations Mock Exam 1 · Q542 · the situation and each part of the question
The real situation behind this question
A Larkspur customer started a claim about a torn tent yesterday and promised to send photos. While they slept, the warehouse decided to ship a replacement anyway. Today the customer comes back with the photos. The application could reload yesterday's conversation, but that conversation still says the replacement is pending. If the agent trusts it, it may offer a second replacement or ask for a decision already made.
Read the question in parts
Part 1 · lookup_order now shows a new status
the system of record changed after the session ended, so earlier results no longer describe the order
Part 2 · whose history still holds the old lookup_order results
resuming would show the model outdated results that look just as authoritative as fresh ones
What you are being asked to decide
A customer comes back a day later, but the order changed overnight. Should the agent continue the old session or start a new one? Tests choosing a fresh session with a summary when saved tool results are stale.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Resume | reloading a saved Agent SDK session so the model sees the whole earlier conversation, including old tool results |
| Messages array | the conversation history sent with each request; on resume it would still contain yesterday's order status |
Study: Named sessions: resume, continue, fork or start fresh Checkpoint Messages array Agent SDK
Understand Foundations Mock Exam 1 · Q542's answer · full reasoning and worked examples
Claude synthesized · the point, straight
When saved tool results are stale on a key fact, resuming carries them forward as truth. Start a new session with a structured summary of what is still valid, and let the agent re-fetch current data.
Connect the design to the situation
Yesterday's history says 'replacement pending'; today the warehouse record says 'replacement shipped'.
Best answer: B. The prior tool results are stale on the fact that matters most, the order status. A new session with a short structured summary keeps what is still true (the claim, the customer, the request for photos) and makes the agent fetch current order data. Resuming unchanged puts outdated results back in front of the model, where it may act on them as current.
The decisive evidence in the stem
whose history still holds the old lookup_order results
The saved session contains tool output that no longer matches reality, which is the condition for starting fresh with a summary instead of resuming.
Official objective tested: Task 1.7 · Manage session state, resumption, and forking
What each choice would do here
A · Why this does not meet the full requirement
Resume yesterday's session and move to a model with a larger context window, so the old order data and today's photos both fit without summarizing.
Makes more room for stale data instead of replacing it.
Context size is not the problem. With more room, the stale order status is still in the history, and the model still has no signal that it is outdated. The decision still rests on old data.
B · Why this meets the requirement
Start a new session seeded with a structured summary of yesterday's claim, noting the order changed overnight, so the agent calls lookup_order again.
Keeps the valid facts and forces a fresh lookup of the changed ones.
The new session begins with a summary such as 'tent claim, customer verified, photos requested, order status changed overnight'. The agent calls lookup_order, sees the shipped replacement, and reviews the photos against the current situation.
C · Why this does not meet the full requirement
Fork yesterday's session into two branches, one assuming the replacement shipped and one assuming it did not, then keep the branch the customer confirms.
Explores hypotheses when one fresh tool call gives the real answer.
Branching doubles the work and keeps both branches built on yesterday's stale results. A single lookup_order call answers the question the branches are guessing about, so forking adds cost without adding truth.
D · Why this does not meet the full requirement
Resume yesterday's session unchanged, so the agent has the full conversation, including the earlier lookup_order results, before it reviews the photos.
Puts stale order data back in context as if it were current.
The agent sees yesterday's 'replacement pending' result as part of its history and may act on it, for example by offering another replacement. Nothing in the resumed history tells it the status changed.
Check your understanding · explain the design in your own words
A customer comes back a day later, but the order changed overnight. Should the agent continue the old session or start a new one?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Named sessions: resume, continue, fork or start fresh
Study: Named sessions: resume, continue, fork or start fresh Checkpoint Messages array Agent SDK
Return to Foundations Mock Exam 1 · Q542's situation and clause-by-clause explanation
Answer
**B.** The prior tool results are stale on the fact that matters most, the order status. A new session with a short structured summary keeps what is still true (the claim, the customer, the request for photos) and makes the agent fetch current order data. Resuming unchanged puts outdated results back in front of the model, where it may act on them as current.Q543. To reuse company tooling, the platform team connected Larkspur's agent to 19 MCP tools, including inventory forecasting, marketing coupons and supplier messaging. Since then, wrong-tool calls rose from 2% to 11%, mostly issue_coupon calls where process_refund was required. What should you do? (Select ONE.) A) Set tool_choice to "any" so the agent must always call one of the 19 tools, which stops conversational guesses about its next action. B) Keep all 19 tools, and add a numbered priority list to the system prompt that tells the agent which tools to try first for refund cases. C) Give the support agent only the tools its role needs, such as get_customer, lookup_order, process_refund and escalate_to_human, and no others. D) Move to a larger model with more reasoning capacity, since choosing correctly among 19 tools is a load the current model cannot carry.
Understand Foundations Mock Exam 1 · Q543 · the situation and each part of the question
The real situation behind this question
The platform team meant well: by connecting every company MCP tool, Larkspur's support agent could in theory do more. In practice it now chooses among forecasting, coupon, supplier and support tools for every message. Wrong-tool calls jumped fivefold, and the worst case is a customer who needed a refund and got a coupon instead. The support team needs reliable choices back.
Read the question in parts
Part 1 · connected Larkspur's agent to 19 MCP tools
the agent's menu now includes many tools outside its support role
Part 2 · mostly issue_coupon calls where process_refund was required
a tool from another role is being chosen for a core support action, which scoping prevents
What you are being asked to decide
The agent got 19 tools and now picks the wrong ones much more often. What do you change? Tests scoping each agent's tool set to its role to restore selection reliability.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Capability bloat | giving an agent many tools it does not need, which makes each tool choice harder and riskier |
| Least-privilege tooling | exposing only the tools a support agent must use for its job |
Study: Remove irrelevant tools or explain useful ones Least-privilege tooling Capability bloat tool_choice
Understand Foundations Mock Exam 1 · Q543's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Selection got worse when the tool count grew from a handful to 19. The fix is to give the support agent only the tools its role needs, not more instructions, forced tool calls or a bigger model.
Connect the design to the situation
issue_coupon is called where process_refund was the right tool.
Best answer: C. Misrouting rose when unrelated tools were added, so the tool set itself is the cause. Scoping the agent to the few tools its support role needs restores selection reliability and removes the risk of wrong actions such as coupons. A priority list in the prompt leaves all 19 options in front of the model and adds more instructions to weigh.
The decisive evidence in the stem
wrong-tool calls rose from 2% to 11%
The error rate jumped exactly when the tool count grew, which points to too many tools for the role rather than to weak descriptions or a weak model.
Official objective tested: Task 2.3 · Distribute tools appropriately across agents and configure tool choice
What each choice would do here
A · Why this does not meet the full requirement
Set tool_choice to "any" so the agent must always call one of the 19 tools, which stops conversational guesses about its next action.
Forces some tool call but does nothing to make it the right one.
"any" only guarantees that a tool is called. The agent still chooses among 19 tools, so issue_coupon remains a likely wrong pick, and it now cannot reply without calling some tool even when a plain answer fits.
B · Why this does not meet the full requirement
Keep all 19 tools, and add a numbered priority list to the system prompt that tells the agent which tools to try first for refund cases.
Leaves 19 choices in place and adds more instructions to weigh.
The model still sees 19 tools on every turn, and the priority list competes with the tool descriptions. Some refunds improve, but the coupon tool remains one choice away, and any new tool from the platform team repeats the problem.
C · Why this meets the requirement
Give the support agent only the tools its role needs, such as get_customer, lookup_order, process_refund and escalate_to_human, and no others.
Removes the irrelevant choices that caused the misrouting.
With five or so support tools, each choice is between clearly different options, and issue_coupon is simply not available. Wrong-tool calls fall back toward the earlier baseline, and coupon misuse becomes impossible.
D · Why this does not meet the full requirement
Move to a larger model with more reasoning capacity, since choosing correctly among 19 tools is a load the current model cannot carry.
Pays for a bigger model instead of removing the cause.
A larger model may choose slightly better, but it still sees forecasting and coupon tools it should never use. The cost rises on every request, and the design flaw, too many cross-role tools, stays.
Check your understanding · explain the design in your own words
The agent got 19 tools and now picks the wrong ones much more often. What do you change?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Remove irrelevant tools or explain useful ones
Study: Remove irrelevant tools or explain useful ones Least-privilege tooling Capability bloat tool_choice
Return to Foundations Mock Exam 1 · Q543's situation and clause-by-clause explanation
Answer
**C.** Misrouting rose when unrelated tools were added, so the tool set itself is the cause. Scoping the agent to the few tools its support role needs restores selection reliability and removes the risk of wrong actions such as coupons. A priority list in the prompt leaves all 19 options in front of the model and adds more instructions to weigh.Scenario 2 · Code Generation with Claude Code
Q544. Quarry's root CLAUDE.md now includes a 200-line release-notes procedure that engineers use about twice a month. Every session loads it, and engineers report Claude sometimes starts drafting release notes when they only asked for a commit message. Where should this procedure live? (Select ONE.) A) In a project skill at .claude/skills/release-notes/SKILL.md, committed to git, so it loads when the task calls for it and stays shared. B) In a .claude/rules/ file with a paths pattern matching CHANGELOG.md, so that the procedure loads only when someone opens or edits the changelog file. C) In the root CLAUDE.md still, but placed under a heading that tells Claude to use the procedure only when release notes are explicitly requested. D) In each engineer's ~/.claude/CLAUDE.md, so it no longer loads for the whole team and each person can keep whichever version of the procedure they prefer.
Understand Foundations Mock Exam 1 · Q544 · the situation and each part of the question
The real situation behind this question
Quarry's release process is careful: specific sections, ticket links, migration notes. Someone pasted the whole 200-line procedure into the root CLAUDE.md so Claude would know it. Now every session carries it, and it leaks: an engineer asks for a commit message and gets the start of formal release notes. The team still wants the procedure shared, but only when someone is actually writing release notes.
Read the question in parts
Part 1 · Every session loads it
the procedure sits in always-loaded instructions, which is the cause of the leakage
Part 2 · engineers use about twice a month
the procedure is occasional and task-triggered, which suits on-demand loading
What you are being asked to decide
A rarely used procedure sits in the always-loaded instructions and leaks into other tasks. Where should it go? Tests choosing a skill (on demand) over CLAUDE.md (always loaded) for a task-specific workflow.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Skill | a SKILL.md procedure Claude Code loads only when the user invokes it or the task matches its description |
| CLAUDE.md | instructions loaded into every session, best for standards that always apply |
Study: Skills vs slash commands vs subagents: the discriminator Skill CLAUDE.md Skills catalog
Understand Foundations Mock Exam 1 · Q544's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Always-loaded CLAUDE.md is for universal standards. An occasional, task-specific procedure belongs in a project skill that loads on demand and is shared through git.
Connect the design to the situation
Claude starts writing release notes when the engineer asked for a commit message.
Best answer: A. CLAUDE.md is for standards that apply to every session; a task-specific procedure used twice a month belongs in a skill that loads on demand. A path-scoped rule is tied to editing certain files, but writing release notes is triggered by a task, not by touching the changelog, so the procedure would load at the wrong times and be missing at the right ones.
The decisive evidence in the stem
engineers use about twice a month
An occasional, task-specific workflow should be loaded on demand rather than kept in the always-loaded instructions.
Official objective tested: Task 3.2 · Create and configure custom slash commands and skills
What each choice would do here
A · Why this meets the requirement
In a project skill at .claude/skills/release-notes/SKILL.md, committed to git, so it loads when the task calls for it and stays shared.
Loads the procedure only when needed and keeps it shared in git.
The skill's description says it drafts release notes. It loads when an engineer runs /release-notes or asks for release notes, and otherwise stays out of context. It is committed, so every engineer gets the same version.
B · Why this does not meet the full requirement
In a .claude/rules/ file with a paths pattern matching CHANGELOG.md, so that the procedure loads only when someone opens or edits the changelog file.
Ties a task workflow to editing a file, which is the wrong trigger.
The rule loads whenever Claude reads CHANGELOG.md, for example during an unrelated fix, and does not load when an engineer asks for release notes before the changelog is opened. The trigger does not match the task.
C · Why this does not meet the full requirement
In the root CLAUDE.md still, but placed under a heading that tells Claude to use the procedure only when release notes are explicitly requested.
Keeps 200 lines in every session and relies on a heading to contain them.
Every session still pays for 200 lines, and the heading is just more text the model may or may not weigh correctly. The leakage into commit messages can continue.
D · Why this does not meet the full requirement
In each engineer's ~/.claude/CLAUDE.md, so it no longer loads for the whole team and each person can keep whichever version of the procedure they prefer.
Removes the procedure from version control and from new teammates.
The procedure disappears from the repository. New engineers have none, versions drift between people, and the release process becomes inconsistent, which is the opposite of what a shared procedure is for.
Check your understanding · explain the design in your own words
A rarely used procedure sits in the always-loaded instructions and leaks into other tasks. Where should it go?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Skills vs slash commands vs subagents: the discriminator
Study: Skills vs slash commands vs subagents: the discriminator Skill CLAUDE.md Skills catalog
Return to Foundations Mock Exam 1 · Q544's situation and clause-by-clause explanation
Answer
**A.** CLAUDE.md is for standards that apply to every session; a task-specific procedure used twice a month belongs in a skill that loads on demand. A path-scoped rule is tied to editing certain files, but writing release notes is triggered by a task, not by touching the changelog, so the procedure would load at the wrong times and be missing at the right ones.Q545. An engineer who has never built a cache asks Claude Code to add one in front of Quarry's slow route-pricing service. The engineer is unsure what should happen when carrier rates change, how stale a price may be, or what to do when the cache store is down. What is the best way to start? (Select ONE.) A) Use plan mode only to list the files that call the pricing service, then let Claude add the cache directly in each of those files in one pass. B) Ask Claude to implement a standard read-through cache immediately, then review the resulting diff to see which invalidation choices it made on its own. C) Write a CLAUDE.md rule that every cache must use a 60-second expiry, so Claude applies a safe default to the pricing cache without further discussion. D) Ask Claude to interview the engineer first about invalidation triggers, staleness limits and failure modes, then implement the design they agree on.
Understand Foundations Mock Exam 1 · Q545 · the situation and each part of the question
The real situation behind this question
Quarry's route-pricing service is slow, and a cache would help. The engineer assigned to it has never built one. They know prices change when carriers update rates, but not how fast the cache must react, how old a price may be, or what customers should see if the cache store fails. A cache that serves wrong prices could cost the company money on every quote.
Read the question in parts
Part 1 · has never built a cache
the domain is unfamiliar, so important considerations may be missing from the request
Part 2 · what to do when the cache store is down
failure behavior is an open design decision that must be settled before implementation
What you are being asked to decide
The engineer does not yet know the right questions about caching. How should the work with Claude begin? Tests the interview pattern for surfacing design considerations before implementation.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Interview pattern | asking Claude to question you about requirements before it writes any code |
| Invalidation | deciding when cached prices must be discarded, for example when carrier rates change |
Study: Iterative refinement: getting Claude from close to right Requirement gathering Caching strategy Claude Code
Understand Foundations Mock Exam 1 · Q545's answer · full reasoning and worked examples
Claude synthesized · the point, straight
When the domain is unfamiliar and key decisions are open, have Claude interview you first. The questions surface invalidation and failure modes before code exists, so the implementation follows real requirements.
Connect the design to the situation
A pricing cache with open questions about invalidation, staleness and outages.
Best answer: D. In an unfamiliar domain, the interview pattern has Claude surface the questions the engineer did not know to ask, such as invalidation triggers and fallback behavior, before code exists. Implementing first and reviewing the diff leaves those decisions to defaults the engineer is not equipped to judge.
The decisive evidence in the stem
The engineer is unsure what should happen when carrier rates change
Key design decisions are open and the engineer lacks domain experience, which is exactly when Claude should ask questions before building.
Official objective tested: Task 3.5 · Apply iterative refinement techniques for progressive improvement
What each choice would do here
A · Why this does not meet the full requirement
Use plan mode only to list the files that call the pricing service, then let Claude add the cache directly in each of those files in one pass.
Finds call sites but skips the design questions.
Knowing the call sites is useful, but adding the cache in each file without settling invalidation and failure modes repeats the open decisions in many places. It also spreads cache logic instead of centralizing it.
B · Why this does not meet the full requirement
Ask Claude to implement a standard read-through cache immediately, then review the resulting diff to see which invalidation choices it made on its own.
Lets defaults make decisions the engineer cannot yet judge.
Claude chooses an expiry, an invalidation approach and a fallback by convention. The engineer reviews a diff without knowing which choices matter for pricing, so stale-price bugs may pass review.
C · Why this does not meet the full requirement
Write a CLAUDE.md rule that every cache must use a 60-second expiry, so Claude applies a safe default to the pricing cache without further discussion.
Imposes one number without knowing the pricing needs.
A 60-second expiry may be far too long when rates change, or wastefully short otherwise. It also applies to every cache in the repo, and it says nothing about the outage behavior the engineer is unsure about.
D · Why this meets the requirement
Ask Claude to interview the engineer first about invalidation triggers, staleness limits and failure modes, then implement the design they agree on.
Surfaces the hidden decisions before any code exists.
Claude asks: how quickly must a rate change appear, are some carriers more volatile, should quotes fail or fall back to the live service when the cache is down? The engineer answers, and Claude implements a design built on those answers.
Check your understanding · explain the design in your own words
The engineer does not yet know the right questions about caching. How should the work with Claude begin?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Iterative refinement: getting Claude from close to right
Study: Iterative refinement: getting Claude from close to right Requirement gathering Caching strategy Claude Code
Return to Foundations Mock Exam 1 · Q545's situation and clause-by-clause explanation
Answer
**D.** In an unfamiliar domain, the interview pattern has Claude surface the questions the engineer did not know to ask, such as invalidation triggers and fallback behavior, before code exists. Implementing first and reviewing the diff leaves those decisions to defaults the engineer is not equipped to judge.Q546. An engineer new to Quarry asks Claude Code how a shipment-delay alert reaches the mobile app. Claude's first plan is to Read all 1,900 files in the monorepo before answering, which would take a long time and fill the context. Which exploration approach should Claude use instead? (Select ONE.) A) Use Bash to concatenate all source files into one large file, then Read that single file so the whole codebase is loaded at once. B) Use Glob with the pattern **/*.ts to list every TypeScript file, then Read them in alphabetical order until the alert path becomes clear. C) Use Glob to find files whose names contain 'alert', and answer from those files alone without following any imports to other modules. D) Use Grep to find where the delay-alert event name or message appears, then Read those entry files and follow their imports step by step.
Understand Foundations Mock Exam 1 · Q546 · the situation and each part of the question
The real situation behind this question
A new Quarry engineer wants to understand one flow: when a shipment is late, how does the warning end up on a driver's phone? Claude proposes reading the entire monorepo first. That would take a long time, fill the context with unrelated code, and still leave Claude to find the path inside all that text. The engineer needs a faster, more focused way to trace the flow.
Read the question in parts
Part 1 · how a shipment-delay alert reaches the mobile app
the question is a flow trace, which starts at a specific event or message and follows calls
Part 2 · Read all 1,900 files in the monorepo before answering
upfront exhaustive reading wastes time and context compared with a targeted search
What you are being asked to decide
Claude wants to read the whole codebase to answer one question. How should it explore instead? Tests building codebase understanding incrementally with Grep for entry points and Read to trace imports.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Grep | the Claude Code tool that searches file contents for a pattern, such as an event name |
| Glob | the Claude Code tool that finds files by name or path pattern, not by content |
Study: Built-in tools: the selection criteria Grep tool Glob tool Read tool
Understand Foundations Mock Exam 1 · Q546's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Explore by tracing, not by reading everything: Grep locates the entry points by content, and Read follows the imports from there. Glob matches paths, which is useful for finding files by name but not for tracing a flow.
Connect the design to the situation
Tracing a 'SHIPMENT_DELAYED' event from the API to the mobile push code.
Best answer: D. Grep finds entry points by content, such as the event name, and Read then follows imports to trace the flow, building understanding incrementally. Matching file names with Glob finds only files named 'alert' and misses the services and handlers the flow passes through, so the trace stops at the first module.
The decisive evidence in the stem
Read all 1,900 files in the monorepo before answering
Reading everything upfront is the anti-pattern; the task needs targeted search for entry points and then tracing the flow.
Official objective tested: Task 2.5 · Select and apply built-in tools (Read, Write, Edit, Bash, Grep, Glob) effectively
What each choice would do here
A · Why this does not meet the full requirement
Use Bash to concatenate all source files into one large file, then Read that single file so the whole codebase is loaded at once.
Loads the entire codebase at once, the opposite of targeted exploration.
The single file contains the whole monorepo, far too large to use well. It recreates the 'read everything' plan in one step and leaves the flow buried in unrelated code.
B · Why this does not meet the full requirement
Use Glob with the pattern **/*.ts to list every TypeScript file, then Read them in alphabetical order until the alert path becomes clear.
Lists every file and reads them in a meaningless order.
Glob returns hundreds of TypeScript paths, and reading them alphabetically has no relation to the flow. Claude reads mostly irrelevant code and still fills the context before reaching the alert path.
C · Why this does not meet the full requirement
Use Glob to find files whose names contain 'alert', and answer from those files alone without following any imports to other modules.
Matches names only and stops before the flow is traced.
A file named alert might hold part of the path, but the event usually passes through queues, services and push handlers with other names. Without following imports, Claude answers with a fragment.
D · Why this meets the requirement
Use Grep to find where the delay-alert event name or message appears, then Read those entry files and follow their imports step by step.
Finds entry points by content, then traces the real flow.
Grep for 'SHIPMENT_DELAYED' finds where the event is raised and consumed. Claude Reads those files, follows their imports to the notification service and the push sender, and explains the path after reading perhaps a dozen files.
Check your understanding · explain the design in your own words
Claude wants to read the whole codebase to answer one question. How should it explore instead?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Built-in tools: the selection criteria
Study: Built-in tools: the selection criteria Grep tool Glob tool Read tool
Return to Foundations Mock Exam 1 · Q546's situation and clause-by-clause explanation
Answer
**D.** Grep finds entry points by content, such as the event name, and Read then follows imports to trace the flow, building understanding incrementally. Matching file names with Glob finds only files named 'alert' and misses the services and handlers the flow passes through, so the trace stops at the first module.Q547. Quarry's root CLAUDE.md has grown to 1,100 lines covering React, API, Terraform and data-pipeline standards. Engineers in the infra package say sessions often apply React advice to Terraform work. The maintainers of each package know which standards apply to their area. How should you restructure the instructions? (Select ONE.) A) Split the standards into separate files, and give each package a CLAUDE.md that uses @import to include only the files its maintainers choose. B) Convert every standard into a skill that engineers invoke by hand, so that no conventions load until someone decides they are needed. C) Move the whole file into each engineer's ~/.claude/CLAUDE.md, so everyone can delete the sections that do not concern the package they work on. D) Keep one root file but reorder it so the most frequently used standards appear first, where Claude pays the most attention during a long session.
Understand Foundations Mock Exam 1 · Q547 · the situation and each part of the question
The real situation behind this question
Quarry's CLAUDE.md started small and grew with every incident. Now it holds rules for four very different kinds of code. An infra engineer editing Terraform gets a session that also carries React hook rules and data-pipeline naming, and sometimes Claude mixes them. Each package has maintainers who know exactly which standards matter there. The team wants instructions that stay shared but fit each package.
Read the question in parts
Part 1 · has grown to 1,100 lines covering React, API, Terraform and data-pipeline standards
one monolithic file loads every package's standards into every single session
Part 2 · The maintainers of each package know which standards apply to their area
selection per package is possible and should be made by those maintainers
What you are being asked to decide
One huge instruction file mixes rules for every package. How do you give each package only its own rules? Tests modularizing CLAUDE.md with per-package files and @import.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| @import | the CLAUDE.md syntax (an @path line) that pulls another file's content into the instructions |
| Modular prompt | instructions built from small focused files instead of one large block |
Study: CLAUDE.md: the memory hierarchy CLAUDE.md Modular prompt Skill
Understand Foundations Mock Exam 1 · Q547's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A monolithic CLAUDE.md loads every rule everywhere. Split standards into focused files and let each package's CLAUDE.md @import the ones its maintainers select, so the right conventions load automatically.
Connect the design to the situation
React guidance appearing in a Terraform session because both live in one 1,100-line file.
Best answer: A. Modular standards files plus per-package CLAUDE.md files with @import let each package load exactly the standards its maintainers select, using their domain knowledge. Turning every standard into a manually invoked skill removes always-on conventions that should apply automatically whenever someone works in that package.
The decisive evidence in the stem
The maintainers of each package know which standards apply to their area
The people with the domain knowledge can choose per package, which is what selective @import in a package CLAUDE.md supports.
Official objective tested: Task 3.1 · Configure CLAUDE.md files with appropriate hierarchy, scoping, and modular organization
What each choice would do here
A · Why this meets the requirement
Split the standards into separate files, and give each package a CLAUDE.md that uses @import to include only the files its maintainers choose.
Loads the right standards per package, chosen by its maintainers.
infra/CLAUDE.md contains lines such as @docs/standards/terraform.md and @docs/standards/security.md. Sessions in infra load those standards, while the React package imports its own set. The files stay in git and shared.
B · Why this does not meet the full requirement
Convert every standard into a skill that engineers invoke by hand, so that no conventions load until someone decides they are needed.
Makes always-needed conventions optional and easy to forget.
Engineers must remember to invoke the right skill before every change. When they forget, Claude works without any conventions, so the mixing problem becomes a missing-standards problem.
C · Why this does not meet the full requirement
Move the whole file into each engineer's ~/.claude/CLAUDE.md, so everyone can delete the sections that do not concern the package they work on.
Moves team standards out of version control into personal files.
Standards leave version control and drift apart across 14 copies. New engineers receive nothing, and changes must be repeated by hand in every personal file, which is the opposite of shared conventions.
D · Why this does not meet the full requirement
Keep one root file but reorder it so the most frequently used standards appear first, where Claude pays the most attention during a long session.
Keeps every package's rules loaded for everyone.
Every session still loads all 1,100 lines, and Terraform work still sees React rules near the top. Ordering may change which rules get noticed but does not separate unrelated standards.
Check your understanding · explain the design in your own words
One huge instruction file mixes rules for every package. How do you give each package only its own rules?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: CLAUDE.md: the memory hierarchy
Study: CLAUDE.md: the memory hierarchy CLAUDE.md Modular prompt Skill
Return to Foundations Mock Exam 1 · Q547's situation and clause-by-clause explanation
Answer
**A.** Modular standards files plus per-package CLAUDE.md files with @import let each package load exactly the standards its maintainers select, using their domain knowledge. Turning every standard into a manually invoked skill removes always-on conventions that should apply automatically whenever someone works in that package.Q548. An engineer asks Claude Code to write a function that turns carrier route codes into display labels. After three prose explanations, the results still vary: sometimes 'NYC-BOS-EXP' becomes 'NYC to BOS (Express)', other times 'Express: NYC–BOS'. What is the most effective next step? (Select ONE.) A) Rewrite the prose description a fourth time with more precise wording, and ask Claude to restate the rules before writing the function. B) Give two or three concrete input and expected output pairs, including an edge case such as a code without a service suffix, and ask Claude to match them. C) Ask Claude to generate several alternative implementations, then pick the one whose output style the team likes best for the display. D) Switch to plan mode so Claude can explore the codebase for existing label formats before it writes a new version of the function.
Understand Foundations Mock Exam 1 · Q548 · the situation and each part of the question
The real situation behind this question
Quarry's dispatch screen shows route labels, and the product team wants one exact format. The engineer has described it three times in words: origin, destination, then service type in brackets. Claude still produces different formats on different runs. Words like 'service type in brackets' leave room for interpretation. The engineer needs a way to state the format that cannot be read two ways.
Read the question in parts
Part 1 · After three prose explanations, the results still vary
more prose is unlikely to work; a different kind of specification is needed
Part 2 · 'NYC-BOS-EXP' becomes 'NYC to BOS (Express)'
the target is a precise transformation that examples can show directly
What you are being asked to decide
Explanations in words keep producing different label formats. How do you show Claude exactly what you want? Tests using concrete input/output examples when prose descriptions are interpreted inconsistently.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Input/output examples | pairs such as 'NYC-BOS-EXP' paired with its exact expected label, showing the transformation directly |
| Edge case | an unusual input, such as a code with no service suffix, whose correct output must be shown too |
Study: Iterative refinement: getting Claude from close to right Few-shot Golden set Claude Code
Understand Foundations Mock Exam 1 · Q548's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Three prose attempts failed, so change the form of the specification: two or three concrete input and output pairs, with an edge case, define the transformation better than any wording.
Connect the design to the situation
'NYC-BOS-EXP' must always become one exact label format.
Best answer: B. When prose is interpreted inconsistently, concrete input and output examples are the clearest way to define a transformation, and an edge case pins down the unusual inputs. A fourth prose rewrite repeats the approach that has already failed three times.
The decisive evidence in the stem
After three prose explanations, the results still vary
Repeated prose has not fixed the ambiguity, which is the signal to switch to concrete examples of the transformation.
Official objective tested: Task 3.5 · Apply iterative refinement techniques for progressive improvement
What each choice would do here
A · Why this does not meet the full requirement
Rewrite the prose description a fourth time with more precise wording, and ask Claude to restate the rules before writing the function.
Repeats the approach that has already failed three times.
A fourth description may be clearer, but it is still words that can be read two ways. Asking Claude to restate the rules checks its understanding of the prose, not the exact output format.
B · Why this meets the requirement
Give two or three concrete input and expected output pairs, including an edge case such as a code without a service suffix, and ask Claude to match them.
Defines the transformation exactly, including an edge case.
The engineer gives 'NYC-BOS-EXP' with its exact expected label, 'LAX-SFO-STD' with its label, and 'DEN-ORD' with the label for a code with no service type. Claude can match the examples exactly and the edge case is no longer guessed.
C · Why this does not meet the full requirement
Ask Claude to generate several alternative implementations, then pick the one whose output style the team likes best for the display.
Picks a style but does not make future output consistent.
The team picks one implementation today, but nothing defines the format for the next change or the next engineer. Different labels can return the next time someone asks Claude to modify the function.
D · Why this does not meet the full requirement
Switch to plan mode so Claude can explore the codebase for existing label formats before it writes a new version of the function.
Explores the codebase when the problem is the specification.
Exploring might find older label code, but the problem is that the engineer's specification is ambiguous. Plan mode does not supply the exact expected outputs the function must produce.
Check your understanding · explain the design in your own words
Explanations in words keep producing different label formats. How do you show Claude exactly what you want?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Iterative refinement: getting Claude from close to right
Study: Iterative refinement: getting Claude from close to right Few-shot Golden set Claude Code
Return to Foundations Mock Exam 1 · Q548's situation and clause-by-clause explanation
Answer
**B.** When prose is interpreted inconsistently, concrete input and output examples are the clearest way to define a transformation, and an edge case pins down the unusual inputs. A fourth prose rewrite repeats the approach that has already failed three times.Q549. Yesterday an engineer ran a named Claude Code session, billing-refactor, that analyzed Quarry's twelve-file invoicing module. Overnight a teammate merged changes to two of those files, invoice_tax.ts and rounding.ts. Most of yesterday's analysis is still valid. How should the engineer continue? (Select ONE.) A) Resume with claude --resume billing-refactor and keep working from yesterday's tool results for all twelve files, since most analysis is still valid. B) Start a brand-new session and ask Claude to analyze all twelve files from scratch, since any merged change makes the earlier session unreliable. C) Resume with claude --resume billing-refactor and tell Claude that invoice_tax.ts and rounding.ts changed, so it re-reads and re-analyzes those two. D) Fork yesterday's session with --fork-session, so the original analysis stays safe while the new branch continues without mentioning the changes.
Understand Foundations Mock Exam 1 · Q549 · the situation and each part of the question
The real situation behind this question
Quarry's engineer spent most of yesterday with Claude Code analyzing the invoicing module for a refactor. They named the session so they could return to it. This morning they see that a teammate merged changes to two of the twelve files. Most of the analysis still holds, but the tax and rounding logic Claude studied is now different. The engineer wants to continue without losing a day's work.
Read the question in parts
Part 1 · Overnight a teammate merged changes to two of those files
a known, small set of files is stale, so re-analysis can be targeted
Part 2 · Most of yesterday's analysis is still valid
the prior context has high value, which favors resuming over starting fresh
What you are being asked to decide
Two of twelve analyzed files changed overnight. Resume, restart or fork? Tests resuming a named session and pointing it at specific changed files for targeted re-analysis.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| --resume | the Claude Code flag that reopens a named earlier session with its history |
| Stale tool results | file contents Claude read yesterday that no longer match the files on disk |
Study: Named sessions: resume, continue, fork or start fresh Checkpoint Claude Code Messages array
Understand Foundations Mock Exam 1 · Q549's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Resume when prior context is mostly valid, and tell the session exactly which files changed so it re-analyzes only those. Start fresh with a summary only when most earlier results are stale.
Connect the design to the situation
invoice_tax.ts and rounding.ts changed; the other ten files did not.
Best answer: C. When most prior context is valid, resuming the named session keeps that work, and naming the two changed files lets Claude re-read only what is stale. Starting from scratch throws away ten files of still-valid analysis, which is the right call only when most prior results are stale.
The decisive evidence in the stem
Most of yesterday's analysis is still valid
Prior context is mostly correct, which favors resumption, while the two named changes call for targeted re-analysis.
Official objective tested: Task 1.7 · Manage session state, resumption, and forking
What each choice would do here
A · Why this does not meet the full requirement
Resume with claude --resume billing-refactor and keep working from yesterday's tool results for all twelve files, since most analysis is still valid.
Keeps stale results for the two changed files.
Claude's history still contains yesterday's contents of invoice_tax.ts and rounding.ts. Unless told, it may reason from the old tax logic and propose a refactor that conflicts with the merged changes.
B · Why this does not meet the full requirement
Start a brand-new session and ask Claude to analyze all twelve files from scratch, since any merged change makes the earlier session unreliable.
Throws away valid analysis to fix two stale files.
Claude repeats a full day of analysis on ten unchanged files. The result is correct but wasteful, and the engineer loses time that a targeted re-read would have saved.
C · Why this meets the requirement
Resume with claude --resume billing-refactor and tell Claude that invoice_tax.ts and rounding.ts changed, so it re-reads and re-analyzes those two.
Keeps valid work and re-analyzes only what changed.
The resumed session keeps the analysis of ten unchanged files. Claude re-reads the two changed files, updates its understanding of the tax and rounding logic, and the refactor continues on current code.
D · Why this does not meet the full requirement
Fork yesterday's session with --fork-session, so the original analysis stays safe while the new branch continues without mentioning the changes.
Branches the session but still carries the stale results.
Forking keeps a copy of the old session, but the new branch inherits the same stale view of the two files. Without being told what changed, it reasons from outdated contents just as plain resumption would.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Resume and point at the changed files (illustrative)
claude --resume billing-refactor
> Since yesterday, invoice_tax.ts and rounding.ts were changed by a merged PR.
> Re-read those two files, update your analysis of tax and rounding, then continue the refactor plan.The session name is illustrative. The message names the changed files so the re-analysis is targeted.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Two of twelve analyzed files changed overnight. Resume, restart or fork?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Named sessions: resume, continue, fork or start fresh
Study: Named sessions: resume, continue, fork or start fresh Checkpoint Claude Code Messages array
Return to Foundations Mock Exam 1 · Q549's situation and clause-by-clause explanation
Answer
**C.** When most prior context is valid, resuming the named session keeps that work, and naming the two changed files lets Claude re-read only what is stale. Starting from scratch throws away ten files of still-valid analysis, which is the right call only when most prior results are stale.Q550. Quarry's pull-request review job already runs Claude Code with -p. Two complaints remain: each new commit reposts findings raised on earlier commits, and the comment-posting script fails on about 5% of runs because findings arrive as loosely formatted text. Which two changes address these problems? (Select TWO.) A) Run with --output-format json and --json-schema describing file, line, severity and message, so the script reads validated structured findings. B) Resume the previous commit's review session with --resume, so Claude remembers its earlier findings and naturally avoids repeating them. C) Add a CLAUDE.md rule asking Claude to format every finding as a JSON object, so the posting script receives parseable output on each run. D) Pass the findings already posted on the pull request into the review prompt, and tell Claude to report only issues that are new or still unaddressed.
Understand Foundations Mock Exam 1 · Q550 · the situation and each part of the question
The real situation behind this question
Quarry's pull requests get automatic review comments from Claude Code in GitHub Actions. Engineers like the reviews but not two side effects. Every push reposts the same findings, so a busy PR shows each issue three or four times. And now and then the posting script crashes because the findings came back as loose text instead of something it can parse. The team wants both fixed.
Read the question in parts
Part 1 · each new commit reposts findings raised on earlier commits
each run lacks knowledge of prior findings, which must be supplied as input
Part 2 · because findings arrive as loosely formatted text
the output format is not enforced, which a schema-validated JSON output fixes
What you are being asked to decide
The CI review repeats old comments and sometimes returns unparseable text. Which two fixes solve these? Tests the two CI integration skills: prior findings in context, and schema-validated JSON output.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| -p | print mode: Claude Code runs the prompt non-interactively and exits, as CI requires |
| --json-schema | a CLI flag that makes Claude Code return output validated against your schema |
Study: Claude Code in CI/CD (scenario 5 territory) Headless Structured outputs JSON Schema
Understand Foundations Mock Exam 1 · Q550's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Two separate problems need two separate fixes: supply prior findings and request only new or unaddressed issues, and enforce the output shape with --output-format json plus --json-schema.
Connect the design to the situation
A third commit on a PR reposts the same six findings, and one run's output breaks the comment script.
Best answer: AD. Duplicate comments are fixed by giving the review the prior findings and asking only for new or unaddressed issues; parse failures are fixed by --output-format json with --json-schema, which returns validated structured output. A CLAUDE.md formatting rule is guidance the model reads, not enforcement, so a small share of malformed output remains.
The decisive evidence in the stem
each new commit reposts findings raised on earlier commits
The review run does not know what was already reported, so the prior findings must be supplied as input with an instruction to report only new or open issues.
Official objective tested: Task 3.6 · Integrate Claude Code into CI/CD pipelines
What each choice would do here
A · Why this does not meet the full requirement
Run with --output-format json and --json-schema describing file, line, severity and message, so the script reads validated structured findings.
Returns validated structured findings the script can parse.
The job runs claude -p --output-format json --json-schema with a findings schema. The result carries a validated structured_output object, and the script posts comments from its fields without guessing at text.
B · Why this does not meet the full requirement
Resume the previous commit's review session with --resume, so Claude remembers its earlier findings and naturally avoids repeating them.
Reuses session state in CI instead of passing the prior findings explicitly.
CI runners are usually fresh machines, so the previous session may not even exist there. Even when it does, the resumed session reviewed older code, and nothing tells it to report only new or unaddressed issues.
C · Why this does not meet the full requirement
Add a CLAUDE.md rule asking Claude to format every finding as a JSON object, so the posting script receives parseable output on each run.
Asks for JSON in guidance, which does not guarantee it.
Claude usually follows the rule, but CLAUDE.md is text the model reads, not a format check. Some runs will still return extra prose or invalid JSON, so the script keeps failing occasionally.
D · Why this does not meet the full requirement
Pass the findings already posted on the pull request into the review prompt, and tell Claude to report only issues that are new or still unaddressed.
Gives the review what was already reported and asks only for new issues.
The job reads the bot's existing PR comments and includes them in the prompt with 'report only new issues or ones still unaddressed in this diff'. Fixed issues are not reposted, and open ones are not duplicated.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Review step with prior findings and schema output (illustrative)
gh pr view "$PR" --comments --json comments > prior.json
gh pr diff "$PR" | claude -p \
--output-format json \
--json-schema "$(cat .github/review-schema.json)" \
"Review this diff. Prior findings are in prior.json. Report only issues that are new or still unaddressed."Commands and file names are illustrative; the posting script reads structured_output from the JSON result.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The CI review repeats old comments and sometimes returns unparseable text. Which two fixes solve these?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Claude Code in CI/CD (scenario 5 territory)
Study: Claude Code in CI/CD (scenario 5 territory) Headless Structured outputs JSON Schema
Return to Foundations Mock Exam 1 · Q550's situation and clause-by-clause explanation
Answer
**AD.** Duplicate comments are fixed by giving the review the prior findings and asking only for new or unaddressed issues; parse failures are fixed by --output-format json with --json-schema, which returns validated structured output. A CLAUDE.md formatting rule is guidance the model reads, not enforcement, so a small share of malformed output remains.Q551. Before a refactor, an engineer asks Claude Code to find every place the API reads feature flags. Discovery reads over 100 files, and the main session's context fills with search output; by the implementation phase Claude has lost the constraints agreed at the start. Which approach best protects the main session during discovery? (Select ONE.) A) Run discovery in direct execution but ask Claude to print only file names, then reread every file in full during the implementation phase. B) Raise the session's maximum output tokens, so Claude can write longer answers that keep both the search output and the agreed constraints. C) Restart the session after discovery and paste the whole search output into the first message, so the new context begins complete. D) Delegate discovery to the Explore subagent, which reads files in its own context and returns a concise summary of where flags are read.
Understand Foundations Mock Exam 1 · Q551 · the situation and each part of the question
The real situation behind this question
Quarry's engineer agreed on clear constraints with Claude: keep flag names, do not change defaults, touch only the API. Then Claude searched more than a hundred files for flag reads, and the session filled with file contents and search hits. When implementation began, Claude no longer followed the constraints. The engineer wants the search done without crowding out the earlier agreement.
Read the question in parts
Part 1 · Discovery reads over 100 files
the discovery phase is verbose by nature, so its output should not land in the main context
Part 2 · Claude has lost the constraints agreed at the start
important early context is being displaced, which isolating discovery in a subagent protects
What you are being asked to decide
Searching 100 files filled the session and pushed out earlier agreements. How do you search without that cost? Tests using the Explore subagent to isolate verbose discovery from the main session.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Explore subagent | a built-in Claude Code subagent that searches and reads in its own context and returns a summary |
| Context isolation | keeping the discovery output out of the engineer's main conversation |
Study: Plan mode vs direct execution, and the Explore subagent Subagent Context isolation Context window
Understand Foundations Mock Exam 1 · Q551's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Verbose discovery displaced key context. Delegating discovery to the Explore subagent keeps the reading in a separate context and returns only a summary to the main session.
Connect the design to the situation
Search output for feature-flag reads across more than 100 files.
Best answer: D. The Explore subagent does the verbose reading in its own context and hands back a summary, so the main session keeps its constraints and has room for implementation. Restarting and pasting the full search output reproduces the same overload in a fresh session.
The decisive evidence in the stem
the main session's context fills with search output
The problem is verbose discovery output living in the main context, which delegation to an isolated subagent avoids.
Official objective tested: Task 3.4 · Determine when to use plan mode vs direct execution
What each choice would do here
A · Why this does not meet the full requirement
Run discovery in direct execution but ask Claude to print only file names, then reread every file in full during the implementation phase.
Pushes the same reading cost into the implementation phase.
File names are short, but rereading every file during implementation brings the same volume of content back into the main session, just later, when the constraints matter most.
B · Why this does not meet the full requirement
Raise the session's maximum output tokens, so Claude can write longer answers that keep both the search output and the agreed constraints.
Output length is not the limit that was hit.
Maximum output tokens limit how long each reply can be, not how much the context can hold. The search output still fills the window, and the agreed constraints still get displaced.
C · Why this does not meet the full requirement
Restart the session after discovery and paste the whole search output into the first message, so the new context begins complete.
Recreates the overload in a new session.
The fresh session immediately fills with the pasted search output, and the constraints from the old session are gone unless someone re-enters them. The overload simply moves.
D · Why this meets the requirement
Delegate discovery to the Explore subagent, which reads files in its own context and returns a concise summary of where flags are read.
Keeps verbose discovery out of the main context.
The Explore subagent searches and reads the files in its own context, then returns a short list of flag-read locations. The main session keeps the constraints plus the summary, ready for implementation.
Check your understanding · explain the design in your own words
Searching 100 files filled the session and pushed out earlier agreements. How do you search without that cost?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Plan mode vs direct execution, and the Explore subagent
Study: Plan mode vs direct execution, and the Explore subagent Subagent Context isolation Context window
Return to Foundations Mock Exam 1 · Q551's situation and clause-by-clause explanation
Answer
**D.** The Explore subagent does the verbose reading in its own context and hands back a summary, so the main session keeps its constraints and has room for implementation. Restarting and pasting the full search output reproduces the same overload in a fresh session.Q552. Quarry created .claude/rules/api-handlers.md with paths: ["services/api/.ts"]. Engineers say the error-handling conventions apply when they edit services/api/index.ts but not when they edit services/api/orders/create.ts, and /memory during that second edit does not list the rule. What is the most likely fix? (Select ONE.) A) Rename the file to api-handlers.yaml, because rule files with paths frontmatter must use a YAML file extension to be parsed. B) Copy the rule's content into the root CLAUDE.md, because path-scoped rules are loaded only once at session start and never during later edits. C) Change the pattern to "services/api/**/.ts", because a single asterisk matches files in that one folder and not files in nested subfolders. D) Move the rule into services/api/orders/CLAUDE.md, because path rules only take effect in the folder that directly contains the rules file itself.
Understand Foundations Mock Exam 1 · Q552 · the situation and each part of the question
The real situation behind this question
Quarry's API team was pleased with their new path-scoped rule until reports came in that it works only sometimes. Editing the API's index file brings in the conventions; editing a handler in the orders subfolder does not. /memory confirms the rule never loads for the nested file. The mechanism clearly works, since it loads for one file, so the question is why it does not match the other.
Read the question in parts
Part 1 · paths: ["services/api/*.ts"]
the pattern uses a single asterisk, which limits matches to one directory level
Part 2 · apply when they edit services/api/index.ts
the rules mechanism itself works, so the fault is in what the pattern matches
What you are being asked to decide
A path rule works for one file but not for a file in a subfolder. What is wrong? Tests reading glob patterns in path-scoped rules.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Glob depth | * matches names inside one folder; ** also crosses into nested folders |
| paths frontmatter | the list of patterns that decides when this rules file loads |
Study: .claude/rules/: path-scoped conventions with glob frontmatter Frontmatter YAML Claude config files
Understand Foundations Mock Exam 1 · Q552's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The rule loads for a top-level file but not a nested one, which is a glob-depth problem. Use ** to match files in subfolders; the rules mechanism itself is working.
Connect the design to the situation
services/api/*.ts matches index.ts but not orders/create.ts.
Best answer: C. The rule works for a file directly in services/api/ and fails for one a level deeper, which is exactly the difference between * and ** in a glob. Rewriting the pattern with ** fixes the match. Moving the rule into a subfolder CLAUDE.md would cover only that one folder and rests on a wrong belief about where rules files must live.
The decisive evidence in the stem
not when they edit services/api/orders/create.ts
The failing file is in a nested folder, which points to the glob pattern's depth rather than to the rules mechanism itself.
Official objective tested: Task 3.3 · Apply path-specific rules for conditional convention loading
What each choice would do here
A · Why this does not meet the full requirement
Rename the file to api-handlers.yaml, because rule files with paths frontmatter must use a YAML file extension to be parsed.
Rules files are Markdown; the extension is not the issue.
Rules files in .claude/rules/ are Markdown files with YAML frontmatter, so the .md extension is correct. Renaming may stop the rule from loading at all, while the pattern still misses nested files.
B · Why this does not meet the full requirement
Copy the rule's content into the root CLAUDE.md, because path-scoped rules are loaded only once at session start and never during later edits.
Gives up path scoping because of a wrong belief about load timing.
Path-scoped rules load when Claude reads a matching file, so load timing is not the problem. Copying into the root file loads the API conventions into every React and Terraform session, which is what path scoping was meant to avoid.
C · Why this meets the requirement
Change the pattern to "services/api/**/*.ts", because a single asterisk matches files in that one folder and not files in nested subfolders.
Fixes the pattern so nested files match too.
With services/api/**/*.ts, the pattern matches index.ts and every handler in nested folders such as orders/ and returns/. /memory now lists the rule when Claude reads create.ts, and the conventions apply consistently.
D · Why this does not meet the full requirement
Move the rule into services/api/orders/CLAUDE.md, because path rules only take effect in the folder that directly contains the rules file itself.
Rests on a wrong belief about where rules files must live.
Rules files belong in .claude/rules/, and their paths patterns can point anywhere in the repo. Moving the content into a subfolder CLAUDE.md covers orders/ only, and other nested folders such as returns/ would still miss the conventions.
Check your understanding · explain the design in your own words
A path rule works for one file but not for a file in a subfolder. What is wrong?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: .claude/rules/: path-scoped conventions with glob frontmatter
Study: .claude/rules/: path-scoped conventions with glob frontmatter Frontmatter YAML Claude config files
Return to Foundations Mock Exam 1 · Q552's situation and clause-by-clause explanation
Answer
**C.** The rule works for a file directly in services/api/ and fails for one a level deeper, which is exactly the difference between * and ** in a glob. Rewriting the pattern with ** fixes the match. Moving the rule into a subfolder CLAUDE.md would cover only that one folder and rests on a wrong belief about where rules files must live.Q553. Quarry's Terraform conventions (module naming, required tags, no inline policies) sit in the root CLAUDE.md, so every React and API session loads them too. Terraform files live under infra/, but also in services//deploy/ folders owned by each service team. How should you load these conventions only when they matter? (Select ONE.) A) Create .claude/rules/terraform.md with paths frontmatter such as "**/.tf", so the conventions load when Claude works with Terraform files anywhere. B) Create a /terraform slash command containing the conventions, and ask engineers to run it before they begin any infrastructure change. C) Keep the conventions in the root CLAUDE.md, but mark the section 'Terraform only' so Claude ignores it during React and API sessions. D) Create infra/CLAUDE.md with the conventions, and copy that file into every services/*/deploy/ folder so each Terraform location has its own local copy.
Understand Foundations Mock Exam 1 · Q553 · the situation and each part of the question
The real situation behind this question
Quarry's infrastructure conventions matter a lot: missing tags break cost reports, and inline policies fail security review. But only a few engineers touch Terraform, and the rules currently load in every session. The Terraform files are not in one place: there is an infra folder, and each service team keeps its own deploy folder. The team wants the rules present exactly when Terraform is being edited.
Read the question in parts
Part 1 · so every React and API session loads them too
the current placement wastes context in every session and invites misapplied rules
Part 2 · but also in services/*/deploy/ folders owned by each service team
matching must work by file type across directories, not by one folder
What you are being asked to decide
Terraform rules load in every session, but Terraform files are scattered. How do you load the rules only for Terraform work? Tests choosing a glob-scoped rule over directory CLAUDE.md files for conventions spread across directories.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| paths frontmatter | a YAML field at the top of a .claude/rules/ file listing glob patterns for the files the rule applies to |
| Glob pattern | a file-matching pattern such as **/*.tf that matches Terraform files in any folder |
Study: .claude/rules/: path-scoped conventions with glob frontmatter Frontmatter YAML CLAUDE.md
Understand Foundations Mock Exam 1 · Q553's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Conventions that follow a file type across many directories belong in a .claude/rules/ file with a glob in paths, which loads them only when matching files are in play.
Connect the design to the situation
Terraform files in infra/ and in services/billing/deploy/, services/routing/deploy/ and more.
Best answer: A. A path-scoped rule with a glob such as **/*.tf loads only when Claude works with matching files, wherever they live. Directory-level CLAUDE.md files fit conventions that live in one folder; copying them into many folders creates duplicates that drift apart as each team edits its own copy.
The decisive evidence in the stem
but also in services/*/deploy/ folders owned by each service team
The files that need the conventions are spread across many directories, which favors one glob-scoped rule over per-directory files.
Official objective tested: Task 3.3 · Apply path-specific rules for conditional convention loading
What each choice would do here
A · Why this meets the requirement
Create .claude/rules/terraform.md with paths frontmatter such as "**/*.tf", so the conventions load when Claude works with Terraform files anywhere.
Loads the rules only for matching Terraform files, in any folder.
The rule file starts with paths: ["**/*.tf"]. When Claude reads services/billing/deploy/main.tf or infra/vpc.tf, the conventions load; React and API work never sees them. One file in git serves every location.
B · Why this does not meet the full requirement
Create a /terraform slash command containing the conventions, and ask engineers to run it before they begin any infrastructure change.
Depends on engineers remembering to run a command.
When an engineer forgets the command, Claude edits Terraform without any conventions. The rules are also missing when Claude touches a .tf file as part of a broader task that nobody labeled as infrastructure work.
C · Why this does not meet the full requirement
Keep the conventions in the root CLAUDE.md, but mark the section 'Terraform only' so Claude ignores it during React and API sessions.
Still loads the section in every session.
The label is just more text in an always-loaded file. Every session still carries the conventions, and Claude must interpret the label correctly every time, so misapplied rules remain possible.
D · Why this does not meet the full requirement
Create infra/CLAUDE.md with the conventions, and copy that file into every services/*/deploy/ folder so each Terraform location has its own local copy.
Creates many copies that drift apart over time.
Each deploy folder gets its own copy. Within months, one team updates required tags and others do not, and new deploy folders start with no copy at all. The conventions fragment across the repository.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Path-scoped rule file (illustrative)
# .claude/rules/terraform.md (the frontmatter block at the top of the file)
paths:
- "**/*.tf"
# Markdown body below the frontmatter, for example:
# - Module names: <team>-<purpose>, lowercase, hyphenated
# - Every resource sets tags: owner, cost_center, env
# - No inline IAM policies; reference policy modulesIn the real file the frontmatter sits between --- lines and the body is Markdown; the rules shown are illustrative.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Terraform rules load in every session, but Terraform files are scattered. How do you load the rules only for Terraform work?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: .claude/rules/: path-scoped conventions with glob frontmatter
Study: .claude/rules/: path-scoped conventions with glob frontmatter Frontmatter YAML CLAUDE.md
Return to Foundations Mock Exam 1 · Q553's situation and clause-by-clause explanation
Answer
**A.** A path-scoped rule with a glob such as **/*.tf loads only when Claude works with matching files, wherever they live. Directory-level CLAUDE.md files fit conventions that live in one folder; copying them into many folders creates duplicates that drift apart as each team edits its own copy.Q554. Quarry's nightly CI job asks Claude Code to generate tests for recently changed modules. Engineers discard about 40% of the output: many tests repeat scenarios already covered, and others use hand-built mocks although the repo has shared fixtures in test/fixtures. Which change most improves the generated tests? (Select ONE.) A) Move the job to the Message Batches API so it can process every module overnight with more time to think about each test. B) Generate twice as many tests per module, and let a second pass delete any test whose name matches an existing test in the repository. C) Include each module's existing test files in context, and document testing standards, valuable test criteria and the shared fixtures in CLAUDE.md. D) Ask in the job's prompt for 'high-quality, non-duplicate tests only', and lower the number of tests requested per module from ten to five.
Understand Foundations Mock Exam 1 · Q554 · the situation and each part of the question
The real situation behind this question
Every night, Quarry's CI generates new tests for code changed that day. The idea is good, but engineers throw away four of every ten tests. Some test exactly what existing tests already test. Others build elaborate mocks by hand, ignoring the shared fixtures the team maintains. Reviewing and deleting this output now costs more time than the useful tests save.
Read the question in parts
Part 1 · many tests repeat scenarios already covered
the generator does not see the existing tests, so it cannot avoid repeating them
Part 2 · although the repo has shared fixtures in test/fixtures
the fixtures exist but are undocumented for Claude, so it does not use them
What you are being asked to decide
Generated tests duplicate existing ones and ignore the shared fixtures. What should the CI job give Claude? Tests providing existing tests and documented standards so CI test generation adds value.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| CLAUDE.md in CI | the project instruction file Claude Code reads in CI runs, a home for testing standards and fixtures |
| Fixtures | shared prepared test data in test/fixtures that new tests should reuse |
Study: Claude Code in CI/CD (scenario 5 territory) CLAUDE.md Headless Batch API
Understand Foundations Mock Exam 1 · Q554's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Low-value tests came from missing information: the generator never saw the existing tests or the fixture conventions. Put the existing test files in context and document standards and fixtures in CLAUDE.md.
Connect the design to the situation
New tests for orders.ts that repeat existing cases and build mocks by hand.
Best answer: C. Claude cannot avoid duplicating tests it has not seen, and cannot use fixtures nobody told it about. Supplying the existing tests and documenting standards and fixtures in CLAUDE.md, which CI-invoked Claude Code reads, addresses both causes. A vague 'non-duplicate' request gives Claude no information about what already exists.
The decisive evidence in the stem
many tests repeat scenarios already covered
Duplication shows that the generator lacks the existing test suite as input, which must be provided in context.
Official objective tested: Task 3.6 · Integrate Claude Code into CI/CD pipelines
What each choice would do here
A · Why this does not meet the full requirement
Move the job to the Message Batches API so it can process every module overnight with more time to think about each test.
Changes cost and timing, not what the model knows about the tests.
Batch processing may suit a nightly job's timing, but it does not change the input. The model still lacks the existing tests and the fixture conventions, so the same 40% would be discarded.
B · Why this does not meet the full requirement
Generate twice as many tests per module, and let a second pass delete any test whose name matches an existing test in the repository.
Generates more waste and catches only duplicates with identical names.
Duplicates rarely share exact names, so most survive the name check, and doubling output doubles the review burden. The fixture problem is untouched because nothing tells Claude the fixtures exist.
C · Why this meets the requirement
Include each module's existing test files in context, and document testing standards, valuable test criteria and the shared fixtures in CLAUDE.md.
Supplies the existing tests, standards and fixtures the generator lacks.
The job includes orders.test.ts when generating tests for orders.ts, and CLAUDE.md states 'use fixtures from test/fixtures; prefer branch and error-path tests'. Claude adds tests for uncovered paths and builds on the shared fixtures.
D · Why this does not meet the full requirement
Ask in the job's prompt for 'high-quality, non-duplicate tests only', and lower the number of tests requested per module from ten to five.
Asks for quality without giving the information quality depends on.
Claude still does not see the existing tests, so it cannot know which scenarios are covered. Fewer tests means fewer duplicates in absolute terms, but the share of wasted tests stays similar.
Check your understanding · explain the design in your own words
Generated tests duplicate existing ones and ignore the shared fixtures. What should the CI job give Claude?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Claude Code in CI/CD (scenario 5 territory)
Study: Claude Code in CI/CD (scenario 5 territory) CLAUDE.md Headless Batch API
Return to Foundations Mock Exam 1 · Q554's situation and clause-by-clause explanation
Answer
**C.** Claude cannot avoid duplicating tests it has not seen, and cannot use fixtures nobody told it about. Supplying the existing tests and documenting standards and fixtures in CLAUDE.md, which CI-invoked Claude Code reads, addresses both causes. A vague 'non-duplicate' request gives Claude no information about what already exists.Q555. During a two-day investigation of a memory leak across Quarry's API services, Claude Code's answers start to drift: it now mentions 'a typical connection-pool pattern' instead of the PoolManager class it identified on day one, and it contradicts earlier findings. What should the engineer do to keep findings reliable for the rest of the investigation? (Select ONE.) A) Keep the session open the whole time, so all of day one's tool results remain in context and Claude can look back at them when needed. B) Have Claude record confirmed findings, class names and file paths in a scratchpad file, and refer to that file for each later question. C) Switch to a model with a larger context window, so the two days of exploration fit without the older details becoming less reliable over time. D) Ask Claude to reread every file it examined on day one at the start of each morning, so the original details are fresh in the session again.
Understand Foundations Mock Exam 1 · Q555 · the situation and each part of the question
The real situation behind this question
Quarry's engineer is chasing a memory leak that only appears under load. On day one, Claude traced it to the PoolManager class and two specific call sites. By day two, after much more exploration, Claude talks about 'a typical connection-pool pattern' and contradicts its own earlier conclusion. The investigation could take several more days, and the engineer needs the confirmed facts to stay exact.
Read the question in parts
Part 1 · During a two-day investigation
an extended session where context accumulates and earlier detail degrades
Part 2 · it contradicts earlier findings
earlier conclusions are no longer reliably present, so they need a durable home outside the conversation
What you are being asked to decide
After a long investigation, Claude forgets what it found and talks in generalities. How do you keep the findings reliable? Tests using scratchpad files to persist key findings across a long exploration.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Scratchpad file | a file in the repo where Claude writes confirmed findings and reads them back for later questions |
| Context degradation | a long session's tendency to blur or lose earlier specific facts |
Study: Scratchpads and crash-recovery manifests Scratchpad Compaction Context window
Understand Foundations Mock Exam 1 · Q555's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Long exploration degrades context, and specific findings turn into generalities. A scratchpad file stores confirmed facts outside the conversation so each later question starts from them.
Connect the design to the situation
Day-two answers mention 'typical patterns' instead of the PoolManager class found on day one.
Best answer: B. Generic answers that replace specific earlier findings are a sign of context degradation in a long session. A scratchpad file holds the confirmed facts outside the conversation, so Claude can reload them exactly for each new question. Keeping the session open longer is the condition that produced the drift.
The decisive evidence in the stem
'a typical connection-pool pattern' instead of the PoolManager class it identified on day one
Claude is replacing a specific discovered fact with a generic pattern, the typical symptom of degraded context in an extended session.
Official objective tested: Task 5.4 · Manage context effectively in large codebase exploration
What each choice would do here
A · Why this does not meet the full requirement
Keep the session open the whole time, so all of day one's tool results remain in context and Claude can look back at them when needed.
Keeps the very condition that caused the drift.
The session grows even larger with day two's exploration on top of day one's. The drift the engineer noticed is a product of exactly this, so it will likely get worse.
B · Why this meets the requirement
Have Claude record confirmed findings, class names and file paths in a scratchpad file, and refer to that file for each later question.
Stores confirmed facts outside the context and reloads them exactly.
Claude writes 'Leak source: PoolManager.acquire() in services/api/pool.ts, connections not released on timeout path' to a findings file. Later questions start by reading that file, so answers build on the exact confirmed facts.
C · Why this does not meet the full requirement
Switch to a model with a larger context window, so the two days of exploration fit without the older details becoming less reliable over time.
Delays degradation without giving facts a durable home.
A larger window may postpone the drift, but very long contexts still degrade, and nothing records which findings were confirmed versus speculative. The facts still live only in a fading conversation.
D · Why this does not meet the full requirement
Ask Claude to reread every file it examined on day one at the start of each morning, so the original details are fresh in the session again.
Floods the session with the same reading again every day.
Rereading dozens of files each morning fills the context again with raw content, which is what caused degradation. It costs time and still does not record which conclusions were confirmed.
Check your understanding · explain the design in your own words
After a long investigation, Claude forgets what it found and talks in generalities. How do you keep the findings reliable?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Scratchpads and crash-recovery manifests
Study: Scratchpads and crash-recovery manifests Scratchpad Compaction Context window
Return to Foundations Mock Exam 1 · Q555's situation and clause-by-clause explanation
Answer
**B.** Generic answers that replace specific earlier findings are a sign of context degradation in a long session. A scratchpad file holds the confirmed facts outside the conversation, so Claude can reload them exactly for each new question. Keeping the session open longer is the condition that produced the drift.Q556. An engineer must replace Quarry's in-house date utilities with a standard date library. The utilities are used in about 60 files across the front end and API, two areas depend on undocumented time-zone behavior, and there are at least two reasonable migration orders. How should the engineer use Claude Code? (Select ONE.) A) Use direct execution and ask Claude to migrate all 60 files in one pass, then rely on the existing test suite to catch any time-zone regressions afterwards. B) Ask Claude to write a detailed migration plan into CLAUDE.md first, so that every later session follows the plan automatically without needing plan mode. C) Start in plan mode to explore usages and the time-zone dependencies, agree on a migration plan, then use direct execution to apply it in stages. D) Use direct execution one file at a time, letting Claude decide each file's changes as it goes, so the engineer can review every small diff before moving on.
Understand Foundations Mock Exam 1 · Q556 · the situation and each part of the question
The real situation behind this question
Quarry's old date helpers have quirks nobody wrote down, and two parts of the system quietly depend on them. Replacing them touches about 60 files. The engineer can migrate the front end first or the API first, and each order has trade-offs. A wrong guess could mean subtle scheduling bugs in production and a large rework. The engineer wants Claude's help without committing to changes too early.
Read the question in parts
Part 1 · used in about 60 files across the front end and API
a large multi-file change, one of the main signals for planning first
Part 2 · two areas depend on undocumented time-zone behavior
hidden dependencies must be found before editing, which is exploration work
What you are being asked to decide
A library swap touches 60 files and has hidden time-zone traps. How should the engineer work with Claude Code? Tests combining plan mode for investigation with direct execution for implementation.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Plan mode | a Claude Code mode where Claude reads and explores but does not edit files until a plan is approved |
| Direct execution | Claude edits files immediately as part of the task, suitable once scope is clear |
Study: Plan mode vs direct execution, and the Explore subagent Permission mode Claude Code Decomposition
Understand Foundations Mock Exam 1 · Q556's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Large scope, hidden dependencies and multiple valid approaches call for plan mode first. Once the plan is agreed, direct execution implements it efficiently.
Connect the design to the situation
A date-library migration with two possible orders and undocumented time-zone behavior.
Best answer: C. Many files, hidden dependencies and several valid approaches are the signals for plan mode: explore and decide before changing code, then implement the agreed plan with direct execution. Working file by file without a plan gives small diffs but no overall design, so the time-zone dependencies and migration order are decided by accident.
The decisive evidence in the stem
there are at least two reasonable migration orders
Several valid approaches mean a design decision must be made before editing, which is what plan mode is for.
Official objective tested: Task 3.4 · Determine when to use plan mode vs direct execution
What each choice would do here
A · Why this does not meet the full requirement
Use direct execution and ask Claude to migrate all 60 files in one pass, then rely on the existing test suite to catch any time-zone regressions afterwards.
Edits everything before anyone understands the time-zone risk.
Claude rewrites 60 files at once. If the tests do not cover the undocumented time-zone behavior, regressions ship silently, and if they do, the engineer faces a huge failing diff to untangle.
B · Why this does not meet the full requirement
Ask Claude to write a detailed migration plan into CLAUDE.md first, so that every later session follows the plan automatically without needing plan mode.
Writes a one-off plan into always-loaded instructions.
A plan in CLAUDE.md loads into every session for months, including unrelated work. It also skips the safe exploration step: someone must still investigate before the plan can be written well.
C · Why this meets the requirement
Start in plan mode to explore usages and the time-zone dependencies, agree on a migration plan, then use direct execution to apply it in stages.
Decides the approach first, then implements it in stages.
In plan mode Claude finds every usage, identifies the two time-zone-sensitive areas and compares migration orders without editing. After the engineer approves a plan, direct execution applies it in stages with tests between them.
D · Why this does not meet the full requirement
Use direct execution one file at a time, letting Claude decide each file's changes as it goes, so the engineer can review every small diff before moving on.
Gives small diffs but no overall design or order.
Each diff is easy to review, but no one has decided the order or how to preserve the time-zone behavior. Decisions get made inconsistently, file by file, and rework appears when the hidden dependency surfaces late.
Check your understanding · explain the design in your own words
A library swap touches 60 files and has hidden time-zone traps. How should the engineer work with Claude Code?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Plan mode vs direct execution, and the Explore subagent
Study: Plan mode vs direct execution, and the Explore subagent Permission mode Claude Code Decomposition
Return to Foundations Mock Exam 1 · Q556's situation and clause-by-clause explanation
Answer
**C.** Many files, hidden dependencies and several valid approaches are the signals for plan mode: explore and decide before changing code, then implement the agreed plan with direct execution. Working file by file without a plan gives small diffs but no overall design, so the time-zone dependencies and migration order are decided by accident.Q557. Two Quarry engineers run the same /fix-lint command on the same branch and get different results: one gets the team's Result-type error handling, the other does not. Nothing in the command file mentions error handling, and you suspect a configuration difference between their machines. What is the most effective first step to find the cause? (Select ONE.) A) Ask both engineers to start their sessions with --bare, so neither loads personal files and both receive the same project configuration. B) Run /memory in both engineers' sessions to see which CLAUDE.md and memory files each one has loaded, then compare where the rule comes from. C) Copy the Result-type rule into the /fix-lint command file, so the command always carries the convention whichever memory files each session happens to load. D) Reinstall Claude Code on the second engineer's machine to clear any corrupted local cache that might be hiding the project instructions.
Understand Foundations Mock Exam 1 · Q557 · the situation and each part of the question
The real situation behind this question
Quarry's engineers expect the same command to behave the same way for everyone. Yet /fix-lint gives one engineer code with the team's Result type and gives another plain thrown errors. The command file is identical in git. The most likely explanation is that one session loads an instruction file the other does not, perhaps a personal file only one person has. The team lead wants to find out before changing anything.
Read the question in parts
Part 1 · run the same /fix-lint command on the same branch
the command and the code are identical, so the difference must come from what else each session loads
Part 2 · What is the most effective first step to find the cause
the question asks for diagnosis before any fix, which points to an inspection tool
What you are being asked to decide
Two engineers get different behavior from the same command. How do you find out which instructions each one has? Tests using /memory to diagnose which CLAUDE.md files a session loaded.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| /memory | the Claude Code command that lists the memory files, such as CLAUDE.md files, loaded in the current session |
| Memory hierarchy | user-level, project-level and directory-level CLAUDE.md files that Claude Code combines for a session |
Study: CLAUDE.md: the memory hierarchy CLAUDE.md Claude config files Settings precedence
Understand Foundations Mock Exam 1 · Q557's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Different behavior from identical commands points to different loaded instructions. /memory shows which memory files each session loaded, which locates the rule (often in a user-level file) before you move it to the project CLAUDE.md.
Connect the design to the situation
One engineer's sessions follow the Result-type rule and the other's do not.
Best answer: B. The question asks for a diagnosis, and /memory shows exactly which memory files a session has loaded, which reveals whether the rule lives in a personal file, a project file or nowhere. Copying the rule into the command may hide the symptom for one command but leaves the configuration difference unexplained and affecting every other task.
The decisive evidence in the stem
you suspect a configuration difference between their machines
The likely cause is which instruction files each session loads, so the first step is to inspect the loaded memory files directly.
Official objective tested: Task 3.1 · Configure CLAUDE.md files with appropriate hierarchy, scoping, and modular organization
What each choice would do here
A · Why this does not meet the full requirement
Ask both engineers to start their sessions with --bare, so neither loads personal files and both receive the same project configuration.
Skips CLAUDE.md entirely, so both engineers lose the rule.
--bare skips automatic loading of CLAUDE.md files, project and personal. Both engineers would now behave the same, but neither gets the team's conventions, and the original cause is still unknown.
B · Why this meets the requirement
Run /memory in both engineers' sessions to see which CLAUDE.md and memory files each one has loaded, then compare where the rule comes from.
Shows directly which instruction files each session loaded.
In the first engineer's session, /memory lists ~/.claude/CLAUDE.md, which contains the Result-type rule; in the second, only the project file appears. The cause is clear: the rule lives in a personal file and must move to the project CLAUDE.md.
C · Why this does not meet the full requirement
Copy the Result-type rule into the /fix-lint command file, so the command always carries the convention whichever memory files each session happens to load.
Patches one command and leaves the real difference unexplained.
The convention now travels inside /fix-lint, so that one command may behave consistently. But the engineer still lacks the rule for every other task, and nobody learns that it lives in someone's personal file instead of the project.
D · Why this does not meet the full requirement
Reinstall Claude Code on the second engineer's machine to clear any corrupted local cache that might be hiding the project instructions.
Guesses at corruption without any evidence for it.
Reinstalling costs time and changes nothing, because memory files are plain files on disk that a reinstall does not touch. The difference remains, and the team has no evidence about its cause.
Check your understanding · explain the design in your own words
Two engineers get different behavior from the same command. How do you find out which instructions each one has?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: CLAUDE.md: the memory hierarchy
Study: CLAUDE.md: the memory hierarchy CLAUDE.md Claude config files Settings precedence
Return to Foundations Mock Exam 1 · Q557's situation and clause-by-clause explanation
Answer
**B.** The question asks for a diagnosis, and /memory shows exactly which memory files a session has loaded, which reveals whether the rule lives in a personal file, a project file or nowhere. Copying the rule into the command may hide the symptom for one command but leaves the configuration difference unexplained and affecting every other task.Q558. Quarry's /dependency-audit skill reads every package.json and lockfile, then prints a long analysis before a short final summary. Engineers run it in the middle of other tasks, and afterwards their sessions lose track of earlier work because the audit output fills the context. They need only the summary. What change best fixes this? (Select ONE.) A) Tell engineers to run /compact right after each audit, so the verbose analysis is summarized before they continue with their earlier task. B) Move the audit steps into the root CLAUDE.md, so they are always available and Claude can run the audit without invoking any skill. C) Add context: fork to the skill's SKILL.md frontmatter, so it runs in an isolated subagent context and only its final result returns. D) Add an instruction in the skill body asking Claude to keep the analysis short and to print only the most important packages it finds.
Understand Foundations Mock Exam 1 · Q558 · the situation and each part of the question
The real situation behind this question
Quarry engineers like the dependency audit, but it has a side effect. It reads dozens of manifests and lockfiles and prints a long analysis. When an engineer runs it halfway through a refactor, the session afterwards seems to forget the refactor's details. The audit output has filled the context. Engineers want the audit's conclusion without losing the work they were doing.
Read the question in parts
Part 1 · prints a long analysis before a short final summary
most of the output is working detail that the main session does not need
Part 2 · They need only the summary
the design should return just the result to the main session
What you are being asked to decide
A skill dumps a long analysis into the session and pushes out earlier work. How do you keep only its summary? Tests using context: fork to isolate a verbose skill from the main session.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| context: fork | SKILL.md frontmatter that runs the skill in its own subagent context and returns only the result |
| Context isolation | keeping the audit's working output out of the engineer's main conversation |
Study: Skill frontmatter: the three options the exam names Skill Frontmatter Context isolation
Understand Foundations Mock Exam 1 · Q558's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The output was polluting the main session. context: fork in the skill's frontmatter isolates the work in a subagent and returns only the summary, which fixes the cause instead of cleaning up afterwards.
Connect the design to the situation
A dependency audit prints hundreds of lines before a ten-line summary.
Best answer: C. context: fork runs the skill in a separate subagent context, so the long analysis never enters the main conversation and only the result comes back. Running /compact afterwards is a manual cleanup that still lets the verbose output displace earlier work first and depends on every engineer remembering it.
The decisive evidence in the stem
afterwards their sessions lose track of earlier work because the audit output fills the context
The harm comes from verbose skill output entering the main session, which context isolation prevents at the source.
Official objective tested: Task 3.2 · Create and configure custom slash commands and skills
What each choice would do here
A · Why this does not meet the full requirement
Tell engineers to run /compact right after each audit, so the verbose analysis is summarized before they continue with their earlier task.
Cleans up after the damage and depends on manual discipline.
The engineer runs the audit, the context fills, and only then is it compacted, so some earlier detail is already summarized away. Engineers who forget /compact keep the full output, and the problem returns.
B · Why this does not meet the full requirement
Move the audit steps into the root CLAUDE.md, so they are always available and Claude can run the audit without invoking any skill.
Loads the procedure into every session and still runs it inline.
The procedure now loads in every session, even when nobody audits. When Claude runs it, the output still fills the main context, so the original problem remains and every session pays for the extra instructions.
C · Why this meets the requirement
Add context: fork to the skill's SKILL.md frontmatter, so it runs in an isolated subagent context and only its final result returns.
Keeps the verbose work out of the main session entirely.
With context: fork, the audit reads manifests and reasons in its own subagent context. The main session receives only the final summary, so the refactor's details stay intact however long the analysis was.
D · Why this does not meet the full requirement
Add an instruction in the skill body asking Claude to keep the analysis short and to print only the most important packages it finds.
May shorten output but loses detail the audit needs to reason.
A shorter analysis may help a little, but the audit must still read many files, and their tool output lands in the main session. Forcing brevity can also hide risky packages the audit should report.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
SKILL.md frontmatter with context: fork (illustrative)
---
name: dependency-audit
description: Audit package.json and lockfiles for outdated or risky dependencies. Returns a short summary.
context: fork
agent: general-purpose
---
Read every package.json and lockfile in the repo. Compare versions with the policy in docs/deps.md.
Return only: a table of risky packages, why, and the recommended action.The body is illustrative. context: fork and agent: are separate frontmatter lines.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
A skill dumps a long analysis into the session and pushes out earlier work. How do you keep only its summary?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Skill frontmatter: the three options the exam names
Study: Skill frontmatter: the three options the exam names Skill Frontmatter Context isolation
Return to Foundations Mock Exam 1 · Q558's situation and clause-by-clause explanation
Answer
**C.** context: fork runs the skill in a separate subagent context, so the long analysis never enters the main conversation and only the result comes back. Running /compact afterwards is a manual cleanup that still lets the verbose output displace earlier work first and depends on every engineer remembering it.Scenario 3 · Multi-Agent Research System
Q559. After a three-hour analysis session on parking pricing, a Northwind analyst wants to compare two report framings, one built around revenue and one around congestion. Both must start from the same analysis, and work on one framing must not influence the other. Which approach fits? (Select ONE.) A) Start two new sessions and paste only the final report outline into each, so both framings begin from an identical clean context. B) Continue in the single session, writing the revenue framing first and then asking Claude to set it aside before writing the congestion framing. C) Resume the analysis session twice at the same time with --resume, so both conversations append to one shared session history. D) Use fork_session from the analysis session to create two independent branches, one per framing, each starting from the shared analysis.
Understand Foundations Mock Exam 1 · Q559 · the situation and each part of the question
The real situation behind this question
A Northwind analyst spent three hours with the system working through parking data for a city. Now the client wants to see two possible reports: one that leads with revenue, one that leads with congestion. Both must rest on exactly the same analysis. The analyst also wants a fair comparison, so the revenue draft must not shape the congestion draft.
Read the question in parts
Part 1 · Both must start from the same analysis
each branch needs the complete shared baseline, not a summary or outline
Part 2 · work on one framing must not influence the other
the two branches must be fully independent of each other after they split
What you are being asked to decide
Two report framings must start from the same analysis without affecting each other. How do you set that up? Tests using fork_session to explore divergent approaches from a shared baseline.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| fork_session | an Agent SDK option that creates a new branch from an existing session, keeping the original intact |
| Shared baseline | the three-hour analysis both framings must inherit unchanged |
Study: Sessions, forking, and spawning: the mechanics Checkpoint Context isolation Agent SDK
Understand Foundations Mock Exam 1 · Q559's answer · full reasoning and worked examples
Claude synthesized · the point, straight
To compare alternatives from one shared analysis, fork the session. Each branch inherits the whole baseline and then evolves independently, which neither a single session nor fresh sessions can provide.
Connect the design to the situation
A revenue framing and a congestion framing, both built on three hours of parking analysis.
Best answer: D. fork_session creates independent branches from a shared baseline: each framing inherits the full three-hour analysis, and neither branch sees the other's work. Continuing in one session lets the first framing shape the second, because 'setting it aside' does not remove it from the context.
The decisive evidence in the stem
Both must start from the same analysis
The baseline must be shared exactly, which rules out fresh sessions with only an outline and favors branching from the session.
Official objective tested: Task 1.7 · Manage session state, resumption, and forking
What each choice would do here
A · Why this does not meet the full requirement
Start two new sessions and paste only the final report outline into each, so both framings begin from an identical clean context.
Throws away most of the three-hour analysis.
The outline carries the structure but not the three hours of data, reasoning and caveats. Each framing would rebuild or guess the missing analysis, so they no longer rest on the same baseline.
B · Why this does not meet the full requirement
Continue in the single session, writing the revenue framing first and then asking Claude to set it aside before writing the congestion framing.
Lets the first framing shape the second inside one context.
The congestion framing is written in a context that already contains the full revenue draft. Asking Claude to set it aside does not remove it, so arguments and structure leak across and the comparison is not fair.
C · Why this does not meet the full requirement
Resume the analysis session twice at the same time with --resume, so both conversations append to one shared session history.
Mixes both framings into one history instead of separating them.
One session history cannot hold two independent conversations; at best they interleave, so each framing sees the other. This is the opposite of the isolation the analyst needs.
D · Why this meets the requirement
Use fork_session from the analysis session to create two independent branches, one per framing, each starting from the shared analysis.
Gives each framing the full analysis in its own branch.
Two calls with resume set to the analysis session and fork_session enabled create two branches. Each holds the full analysis; the revenue branch and the congestion branch then diverge without seeing each other.
Check your understanding · explain the design in your own words
Two report framings must start from the same analysis without affecting each other. How do you set that up?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Sessions, forking, and spawning: the mechanics
Study: Sessions, forking, and spawning: the mechanics Checkpoint Context isolation Agent SDK
Return to Foundations Mock Exam 1 · Q559's situation and clause-by-clause explanation
Answer
**D.** fork_session creates independent branches from a shared baseline: each framing inherits the full three-hour analysis, and neither branch sees the other's work. Continuing in one session lets the first framing shape the second, because 'setting it aside' does not remove it from the context.Q560. Northwind's coordinator loop stops after a fixed 8 iterations. On broad briefs the coordinator is often still delegating when the cap hits, so the report agent receives partial findings; simple briefs finish in three iterations. How should the loop decide that the coordinator is done? (Select ONE.) A) Raise the cap to 20 iterations, so broad briefs have enough room to finish while simple briefs still end well before reaching the limit. B) Continue while stop_reason is "tool_use" and stop on "end_turn", keeping a much higher iteration limit only as a guard against runaway loops. C) Stop when the coordinator's response text contains the phrase 'research complete', which the system prompt instructs it to write once every city is done. D) Make the cap depend on the size of the brief, allowing two iterations per city, so larger briefs automatically receive more iterations.
Understand Foundations Mock Exam 1 · Q560 · the situation and each part of the question
The real situation behind this question
Northwind's engineers set an 8-iteration limit early on to avoid runaway costs. It worked for small questions. But a 20-city fare brief needs many delegations, and the loop now ends while the coordinator is still asking for analyses. The report agent then writes a brief from half the findings, and clients notice missing cities. The team must decide what really signals that the coordinator is done.
Read the question in parts
Part 1 · stops after a fixed 8 iterations
the current primary stop condition is an arbitrary number with no link to whether work remains
Part 2 · simple briefs finish in three iterations
the right number of iterations varies a lot, so no fixed cap fits every brief
What you are being asked to decide
A fixed limit of 8 rounds cuts off big research jobs. What should tell the loop to stop? Tests using stop_reason as the primary stop condition and a cap only as a safety guard.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| stop_reason | the API field that reports tool_use while the coordinator still wants work done and end_turn when it is finished |
| Safety cap | a high iteration limit that only catches runaway loops, never the normal end of work |
Study: Stop reasons: memorize this table Agent loop stop_reason Loop token budget
Understand Foundations Mock Exam 1 · Q560's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The coordinator itself signals completion through stop_reason. Loop on tool_use, stop on end_turn, and keep any iteration limit high and only as a safety guard against runaway loops.
Connect the design to the situation
A 20-city brief still delegating at iteration 8 when the loop ends.
Best answer: B. The model reports when it has finished through stop_reason, so the loop should run until end_turn and keep a cap only as a safety net. Raising or scaling the cap still makes an arbitrary number the primary stop condition, so some brief will again be cut off mid-delegation.
The decisive evidence in the stem
stops after a fixed 8 iterations
An iteration cap is acting as the primary stopping mechanism, which is the anti-pattern behind the truncated research.
Official objective tested: Task 1.1 · Design and implement agentic loops for autonomous task execution
What each choice would do here
A · Why this does not meet the full requirement
Raise the cap to 20 iterations, so broad briefs have enough room to finish while simple briefs still end well before reaching the limit.
Moves the arbitrary limit instead of removing it as the primary stop.
Most current briefs now finish, but a larger brief or a re-delegation round can still exceed 20. The loop still stops on a count, not on the coordinator's own signal, so truncated reports remain possible.
B · Why this meets the requirement
Continue while stop_reason is "tool_use" and stop on "end_turn", keeping a much higher iteration limit only as a guard against runaway loops.
Stops when the model signals it is finished, with a cap only as a guard.
While stop_reason is tool_use the loop runs the Task calls and returns results; at end_turn it hands off to reporting. A limit of, say, 60 iterations only catches a stuck loop, so normal briefs always finish their delegation.
C · Why this does not meet the full requirement
Stop when the coordinator's response text contains the phrase 'research complete', which the system prompt instructs it to write once every city is done.
Parses natural language for completion, which is fragile.
The phrase may appear early, for example 'once research complete, I will synthesize', or be missing when the model words things differently. The loop then stops too soon or never, depending on wording.
D · Why this does not meet the full requirement
Make the cap depend on the size of the brief, allowing two iterations per city, so larger briefs automatically receive more iterations.
Scales the arbitrary number but keeps it as the stop condition.
Two iterations per city guesses at effort. A city needing re-delegation for a missing dataset still gets cut off, and the cap stays the primary stop condition with a more complicated formula.
Check your understanding · explain the design in your own words
A fixed limit of 8 rounds cuts off big research jobs. What should tell the loop to stop?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Stop reasons: memorize this table
Study: Stop reasons: memorize this table Agent loop stop_reason Loop token budget
Return to Foundations Mock Exam 1 · Q560's situation and clause-by-clause explanation
Answer
**B.** The model reports when it has finished through stop_reason, so the loop should run until end_turn and keep a cap only as a safety net. Raising or scaling the cap still makes an arbitrary number the primary stop condition, so some brief will again be cut off mid-delegation.Q561. Client auditors flag two problems in Northwind briefs. Some claims can no longer be traced to any source after synthesis. And one brief called bike-share trip counts 'conflicting' when the two figures were actually from 2019 and 2024. Which two changes to subagent outputs address these problems? (Select TWO.) A) Have the synthesis agent keep only the most recent figure whenever two sources disagree, and drop older values from the brief entirely. B) Require subagents to include each figure's publication or data-collection date in their structured output, so synthesis can tell trends from conflicts. C) Require subagents to return structured claim-source mappings, with source URL, document name and supporting excerpt, that synthesis must preserve and merge. D) Ask subagents to summarize their findings in short prose paragraphs, so the synthesis agent receives less text and makes fewer mistakes.
Understand Foundations Mock Exam 1 · Q561 · the situation and each part of the question
The real situation behind this question
Northwind's clients check citations carefully. In recent briefs, auditors found claims that no longer point to any source; somewhere between analysis and synthesis, the link was lost. In another brief, the system reported 'conflicting' bike-share trip counts. One number came from 2019 and the other from 2024. Ridership had simply grown. Both problems undermine trust, and the team must fix the outputs.
Read the question in parts
Part 1 · Some claims can no longer be traced to any source after synthesis
claim-source links are lost in summarization, so they must be structured and preserved
Part 2 · the two figures were actually from 2019 and 2024
without dates, a change over time looks like a contradiction
What you are being asked to decide
Claims lose their sources, and figures from different years look like conflicts. Which two output changes fix this? Tests preserving claim-source mappings and dates through multi-source synthesis.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Claim-source mapping | a record linking each claim to its source URL, document and excerpt |
| Collection date | when a figure was published or measured, needed to tell a trend from a contradiction |
Study: Provenance: claim-source mappings through synthesis Provenance Audit trail Structured outputs
Understand Foundations Mock Exam 1 · Q561's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Provenance survives synthesis only if subagents output structured claim-source mappings and their dates. Mappings keep claims traceable; dates let synthesis tell a trend from a genuine conflict.
Connect the design to the situation
Bike-share counts of 1.2 million (2019) and 2.9 million (2024) labeled as a conflict.
Best answer: BC. Attribution is lost when findings are compressed without claim-source links, so structured mappings that synthesis must carry through fix the untraceable claims. Dates in the structured output fix the false conflict, because two values from different years describe change over time. Keeping only the latest figure discards evidence and would also hide real conflicts between sources from the same year.
The decisive evidence in the stem
the two figures were actually from 2019 and 2024
The apparent contradiction is a time difference, so outputs must carry dates for synthesis to interpret the figures correctly.
Official objective tested: Task 5.6 · Preserve information provenance and handle uncertainty in multi-source synthesis
What each choice would do here
A · Why this does not meet the full requirement
Have the synthesis agent keep only the most recent figure whenever two sources disagree, and drop older values from the brief entirely.
Discards evidence and can hide real conflicts.
In the bike-share case the older figure is lost, so the growth trend disappears. When two same-year sources disagree, the brief silently picks one instead of reporting the conflict, which the clients explicitly forbid.
B · Why this does not meet the full requirement
Require subagents to include each figure's publication or data-collection date in their structured output, so synthesis can tell trends from conflicts.
Lets synthesis read a time difference as a trend.
Each figure carries a date such as data_collected 2019 or 2024. Synthesis sees two different years and reports growth from 1.2 million to 2.9 million instead of a conflict.
C · Why this does not meet the full requirement
Require subagents to return structured claim-source mappings, with source URL, document name and supporting excerpt, that synthesis must preserve and merge.
Keeps each claim linked to its source through synthesis.
Each finding arrives as claim, source_url, document and excerpt. Synthesis merges these records instead of rewriting prose, so every claim in the brief still points to its source when auditors check it.
D · Why this does not meet the full requirement
Ask subagents to summarize their findings in short prose paragraphs, so the synthesis agent receives less text and makes fewer mistakes.
Compresses findings and loses attribution further.
Shorter prose drops the source links even faster, because summarization is where attribution is lost. The untraceable-claim problem gets worse, and dates may vanish too.
Check your understanding · explain the design in your own words
Claims lose their sources, and figures from different years look like conflicts. Which two output changes fix this?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Provenance: claim-source mappings through synthesis
Study: Provenance: claim-source mappings through synthesis Provenance Audit trail Structured outputs
Return to Foundations Mock Exam 1 · Q561's situation and clause-by-clause explanation
Answer
**BC.** Attribution is lost when findings are compressed without claim-source links, so structured mappings that synthesis must carry through fix the untraceable claims. Dates in the structured output fix the false conflict, because two values from different years describe change over time. Keeping only the latest figure discards evidence and would also hide real conflicts between sources from the same year.Q562. A city asks Northwind why bus ridership fell 18% after a 2025 route redesign. Nobody knows in advance whether the cause is service gaps, fares, remote work or bad counting data. The current coordinator always runs a fixed four-step chain built for policy comparisons. How should it decompose this request? (Select ONE.) A) Ask the coordinator to pick the single most likely cause first and research only that one, to keep the investigation narrow and fast. B) Keep the fixed four-step chain, because a predictable sequence makes the results easier to compare with the city's earlier policy briefs. C) Split the request upfront into four equal subtasks, one per suspected cause, run them in parallel, and synthesize whatever each subagent returns at the end. D) Use adaptive decomposition: investigate broadly first, then create follow-up subtasks from each step's findings, such as auditing counts if data looks off.
Understand Foundations Mock Exam 1 · Q562 · the situation and each part of the question
The real situation behind this question
A city council saw bus ridership drop 18% right after a big route redesign and wants to know why before the next budget vote. The obvious suspect is the redesign, but fares rose too, office occupancy changed, and the new counting sensors may be wrong. Northwind's standard process is built for comparisons with known steps. This question is different: what to investigate next depends on what each step finds.
Read the question in parts
Part 1 · Nobody knows in advance
the subtasks cannot be listed upfront, so the plan must evolve with the evidence
Part 2 · built for policy comparisons
the fixed chain suits predictable tasks, not this open-ended investigation
What you are being asked to decide
The cause of a ridership drop is unknown. Should the coordinator follow a fixed plan or adapt as it learns? Tests choosing dynamic decomposition for open-ended investigation over a fixed chain.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Adaptive decomposition | creating the next subtasks from what earlier steps discovered |
| Prompt chaining | a fixed sequence of steps, best for predictable tasks such as standard comparisons |
Study: Workflows vs agents: Anthropic's decision rule Decomposition Prompt chaining Workflow
Understand Foundations Mock Exam 1 · Q562's answer · full reasoning and worked examples
Claude synthesized · the point, straight
When the subtasks depend on what is discovered, use adaptive decomposition: start broad, then create targeted follow-ups from intermediate findings. Keep fixed chains for predictable, repeatable tasks.
Connect the design to the situation
An 18% ridership drop whose cause could be service, fares, remote work or bad data.
Best answer: D. An open-ended investigation needs a plan that changes with what is discovered, because each finding decides what is worth examining next. Splitting upfront into four fixed causes is still a predetermined plan: it cannot follow an unexpected lead, and it wastes effort on causes the early evidence already rules out.
The decisive evidence in the stem
Nobody knows in advance whether the cause is service gaps, fares, remote work or bad counting data
The path of the investigation depends on intermediate findings, which calls for dynamic decomposition rather than a fixed chain.
Official objective tested: Task 1.6 · Design task decomposition strategies for complex workflows
What each choice would do here
A · Why this does not meet the full requirement
Ask the coordinator to pick the single most likely cause first and research only that one, to keep the investigation narrow and fast.
Bets on one cause before any evidence exists.
Picking 'route redesign' without evidence risks a confident but wrong brief. The city asked why, and the other causes are never examined, so the answer cannot rule them out.
B · Why this does not meet the full requirement
Keep the fixed four-step chain, because a predictable sequence makes the results easier to compare with the city's earlier policy briefs.
Applies a predictable chain to an unpredictable question.
The chain searches, analyzes, synthesizes and reports on a fixed outline. If early data shows the sensors undercount, nothing in the chain investigates the sensors, so the brief may blame the redesign wrongly.
C · Why this does not meet the full requirement
Split the request upfront into four equal subtasks, one per suspected cause, run them in parallel, and synthesize whatever each subagent returns at the end.
Fixes the plan upfront and cannot follow new leads.
Four parallel investigations run regardless of early evidence. If counting data turns out to be the issue, three subagents spent effort on causes that never mattered, and nobody follows the combined lead.
D · Why this meets the requirement
Use adaptive decomposition: investigate broadly first, then create follow-up subtasks from each step's findings, such as auditing counts if data looks off.
Lets each finding shape the next subtasks.
The coordinator first gathers ridership by route, sensor change dates and fare history. Seeing that drops cluster on routes with new sensors, it spawns a subtask to audit counts, and the plan follows the evidence.
Check your understanding · explain the design in your own words
The cause of a ridership drop is unknown. Should the coordinator follow a fixed plan or adapt as it learns?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Workflows vs agents: Anthropic's decision rule
Study: Workflows vs agents: Anthropic's decision rule Decomposition Prompt chaining Workflow
Return to Foundations Mock Exam 1 · Q562's situation and clause-by-clause explanation
Answer
**D.** An open-ended investigation needs a plan that changes with what is discovered, because each finding decides what is worth examining next. Splitting upfront into four fixed causes is still a predetermined plan: it cannot follow an unexpected lead, and it wastes effort on causes the early evidence already rules out.Q563. Every Northwind request runs the full pipeline: search, document analysis, synthesis and report. A client question such as 'What is the current base fare in Denver?' takes six minutes and returns a four-page brief, while full policy comparisons work well. How should the coordinator change? (Select ONE.) A) Instruct the report agent to shorten its output for simple questions, so clients receive one short paragraph with a source instead of four pages of text. B) Add a separate fast pipeline that uses a smaller model for short questions, selected by a keyword classifier that runs before the coordinator. C) Keep the full pipeline but run all four subagents in parallel, so simple questions finish faster even though every agent still runs on every request. D) Have the coordinator assess each request's requirements and invoke only the subagents it needs, for example just search for a single current fact.
Understand Foundations Mock Exam 1 · Q563 · the situation and each part of the question
The real situation behind this question
Northwind's clients sometimes ask quick questions between big projects. A transit manager wants Denver's current base fare. The system treats that like a 20-city study: it searches, analyzes documents, synthesizes and writes a four-page brief, taking six minutes and a lot of tokens. The manager wanted one number with a source. The team wants quick questions answered quickly without hurting the full briefs.
Read the question in parts
Part 1 · Every Northwind request runs the full pipeline
delegation is fixed, so the coordinator does not use its ability to choose subagents
Part 2 · while full policy comparisons work well
the full pipeline is right for complex requests and should remain available for them
What you are being asked to decide
A one-fact question goes through all four agents and takes six minutes. How should the coordinator handle it? Tests a coordinator that selects subagents dynamically based on the request.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Coordinator | the agent that decides which subagents to call and combines their results |
| Dynamic selection | choosing per request which subagents to invoke instead of always running all of them |
Study: Coordinator communication: from plan to final report Orchestrator Workflow routing Model tiering
Understand Foundations Mock Exam 1 · Q563's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The coordinator should analyze what each request needs and invoke only those subagents. Fixed full-pipeline routing wastes time on simple questions, and extra routing layers duplicate the coordinator's job.
Connect the design to the situation
'What is the current base fare in Denver?' produces a four-page brief.
Best answer: D. The coordinator's job includes deciding which subagents a request needs. Letting it pick only search for a single-fact question removes the wasted stages while keeping the full pipeline for real comparisons. A keyword classifier in front adds a second routing system that will misjudge phrasings, and it duplicates a decision the coordinator is built to make.
The decisive evidence in the stem
Every Northwind request runs the full pipeline
The coordinator never adapts delegation to the request, which is why a one-fact question pays for four stages.
Official objective tested: Task 1.2 · Orchestrate multi-agent systems with coordinator-subagent patterns
What each choice would do here
A · Why this does not meet the full requirement
Instruct the report agent to shorten its output for simple questions, so clients receive one short paragraph with a source instead of four pages of text.
Shortens the output but keeps all the wasted work.
The client gets a shorter answer, but the six minutes and the cost of search, analysis and synthesis remain. The waste comes from running stages, not from report length.
B · Why this does not meet the full requirement
Add a separate fast pipeline that uses a smaller model for short questions, selected by a keyword classifier that runs before the coordinator.
Adds a separate keyword router that duplicates the coordinator's job.
Short keyword-matched questions take the fast path, but phrasings like 'quick comparison of fares in two cities' get misrouted either way. The team now maintains two pipelines and a classifier.
C · Why this does not meet the full requirement
Keep the full pipeline but run all four subagents in parallel, so simple questions finish faster even though every agent still runs on every request.
Speeds the pipeline up but still runs unnecessary agents.
Synthesis depends on analysis, and the report depends on synthesis, so the stages cannot all run at once. Even if some could, the simple question still pays for four agents it never needed.
D · Why this meets the requirement
Have the coordinator assess each request's requirements and invoke only the subagents it needs, for example just search for a single current fact.
Lets the coordinator skip the stages a request does not need.
For the Denver question, the coordinator calls only the web search agent, gets the fare with its source, and answers directly. For a 20-city comparison it still delegates to all four subagents, so complex briefs are unaffected.
Check your understanding · explain the design in your own words
A one-fact question goes through all four agents and takes six minutes. How should the coordinator handle it?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Coordinator communication: from plan to final report
Study: Coordinator communication: from plan to final report Orchestrator Workflow routing Model tiering
Return to Foundations Mock Exam 1 · Q563's situation and clause-by-clause explanation
Answer
**D.** The coordinator's job includes deciding which subagents a request needs. Letting it pick only search for a single-fact question removes the wasted stages while keeping the full pipeline for real comparisons. A keyword classifier in front adds a second routing system that will misjudge phrasings, and it duplicates a decision the coordinator is built to make.Q564. During a 20-city brief, three city websites return server errors all day, so the search agent cannot collect their fare data. Currently any subagent failure makes the coordinator abort the whole brief. Clients prefer an on-time brief with clearly stated gaps. How should these failures be handled? (Select ONE.) A) Have the search agent return empty results for the three cities as successful searches, so the coordinator can finish the brief on schedule. B) Have the search agent report each unreachable site as a structured failure with partial results, continue the brief, and mark coverage gaps for those cities. C) Have the search agent report 'search unavailable' for the three cities, and let the coordinator quietly drop them from the brief's scope. D) Keep aborting on any failure, but schedule an automatic retry of the whole brief later, so the three sites have another chance to respond.
Understand Foundations Mock Exam 1 · Q564 · the situation and each part of the question
The real situation behind this question
Northwind's 20-city fare brief is due in two days. Three cities' transit websites have been failing all day, so the search agent cannot get their fares. Today the coordinator would abort the entire brief, wasting the work on 17 cities. The client has said what they want: deliver on time and say clearly which cities are incomplete. The team must change how failures flow.
Read the question in parts
Part 1 · any subagent failure makes the coordinator abort the whole brief
terminating the workflow on one failure is an anti-pattern for this client need
Part 2 · Clients prefer an on-time brief with clearly stated gaps
the gaps must be visible in the output, not hidden or turned into a delay
What you are being asked to decide
Three city sites are down all day. Abort the brief, hide the gaps, or continue and say what is missing? Tests propagating structured failures and annotating coverage gaps instead of aborting or suppressing errors.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Coverage annotation | a note in the brief saying which topics or cities are well supported and which have gaps |
| Graceful degradation | finishing useful work despite a partial failure and saying what is missing |
Study: Error propagation: what a subagent reports when it fails Graceful degradation Error taxonomy Provenance
Understand Foundations Mock Exam 1 · Q564's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A partial failure should neither stop the workflow nor disappear. Report it with structure, continue, and annotate coverage so readers know which findings are supported and where the gaps are.
Connect the design to the situation
Three of 20 cities unreachable during a 48-hour brief.
Best answer: B. Stopping the whole workflow over three cities and hiding the failures are both anti-patterns. A structured failure report lets the coordinator continue, and coverage annotations tell readers exactly which cities lack data. Returning empty results as success hides the outage, so the brief would present missing data as if the cities had no fare information.
The decisive evidence in the stem
Clients prefer an on-time brief with clearly stated gaps
The acceptable outcome is completion with transparent gaps, which requires reporting failures and annotating coverage rather than aborting or hiding them.
Official objective tested: Task 5.3 · Implement error propagation strategies across multi-agent systems
What each choice would do here
A · Why this does not meet the full requirement
Have the search agent return empty results for the three cities as successful searches, so the coordinator can finish the brief on schedule.
Disguises an outage as a real absence of data.
The coordinator believes the three cities have no fare data and the brief may say so. Auditors who check those cities' sites later find fares, and Northwind looks careless or dishonest.
B · Why this meets the requirement
Have the search agent report each unreachable site as a structured failure with partial results, continue the brief, and mark coverage gaps for those cities.
Continues the brief and states the gaps explicitly.
The search agent returns, for each city, the failure type, the URLs tried and any cached pages. The coordinator continues, and the brief says 'fare data for three cities unavailable: sites unreachable on the collection date'.
C · Why this does not meet the full requirement
Have the search agent report 'search unavailable' for the three cities, and let the coordinator quietly drop them from the brief's scope.
Hides the failure from the client by shrinking scope.
'search unavailable' gives the coordinator no detail, and dropping the cities silently changes what the client asked for. Readers never learn that three cities were part of the scope.
D · Why this does not meet the full requirement
Keep aborting on any failure, but schedule an automatic retry of the whole brief later, so the three sites have another chance to respond.
Delays the whole brief for three cities.
The whole 20-city brief misses its deadline because of three sites. The 17 finished cities wait, and the retry may fail again if the sites stay down.
Check your understanding · explain the design in your own words
Three city sites are down all day. Abort the brief, hide the gaps, or continue and say what is missing?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Error propagation: what a subagent reports when it fails
Study: Error propagation: what a subagent reports when it fails Graceful degradation Error taxonomy Provenance
Return to Foundations Mock Exam 1 · Q564's situation and clause-by-clause explanation
Answer
**B.** Stopping the whole workflow over three cities and hiding the failures are both anti-patterns. A structured failure report lets the coordinator continue, and coverage annotations tell readers exactly which cities lack data. Returning empty results as success hides the outage, so the brief would present missing data as if the cities had no fare information.Q565. Northwind wants its search agent to query a widely used academic citation index. One engineer proposes building a custom MCP server for it, although a maintained community MCP server for that index already exists. The team's own fare-history database also needs an MCP server. How should you divide the work? (Select ONE.) A) Use the maintained community server for the citation index, and build a custom MCP server only for the team-specific fare-history database. B) Use the community server for both by adding the fare-history tables to it, so the team only ever has to maintain one integration. C) Skip MCP for the citation index and have the search agent call its REST API through a generic HTTP tool, with the endpoint in the prompt. D) Build custom servers for both systems, so the team controls every tool description and can tune both integrations closely for Northwind's research work.
Understand Foundations Mock Exam 1 · Q565 · the situation and each part of the question
The real situation behind this question
Northwind's research quality depends on two data sources. One is a well-known academic citation index that many teams use, and the community already maintains an MCP server for it. The other is Northwind's own database of historic fares, which only Northwind has. An engineer wants to build both servers in-house. The team lead must now decide where the limited engineering time goes.
Read the question in parts
Part 1 · a maintained community MCP server for that index already exists
a standard integration is already solved and maintained by others
Part 2 · The team's own fare-history database also needs an MCP server
this system is team-specific, so a custom server is justified here
What you are being asked to decide
One system has a ready-made MCP server, the other is internal. What should the team build? Tests choosing community MCP servers for standard integrations and custom ones for team-specific systems.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Community MCP server | a maintained, shared MCP server for a widely used external system |
| Custom MCP server | a server the team builds for its own systems, such as the fare-history database |
Study: Configuring MCP in Claude Code MCP server Build vs buy agent MCP
Understand Foundations Mock Exam 1 · Q565's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Use maintained community MCP servers for standard integrations and reserve custom servers for team-specific systems. That puts engineering effort where nobody else can do it.
Connect the design to the situation
A public citation index with a community server, and Northwind's own fare-history database.
Best answer: A. For a standard integration, a maintained community server saves building and maintaining what already exists; custom servers are for team-specific systems like the fare-history database. Building both from scratch spends effort on a solved problem and takes on maintenance for an API the community already tracks.
The decisive evidence in the stem
a maintained community MCP server for that index already exists
A standard integration already has a maintained server, so building another would duplicate work without a team-specific reason.
Official objective tested: Task 2.4 · Integrate MCP servers into Claude Code and agent workflows
What each choice would do here
A · Why this meets the requirement
Use the maintained community server for the citation index, and build a custom MCP server only for the team-specific fare-history database.
Reuses what exists and builds only what is unique.
The search agent connects to the community citation server immediately. The team builds one custom MCP server for fare history, with tools and descriptions tailored to how analysts query fares.
B · Why this does not meet the full requirement
Use the community server for both by adding the fare-history tables to it, so the team only ever has to maintain one integration.
Mixes a private database into a third-party server.
A third-party server is not designed to hold Northwind's private tables, and modifying it creates a fork the team must maintain. It also mixes proprietary data into an external codebase.
C · Why this does not meet the full requirement
Skip MCP for the citation index and have the search agent call its REST API through a generic HTTP tool, with the endpoint in the prompt.
Drops MCP for a generic tool with less structure.
The agent gets a generic HTTP tool and an endpoint described in prose, so it must build requests and parse responses itself. Errors rise, and the structured tool descriptions MCP provides are lost.
D · Why this does not meet the full requirement
Build custom servers for both systems, so the team controls every tool description and can tune both integrations closely for Northwind's research work.
Rebuilds a solved integration and its maintenance.
The team builds and maintains a citation-index server that already exists, tracking the index's API changes alone. That time is taken from the fare-history server that only Northwind can build.
Check your understanding · explain the design in your own words
One system has a ready-made MCP server, the other is internal. What should the team build?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Configuring MCP in Claude Code
Study: Configuring MCP in Claude Code MCP server Build vs buy agent MCP
Return to Foundations Mock Exam 1 · Q565's situation and clause-by-clause explanation
Answer
**A.** For a standard integration, a maintained community server saves building and maintaining what already exists; custom servers are for team-specific systems like the fare-history database. Building both from scratch spends effort on a solved problem and takes on maintenance for an API the community already tracks.Q566. Traces show the document analysis agent sends every error straight to the coordinator, including brief rate-limit responses that succeed on a second attempt. The coordinator spends many turns re-delegating these tasks, and its context fills with error messages. What change fits best? (Select ONE.) A) Make the analysis agent stop the whole brief on any rate-limit response, so the operations team can investigate the document provider before work continues. B) Let the analysis agent retry transient errors with backoff, and send the coordinator only failures it cannot resolve, with attempts and partial results. C) Have the coordinator ignore every error from the analysis agent and continue the brief with whatever documents were analyzed successfully. D) Give the coordinator a larger context window, so that error messages from repeated re-delegation no longer crowd out its research findings and plans.
Understand Foundations Mock Exam 1 · Q566 · the situation and each part of the question
The real situation behind this question
Northwind's analysis agent is very transparent: every error goes straight back to the coordinator. Most are rate-limit responses from a document service, and they succeed on a second try. Still, each one makes the coordinator re-delegate the task, and the coordinator's context fills with error text instead of research. Briefs slow down, and the coordinator has less room for its real job.
Read the question in parts
Part 1 · sends every error straight to the coordinator
no local recovery happens, so even trivial failures cost coordinator turns
Part 2 · its context fills with error messages
noise from recoverable errors is displacing the coordinator's research context
What you are being asked to decide
The analysis agent reports every small error to the coordinator. Which errors should it handle itself? Tests local recovery of transient failures in subagents, propagating only unresolved errors with context.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Transient error | a temporary failure such as a rate limit, likely to succeed when retried |
| Backoff with jitter | waiting a growing, slightly random time between retries |
Study: Error propagation: what a subagent reports when it fails Error taxonomy Jitter Orchestrator
Understand Foundations Mock Exam 1 · Q566's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Subagents should absorb transient failures with local retries and send the coordinator only what they cannot resolve, including the error type, what they tried and any partial results.
Connect the design to the situation
A rate-limit response that succeeds on the second attempt, reported to the coordinator anyway.
Best answer: B. Transient failures that a retry fixes should be handled locally by the subagent, and only unresolved failures should reach the coordinator, with what was tried and any partial results. Ignoring all errors at the coordinator throws away real failures along with the noise, so missing documents go unnoticed in the brief.
The decisive evidence in the stem
brief rate-limit responses that succeed on a second attempt
These errors are transient and locally recoverable, so propagating them to the coordinator only adds turns and noise.
Official objective tested: Task 5.3 · Implement error propagation strategies across multi-agent systems
What each choice would do here
A · Why this does not meet the full requirement
Make the analysis agent stop the whole brief on any rate-limit response, so the operations team can investigate the document provider before work continues.
Turns a routine retryable event into a full stop.
A rate limit that clears in seconds now stops a whole brief and pages the operations team. Deadlines slip for an event a retry would have fixed.
B · Why this meets the requirement
Let the analysis agent retry transient errors with backoff, and send the coordinator only failures it cannot resolve, with attempts and partial results.
Recovers locally and escalates only what needs the coordinator.
The analysis agent retries rate-limited calls after a short backoff, and they succeed. Only a document that keeps failing is reported, with 'rate limited, 3 attempts, 2 of 5 pages extracted'. The coordinator sees one useful report instead of many errors.
C · Why this does not meet the full requirement
Have the coordinator ignore every error from the analysis agent and continue the brief with whatever documents were analyzed successfully.
Hides real failures along with the noise.
Noise disappears, but so do real failures: a document that can never be read goes unnoticed, and the brief silently lacks it. Nobody can annotate a gap they never heard about.
D · Why this does not meet the full requirement
Give the coordinator a larger context window, so that error messages from repeated re-delegation no longer crowd out its research findings and plans.
Makes room for noise instead of removing it.
The context has more room, but the coordinator still re-delegates every transient error and spends turns on them. The waste remains and simply has more space to grow.
Check your understanding · explain the design in your own words
The analysis agent reports every small error to the coordinator. Which errors should it handle itself?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Error propagation: what a subagent reports when it fails
Study: Error propagation: what a subagent reports when it fails Error taxonomy Jitter Orchestrator
Return to Foundations Mock Exam 1 · Q566's situation and clause-by-clause explanation
Answer
**B.** Transient failures that a retry fixes should be handled locally by the subagent, and only unresolved failures should reach the coordinator, with what was tried and any partial results. Ignoring all errors at the coordinator throws away real failures along with the noise, so missing documents go unnoticed in the brief.Q567. The document analysis agent uses a generic fetch_url tool. Traces show it sometimes follows tracking links, loads paywall login pages, and once pulled a 300 MB dataset that exhausted its context. It should only load documents the search agent returned. What change fits best? (Select ONE.) A) Keep fetch_url but add a system prompt rule listing which domains and which file sizes the agent should avoid when it fetches documents. B) Wrap fetch_url in a retry policy with a 30-second timeout and a size warning, so oversized or slow downloads fail fast and the agent moves on. C) Give the agent the web search tool as well, so it can look for a better copy of a document whenever fetch_url returns a paywall login page or a tracking redirect. D) Replace fetch_url with a load_document tool that accepts only document references from the search results, checks type and size, and returns parsed text.
Understand Foundations Mock Exam 1 · Q567 · the situation and each part of the question
The real situation behind this question
Northwind's document analysis agent was given a simple fetch_url tool early on. It works, but it lets the agent go anywhere. Traces show it clicking tracking links, landing on paywall login pages, and once downloading a 300 MB dataset that used up its entire context. The agent should only open documents that the search agent already found. The team wants that boundary to hold every time.
Read the question in parts
Part 1 · uses a generic fetch_url tool
a general-purpose tool lets the agent act far outside its intended role
Part 2 · It should only load documents the search agent returned
the allowed inputs are a known list, which code can check
What you are being asked to decide
A generic fetch tool lets the agent load anything. How do you restrict it to the right documents? Tests replacing a generic tool with a constrained alternative that validates its inputs.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Constrained tool | a tool such as load_document whose code accepts only allowed inputs and rejects the rest |
| Context budget | how much text the agent can hold; one huge file can use it all up |
Study: Reuse implementation without exposing unrestricted tools Least-privilege tooling Guardrail Context budget
Understand Foundations Mock Exam 1 · Q567's answer · full reasoning and worked examples
Claude synthesized · the point, straight
When an agent's legitimate inputs are a known set, replace the generic tool with a constrained one that validates them in code. The boundary then holds by design instead of by instruction.
Connect the design to the situation
fetch_url loading a 300 MB dataset and a paywall login page.
Best answer: D. A constrained tool that accepts only search-result references and validates them in code makes the unwanted fetches impossible instead of discouraged. A prompt rule leaves the generic tool in place, so the agent can still follow tracking links or pull huge files whenever it misjudges a URL.
The decisive evidence in the stem
It should only load documents the search agent returned
The intended scope is narrow and checkable, so a purpose-built tool can enforce it rather than relying on instructions.
Official objective tested: Task 2.3 · Distribute tools appropriately across agents and configure tool choice
What each choice would do here
A · Why this does not meet the full requirement
Keep fetch_url but add a system prompt rule listing which domains and which file sizes the agent should avoid when it fetches documents.
Guides the agent but leaves the generic tool unrestricted.
The agent sees the rule but keeps a tool that fetches any URL. It must judge each link correctly; tracking redirects and huge files still get through when it misjudges them.
B · Why this does not meet the full requirement
Wrap fetch_url in a retry policy with a 30-second timeout and a size warning, so oversized or slow downloads fail fast and the agent moves on.
Fails slow fetches but still allows the wrong ones.
Large downloads may time out, but small tracking pages and login pages still load. A fast enough link to a huge file still fills the context. Timing is not the boundary the team needs.
C · Why this does not meet the full requirement
Give the agent the web search tool as well, so it can look for a better copy of a document whenever fetch_url returns a paywall login page or a tracking redirect.
Widens the agent's role into search instead of narrowing it.
The analysis agent now does search work too, which is outside its specialization and duplicates the search agent. The generic fetch_url problems, from tracking links to huge files, all remain.
D · Why this meets the requirement
Replace fetch_url with a load_document tool that accepts only document references from the search results, checks type and size, and returns parsed text.
Enforces the intended scope in the tool's own code.
load_document takes a document ID from the search results, rejects anything else, checks the content type and a size limit, and returns parsed text. Tracking links and giant datasets can no longer be fetched.
Check your understanding · explain the design in your own words
A generic fetch tool lets the agent load anything. How do you restrict it to the right documents?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Reuse implementation without exposing unrestricted tools
Study: Reuse implementation without exposing unrestricted tools Least-privilege tooling Guardrail Context budget
Return to Foundations Mock Exam 1 · Q567's situation and clause-by-clause explanation
Answer
**D.** A constrained tool that accepts only search-result references and validates them in code makes the unwanted fetches impossible instead of discouraged. A prompt rule leaves the generic tool in place, so the agent can still follow tracking links or pull huge files whenever it misjudges a URL.Q568. For a brief on e-scooter regulation, the coordinator sends the same broad query to two parallel search subagents to speed up collection. Their results overlap by about 70%, and the synthesis agent spends much of its context removing duplicate sources. What change best reduces the duplication? (Select ONE.) A) Have the coordinator partition the scope first, giving each search subagent distinct subtopics or source types, such as ordinances. B) Add a deduplication step to the synthesis agent's prompt, so that it removes repeated sources by URL and title before it starts comparing the findings. C) Run only one search subagent with a higher result limit, since two agents searching the same topic in parallel will always overlap heavily. D) Let the two search subagents message each other directly while they work, so each one can skip sources the other has already found.
Understand Foundations Mock Exam 1 · Q568 · the situation and each part of the question
The real situation behind this question
Northwind wanted faster collection, so the coordinator started running two search subagents in parallel. Both received the same query, 'e-scooter regulation in US cities'. They worked hard and found mostly the same sources. The synthesis agent now receives two lists that overlap by 70% and spends much of its context sorting out duplicates. The parallel step costs double for little extra coverage.
Read the question in parts
Part 1 · sends the same broad query to two parallel search subagents
identical assignments make overlap almost certain, whatever the search quality
Part 2 · the synthesis agent spends much of its context removing duplicate sources
the cost of duplication lands on the downstream agent with the tightest context
What you are being asked to decide
Two search agents get the same query and return mostly the same sources. How do you split their work? Tests partitioning research scope across subagents to minimize duplication.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Partitioning | giving each subagent a distinct slice of the topic or of the source types |
| Hub-and-spoke | a design where all subagent communication passes through the coordinator |
Study: Multi-agent design judgments (scenario 3 territory) Hub-and-spoke Parallelization Decomposition
Understand Foundations Mock Exam 1 · Q568's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Overlap comes from identical delegation. The coordinator should partition the scope into distinct subtopics or source types before delegating, keeping all communication through the hub.
Connect the design to the situation
Two agents searching 'e-scooter regulation' return 70% of the same articles.
Best answer: A. Duplication starts at delegation, because both subagents received the same query. Partitioning the scope by subtopic or source type makes their work complementary and keeps all communication through the coordinator. Direct subagent-to-subagent messaging breaks the hub-and-spoke design that gives the coordinator observability and control.
The decisive evidence in the stem
sends the same broad query to two parallel search subagents
The overlap is caused by identical assignments, so the fix belongs in how the coordinator divides the scope.
Official objective tested: Task 1.2 · Orchestrate multi-agent systems with coordinator-subagent patterns
What each choice would do here
A · Why this meets the requirement
Have the coordinator partition the scope first, giving each search subagent distinct subtopics or source types, such as ordinances.
Divides the scope so the agents' work is complementary.
The coordinator assigns one agent city ordinances and council records and the other safety studies and injury data. Their results barely overlap, synthesis receives complementary material, and the parallel step adds real coverage.
B · Why this does not meet the full requirement
Add a deduplication step to the synthesis agent's prompt, so that it removes repeated sources by URL and title before it starts comparing the findings.
Cleans up duplicates after the work and the context are spent.
Synthesis receives the same overlapping lists and spends context to clean them. The search agents still do duplicate work, and the parallel step still buys little additional coverage.
C · Why this does not meet the full requirement
Run only one search subagent with a higher result limit, since two agents searching the same topic in parallel will always overlap heavily.
Gives up parallel speed instead of dividing the work.
Overlap disappears, but so does the speed the team wanted. A single agent with more results also tends to return more of the same popular sources rather than different source types.
D · Why this does not meet the full requirement
Let the two search subagents message each other directly while they work, so each one can skip sources the other has already found.
Breaks hub-and-spoke routing through the coordinator.
The agents now coordinate among themselves, outside the coordinator's view. Errors and routing become hard to observe, and the coordinator can no longer control what information flows where.
Check your understanding · explain the design in your own words
Two search agents get the same query and return mostly the same sources. How do you split their work?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Multi-agent design judgments (scenario 3 territory)
Study: Multi-agent design judgments (scenario 3 territory) Hub-and-spoke Parallelization Decomposition
Return to Foundations Mock Exam 1 · Q568's situation and clause-by-clause explanation
Answer
**A.** Duplication starts at delegation, because both subagents received the same query. Partitioning the scope by subtopic or source type makes their work complementary and keeps all communication through the coordinator. Direct subagent-to-subagent messaging breaks the hub-and-spoke design that gives the coordinator observability and control.D3 · Prompting & Structured Output
Q569. Before delivery, Northwind's report agent is asked in the same session to 'review your report for unsupported claims and errors'. It almost always approves its own drafts, yet client auditors later find unsupported claims in about one brief in twelve. What change would catch more of these issues? (Select ONE.) A) Send the report and its source mappings to a separate Claude instance without the drafting context, and have it check each claim. B) Ask the report agent to review its draft three times in a row in the same session, and approve the brief only when all three reviews agree. C) Enable extended thinking for the report agent's self-review, so it reasons longer and more carefully about each claim before it approves the draft. D) Add 'be critical and skeptical of your own work, as an auditor would be' to the report agent's system prompt before the self-review runs.
Understand Foundations Mock Exam 1 · Q569 · the situation and each part of the question
The real situation behind this question
Northwind added a review step: before a brief goes out, the report agent checks its own work. The check almost always passes. Yet auditors keep finding claims the sources do not support, roughly one brief in twelve. The reviewer is the same session that wrote the report, with all its reasoning still in mind. The team wants a review that actually catches what the writer missed.
Read the question in parts
Part 1 · in the same session
the reviewer inherits the writer's reasoning, which makes it likely to agree with itself
Part 2 · It almost always approves its own drafts
the current check is not independent, so its approvals carry little information
What you are being asked to decide
The report agent approves its own drafts, but auditors still find errors. Who should do the review? Tests using an independent review instance instead of same-session self-review.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Independent instance | a separate Claude call that sees only the report and sources, not the drafting conversation |
| Self-review | asking the same session that wrote the draft to check it |
Study: Independent review and multi-pass review LLM-as-judge Extended thinking Evaluator-optimizer
Understand Foundations Mock Exam 1 · Q569's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Self-review in the same session is biased by the generator's own reasoning. Use a separate instance without that context to check the report against its sources.
Connect the design to the situation
A self-review that approves a brief later found to contain unsupported claims.
Best answer: A. A model reviewing its own work in the same session keeps the reasoning that produced the draft, so it tends to confirm rather than question it. An independent instance without that context, checking claims against the source mappings, catches more. Extended thinking gives the self-review more reasoning but the same biased starting point.
The decisive evidence in the stem
in the same session
The reviewer shares the generator's reasoning context, which is the main reason self-review misses its own unsupported claims.
Official objective tested: Task 4.6 · Design multi-instance and multi-pass review architectures
What each choice would do here
A · Why this meets the requirement
Send the report and its source mappings to a separate Claude instance without the drafting context, and have it check each claim.
Uses a reviewer free of the drafting context.
A fresh instance receives the report and the claim-source mappings, with no drafting history. It checks each claim against its cited excerpt and flags the ones the sources do not support.
B · Why this does not meet the full requirement
Ask the report agent to review its draft three times in a row in the same session, and approve the brief only when all three reviews agree.
Repeats a biased check three times.
Three reviews from the same context share the same blind spots. Agreement among them is likely and says little, so the one-in-twelve failure rate barely changes.
C · Why this does not meet the full requirement
Enable extended thinking for the report agent's self-review, so it reasons longer and more carefully about each claim before it approves the draft.
Gives the self-review more reasoning but the same bias.
The agent reasons longer, but from inside the same context that justified each claim in the first place. It tends to find more reasons to agree, so many unsupported claims still pass.
D · Why this does not meet the full requirement
Add 'be critical and skeptical of your own work, as an auditor would be' to the report agent's system prompt before the self-review runs.
Asks for skepticism without changing who reviews.
The instruction may make the self-review a little stricter, but the reviewer still holds the reasoning behind every claim. The structural reason for missed errors remains.
Check your understanding · explain the design in your own words
The report agent approves its own drafts, but auditors still find errors. Who should do the review?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Independent review and multi-pass review
Study: Independent review and multi-pass review LLM-as-judge Extended thinking Evaluator-optimizer
Return to Foundations Mock Exam 1 · Q569's situation and clause-by-clause explanation
Answer
**A.** A model reviewing its own work in the same session keeps the reasoning that produced the draft, so it tends to confirm rather than question it. An independent instance without that context, checking claims against the source mappings, catches more. Extended thinking gives the self-review more reasoning but the same biased starting point.Q570. The synthesis subagent's drafts contain claims with no citations and miss findings the document analysis agent produced. The coordinator's delegation prompt says only: 'Synthesize the findings gathered so far on transit fares.' What should the coordinator pass instead? (Select ONE.) A) A reference to the coordinator's session ID, so the synthesis subagent can load the coordinator's conversation history and read the findings there. B) A short summary of the main themes written by the coordinator, so the synthesis subagent's context stays small and focused on the big picture of the brief. C) The complete findings, structured so each claim carries its source URL, document name and page, plus the synthesis goal and quality criteria. D) A short summary of the main themes written by the coordinator, so the synthesis subagent's context stays small and focused on the big picture.
Understand Foundations Mock Exam 1 · Q570 · the situation and each part of the question
The real situation behind this question
Northwind's synthesis agent writes fluent drafts, but auditors keep finding claims without sources, and some of the document analysis agent's best findings never appear. The engineers look at what the coordinator actually sends: one sentence asking it to synthesize 'the findings gathered so far'. The synthesis agent has never seen those findings. It is filling the gap from general knowledge.
Read the question in parts
Part 1 · claims with no citations
the subagent lacks the source data needed for citations, not the willingness to cite
Part 2 · 'Synthesize the findings gathered so far on transit fares.'
the delegation passes no findings, so the subagent cannot use them
What you are being asked to decide
The synthesis agent writes uncited claims and misses findings. What must its delegation prompt contain? Tests passing complete findings with structured source metadata to a subagent explicitly.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Context isolation | a subagent starts with only its own prompt, not the coordinator's history |
| Structured findings | claims kept apart from metadata such as source URL, document name and page |
Study: Coordinator handoffs: wait, pass context, then continue Subagent handoff Context isolation Provenance
Understand Foundations Mock Exam 1 · Q570's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A subagent knows only what its prompt contains. The coordinator must pass the complete prior findings, structured with their source metadata, together with the goal and quality criteria.
Connect the design to the situation
'Synthesize the findings gathered so far' sent to an agent that has never seen those findings.
Best answer: C. Subagents do not inherit the coordinator's context; they see only what the delegation prompt contains. Passing the complete findings with source metadata in a structured form gives synthesis the content and the attribution it needs. A citation rule without the source data asks for citations the subagent has no way to produce.
The decisive evidence in the stem
'Synthesize the findings gathered so far on transit fares.'
The prompt assumes the subagent can see the gathered findings, but subagents start with only the context passed in their prompt.
Official objective tested: Task 1.3 · Configure subagent invocation, context passing, and spawning
What each choice would do here
A · Why this does not meet the full requirement
A reference to the coordinator's session ID, so the synthesis subagent can load the coordinator's conversation history and read the findings there.
Assumes a shared memory the subagent does not have.
Subagents in the Agent SDK do not read the coordinator's conversation through a session reference. The synthesis agent still starts with no findings and keeps producing uncited claims.
B · Why this does not meet the full requirement
A short summary of the main themes written by the coordinator, so the synthesis subagent's context stays small and focused on the big picture of the brief.
Demands citations without supplying the sources.
The rule makes the agent try to cite, but it has no sources in context. It may refuse, cite vaguely or invent references, which auditors will catch as a worse problem.
C · Why this meets the requirement
The complete findings, structured so each claim carries its source URL, document name and page, plus the synthesis goal and quality criteria.
Gives synthesis the full content and the attribution it needs.
The delegation contains every finding as a record such as claim, source_url, document, page and excerpt, plus the brief's goal and quality bar. Synthesis can merge them and cite each claim from the data it was given.
D · Why this does not meet the full requirement
A short summary of the main themes written by the coordinator, so the synthesis subagent's context stays small and focused on the big picture.
Loses detail and sources in the compression.
Synthesis now has themes but not the claims, numbers or sources behind them. Citations are still impossible, and the findings left out of the summary stay missing from the brief.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Delegation payload for the synthesis subagent (illustrative)
{
"goal": "Compare base fares and fare-capping policies across the 20 cities for a city council audience.",
"quality_criteria": ["every claim cites at least one source", "flag conflicting figures instead of choosing one"],
"findings": [
{"claim": "Denver base fare is 2.75", "source_url": "https://example.org/rtd-fares", "document": "RTD fare table", "page": 2, "date": "2025-07-01"},
{"claim": "Portland caps daily fares at 5.00", "source_url": "https://example.org/trimet-hop", "document": "TriMet Hop FAQ", "page": 1, "date": "2025-03-15"}
]
}Values and URLs are illustrative. Content and metadata are separate fields, so attribution survives synthesis.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The synthesis agent writes uncited claims and misses findings. What must its delegation prompt contain?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Coordinator handoffs: wait, pass context, then continue
Study: Coordinator handoffs: wait, pass context, then continue Subagent handoff Context isolation Provenance
Return to Foundations Mock Exam 1 · Q570's situation and clause-by-clause explanation
Answer
**C.** Subagents do not inherit the coordinator's context; they see only what the delegation prompt contains. Passing the complete findings with source metadata in a structured form gives synthesis the content and the attribution it needs. A citation rule without the source data asks for citations the subagent has no way to produce.Q571. The document analysis agent has two tools: read_page ('Reads a page and returns its text') and read_file ('Reads a file and returns its text'). read_file parses PDF tables; read_page handles web HTML. Traces show PDFs sent to read_page 35% of the time, losing the tables. What's the most effective first step? (Select ONE.) A) Add a system prompt rule telling the agent to use read_file for any source whose URL ends in .pdf, and to use read_page for every other source. B) Add few-shot examples of correct tool choices for PDFs and web pages to the system prompt, while keeping the two short tool descriptions unchanged. C) Remove read_page and send every source through read_file, since PDFs with fare tables are the more important source type for Northwind's briefs. D) Rename and rewrite both tools, such as fetch_web_page and parse_pdf_report, with descriptions of inputs, outputs and when to use each.
Understand Foundations Mock Exam 1 · Q571 · the situation and each part of the question
The real situation behind this question
Northwind's document analysis agent misses fare tables in about a third of PDF reports. The cause is not the parser: read_file handles tables well. The agent simply sends many PDFs to read_page, the HTML reader, which drops the tables. The tool descriptions explain why: 'reads a page' and 'reads a file' sound almost the same, and neither mentions PDFs, HTML or tables.
Read the question in parts
Part 1 · ('Reads a page and returns its text') and read_file ('Reads a file and returns its text')
minimal, overlapping descriptions are the classic cause of misrouting between similar tools
Part 2 · What's the most effective first step
the question asks for the first, most direct fix, which is the tool definitions themselves
What you are being asked to decide
Two tools have almost the same description, and the agent picks the wrong one for PDFs. What do you fix first? Tests rewriting overlapping tool names and descriptions so each tool's purpose is distinct.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Tool description | the text in a tool definition that tells the model what the tool does and when to use it |
| Tool name | the identifier the model sees; a name like parse_pdf_report signals its purpose clearly |
Study: Document identity versus words inside it Tool description Tool name Tool selection
Understand Foundations Mock Exam 1 · Q571's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Tool selection depends mainly on names and descriptions. When two tools look identical, make them distinct: clear names and descriptions with inputs, outputs and when to use each, before adding rules or examples.
Connect the design to the situation
A PDF report with fare tables sent to the HTML page reader.
Best answer: D. The model chooses tools mainly from their names and descriptions, and these two are almost identical, so misrouting is expected. Clear names and descriptions that state inputs, outputs and when to use each fix the cause. A URL-suffix rule in the prompt breaks on PDFs served without a .pdf ending and leaves the confusing descriptions in place.
The decisive evidence in the stem
('Reads a page and returns its text') and read_file ('Reads a file and returns its text')
The two descriptions are nearly identical and hide the real difference, PDF table parsing, so the model cannot choose reliably.
Official objective tested: Task 2.1 · Design effective tool interfaces with clear descriptions and boundaries
What each choice would do here
A · Why this does not meet the full requirement
Add a system prompt rule telling the agent to use read_file for any source whose URL ends in .pdf, and to use read_page for every other source.
Adds a brittle rule while leaving the confusing descriptions.
Many PDFs come from links without a .pdf ending, such as download endpoints, and some HTML pages link to PDFs. The rule misroutes those cases, and the tool descriptions still give the model no real guidance.
B · Why this does not meet the full requirement
Add few-shot examples of correct tool choices for PDFs and web pages to the system prompt, while keeping the two short tool descriptions unchanged.
Teaches by example while the tool definitions stay ambiguous.
Examples help in the cases they show, but the definitions the model reads on every call still look identical. New source types not in the examples remain likely to be misrouted.
C · Why this does not meet the full requirement
Remove read_page and send every source through read_file, since PDFs with fare tables are the more important source type for Northwind's briefs.
Breaks web sources to fix PDF routing.
Web articles and HTML pages lose their reader, so read_file must handle HTML it was not built for. A routing problem becomes a parsing problem across half the sources.
D · Why this meets the requirement
Rename and rewrite both tools, such as fetch_web_page and parse_pdf_report, with descriptions of inputs, outputs and when to use each.
Fixes the names and descriptions the model chooses from.
fetch_web_page now says it takes an HTML URL and returns article text without tables; parse_pdf_report says it takes a PDF and returns text plus tables, and to use it for any report or dataset document. The agent picks correctly from the definitions.
Check your understanding · explain the design in your own words
Two tools have almost the same description, and the agent picks the wrong one for PDFs. What do you fix first?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Document identity versus words inside it
Study: Document identity versus words inside it Tool description Tool name Tool selection
Return to Foundations Mock Exam 1 · Q571's situation and clause-by-clause explanation
Answer
**D.** The model chooses tools mainly from their names and descriptions, and these two are almost identical, so misrouting is expected. Clear names and descriptions that state inputs, outputs and when to use each fix the cause. A URL-suffix rule in the prompt breaks on PDFs served without a .pdf ending and leaves the confusing descriptions in place.Q572. Northwind keeps a local archive of 9,000 downloaded city documents. The document analysis agent must find every council-minutes file, named like minutes-2024-03.pdf.txt across many city folders, and then find which of them mention 'fare capping'. Which built-in tool sequence fits? (Select ONE.) A) Use Grep for the word 'minutes' across the archive to find the files, then Read each matching file fully to check for fare capping. B) Use Glob with a pattern such as **/minutes-*.pdf.txt to find the files by name, then Grep those files for 'fare capping'. C) Use Bash to list all 9,000 file names into one text file, then Read that listing and pick out the minutes files by inspecting the names. D) Use Read on every folder's index file to list its documents, then use Glob with the pattern 'fare capping' to locate the relevant pages.
Understand Foundations Mock Exam 1 · Q572 · the situation and each part of the question
The real situation behind this question
Northwind's archive holds thousands of documents downloaded over years: budgets, studies, ordinances and council minutes, each city in its own folder. For a fare-capping brief, the analysis agent needs every set of council minutes that discusses fare capping. The minutes follow a clear naming pattern. The agent must find them quickly, without reading thousands of irrelevant files or filling its context.
Read the question in parts
Part 1 · named like minutes-2024-03.pdf.txt
a predictable file-name pattern across folders, which is exactly what Glob matches
Part 2 · find which of them mention 'fare capping'
a content question, which is what Grep answers inside the matched files
What you are being asked to decide
Find files by name, then find a phrase inside them. Which tools, in which order? Tests choosing Glob for file-name patterns and Grep for content search.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Glob | finds files whose paths match a pattern such as **/minutes-*.pdf.txt |
| Grep | searches inside files for text such as 'fare capping' |
Study: Built-in tools: the selection criteria Glob tool Grep tool Read tool
Understand Foundations Mock Exam 1 · Q572's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Use Glob to find files by name or path pattern and Grep to search their contents. Here Glob narrows to the minutes files, then Grep finds the fare-capping mentions inside them.
Connect the design to the situation
Council minutes spread across city folders, searched for 'fare capping'.
Best answer: B. Finding files by name is Glob's job, and searching file contents is Grep's. Glob narrows the archive to the minutes files, and Grep finds the mention inside them. Grepping for 'minutes' searches contents, so it matches every document that uses the word and then reads them all, which is slow and noisy.
The decisive evidence in the stem
named like minutes-2024-03.pdf.txt across many city folders
The first step is matching a file-name pattern across directories, which Glob does, before any content search.
Official objective tested: Task 2.5 · Select and apply built-in tools (Read, Write, Edit, Bash, Grep, Glob) effectively
What each choice would do here
A · Why this does not meet the full requirement
Use Grep for the word 'minutes' across the archive to find the files, then Read each matching file fully to check for fare capping.
Uses content search to find files by name, then reads too much.
'minutes' appears inside budgets, studies and ordinances too, so Grep returns far more than the minutes files. Reading each match in full then floods the agent's context with irrelevant documents.
B · Why this meets the requirement
Use Glob with a pattern such as **/minutes-*.pdf.txt to find the files by name, then Grep those files for 'fare capping'.
Matches names with Glob, then contents with Grep.
Glob returns only the council-minutes files in every city folder. Grep searches just those files for 'fare capping' and returns the matching lines, so the agent reads only the few relevant documents.
C · Why this does not meet the full requirement
Use Bash to list all 9,000 file names into one text file, then Read that listing and pick out the minutes files by inspecting the names.
Does a name search by hand through a giant listing.
The listing works but makes the agent read 9,000 names and pattern-match them itself. Glob does this exactly and cheaply, so the extra step only adds tokens and room for error.
D · Why this does not meet the full requirement
Use Read on every folder's index file to list its documents, then use Glob with the pattern 'fare capping' to locate the relevant pages.
Swaps the tools: Glob does not search text.
Index files may not exist or be complete, and Glob matches paths, not text inside files. A Glob for 'fare capping' finds nothing useful, so the agent never locates the mentions.
Check your understanding · explain the design in your own words
Find files by name, then find a phrase inside them. Which tools, in which order?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Built-in tools: the selection criteria
Study: Built-in tools: the selection criteria Glob tool Grep tool Read tool
Return to Foundations Mock Exam 1 · Q572's situation and clause-by-clause explanation
Answer
**B.** Finding files by name is Glob's job, and searching file contents is Grep's. Glob narrows the archive to the minutes files, and Grep finds the mention inside them. Grepping for 'minutes' searches contents, so it matches every document that uses the word and then reads them all, which is slow and noisy.Q573. Northwind's coordinator needs fare-policy findings for five cities that can be researched independently. Traces show it emits one Task call per response, waits for that result, then emits the next, so collection takes about 25 minutes. How should delegation work? (Select ONE.) A) Have the coordinator emit five Task tool calls in a single response, one per city, so the subagents run in parallel. B) Use fork_session five times from the coordinator's session, so each branch researches one city while sharing the full history. C) Spawn one subagent with all five cities in its prompt, so a single delegation covers the whole set of cities at once. D) Keep sequential delegation but lower each search subagent's max_tokens, so each of the five delegations finishes more quickly.
Understand Foundations Mock Exam 1 · Q573 · the situation and each part of the question
The real situation behind this question
Northwind's coordinator is careful but slow. For a five-city fare study, it starts research on the first city, waits, then the second, and so on. Each city takes about five minutes, so the whole collection takes 25. Nothing about one city depends on another. The deadline for large briefs is tight, and the team wants the five searches to happen at once.
Read the question in parts
Part 1 · can be researched independently
no city depends on another, so the subtasks are safe to run in parallel
Part 2 · emits one Task call per response
delegating across separate turns is what forces the slow sequence
What you are being asked to decide
Five independent city searches run one after another. How do you run them at the same time? Tests spawning parallel subagents with multiple Task calls in one coordinator response.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Task tool | the Agent SDK tool the coordinator calls to spawn a subagent with its own prompt and context |
| Parallel tool calls | several tool_use blocks in one response, which the runtime can execute together |
Study: The Task tool: how subagents are actually born Subagent Parallelization tool_use
Understand Foundations Mock Exam 1 · Q573's answer · full reasoning and worked examples
Claude synthesized · the point, straight
For independent subtasks, the coordinator should emit several Task calls in one response so the subagents run in parallel. Spawning across separate turns makes the work sequential.
Connect the design to the situation
Five cities researched one by one, taking 25 minutes.
Best answer: A. Independent subtasks can run at once when the coordinator emits several Task calls in the same response; the runtime launches them in parallel and returns all results. One subagent handling five cities is still sequential work inside one context, and it loses the isolation that keeps each city's research focused.
The decisive evidence in the stem
emits one Task call per response
Spawning across separate turns forces sequential execution; parallel subagents need multiple Task calls in one response.
Official objective tested: Task 1.3 · Configure subagent invocation, context passing, and spawning
What each choice would do here
A · Why this meets the requirement
Have the coordinator emit five Task tool calls in a single response, one per city, so the subagents run in parallel.
Runs the independent subtasks at the same time.
The coordinator's single response contains five Task tool_use blocks, one per city, each with a complete prompt. The subagents run at the same time, and collection takes about as long as the slowest city.
B · Why this does not meet the full requirement
Use fork_session five times from the coordinator's session, so each branch researches one city while sharing the full history.
Copies the coordinator's history into five branches instead of delegating.
fork_session branches a conversation to explore alternatives; it is not the delegation mechanism. Each fork would carry the coordinator's whole history and still need its own orchestration.
C · Why this does not meet the full requirement
Spawn one subagent with all five cities in its prompt, so a single delegation covers the whole set of cities at once.
Bundles the work into one sequential context.
One subagent researches five cities in a row inside one context. It is no faster, and its context mixes five cities' sources, raising the risk of confusion between them.
D · Why this does not meet the full requirement
Keep sequential delegation but lower each search subagent's max_tokens, so each of the five delegations finishes more quickly.
Shaves time per call but keeps them in sequence.
Shorter outputs might make each city a little faster but could also cut findings. The five delegations still run one after another, so the total time stays close to 25 minutes.
Check your understanding · explain the design in your own words
Five independent city searches run one after another. How do you run them at the same time?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: The Task tool: how subagents are actually born
Study: The Task tool: how subagents are actually born Subagent Parallelization tool_use
Return to Foundations Mock Exam 1 · Q573's situation and clause-by-clause explanation
Answer
**A.** Independent subtasks can run at once when the coordinator emits several Task calls in the same response; the runtime launches them in parallel and returns all results. One subagent handling five cities is still sequential work inside one context, and it loses the isolation that keeps each city's research focused.Scenario 4 · Structured Data Extraction
D3 · Prompting & Structured Output
Q574. Fenwick now checks 80-page carrier rate agreements in a single request that compares every clause with invoice terms. Results are uneven: early clauses get detailed checks and later ones superficial notes, and the same fuel clause is approved in one section but flagged in another. How should you restructure the review? (Select ONE.) A) Use a model with a larger context window, so that the whole agreement fits comfortably and attention spreads evenly over all 80 pages. B) Move the instructions to the end of the prompt, after the agreement, so the model remembers the criteria when it reaches later clauses. C) Ask the model to review the agreement twice in the same request, and keep only the issues that both passes of the review agree on. D) Run focused passes over each section for local issues, then a separate integration pass that compares findings across sections for consistency.
Understand Foundations Mock Exam 1 · Q574 · the situation and each part of the question
The real situation behind this question
Fenwick's client wants every carrier rate agreement checked against how invoices are actually billed. The agreements are long, often 80 pages. Doing it in one request produces careful notes on the first clauses and a few words on the last, and sometimes the same fuel clause gets approved on page 12 and flagged on page 60. The auditors cannot rely on that.
Read the question in parts
Part 1 · in a single request that compares every clause
one pass covers the whole long document, the setup that dilutes attention
Part 2 · early clauses get detailed checks and later ones superficial notes
uneven depth across the document is a sign of attention dilution
What you are being asked to decide
A single long review gives shallow and contradictory results. How do you split it? Tests multi-pass review: per-section local passes plus a cross-section integration pass.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Multi-pass review | several focused review calls, one per section, followed by a pass that compares them |
| Attention dilution | a single pass over long input giving uneven care to different parts |
Study: Independent review and multi-pass review Prompt chaining Long-context placement Context window
Understand Foundations Mock Exam 1 · Q574's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Long single-pass reviews dilute attention and contradict themselves. Split the review into focused per-section passes and add a separate integration pass for cross-section consistency.
Connect the design to the situation
An 80-page rate agreement where page 70 gets one line of review.
Best answer: D. One pass over a very long document dilutes attention, which explains both the shallow later checks and the contradictions. Per-section passes give each part full attention, and an integration pass resolves cross-section consistency. A larger context window lets the document fit, but fitting is not the problem; attention across 80 pages in one pass is.
The decisive evidence in the stem
the same fuel clause is approved in one section but flagged in another
Contradictory findings inside one pass show attention dilution, which separate local passes plus an integration pass address.
Official objective tested: Task 4.6 · Design multi-instance and multi-pass review architectures
What each choice would do here
A · Why this does not meet the full requirement
Use a model with a larger context window, so that the whole agreement fits comfortably and attention spreads evenly over all 80 pages.
Makes room for the document but keeps one diluted pass.
The agreement already fits, so more context does not change how attention spreads over it. Later clauses still get less care, and contradictions between sections remain.
B · Why this does not meet the full requirement
Move the instructions to the end of the prompt, after the agreement, so the model remembers the criteria when it reaches later clauses.
Moves the instructions but keeps one diluted pass.
Placing the question after long documents is good practice and may help a little, but it does not give clause 70 the attention clause 3 receives. The single pass remains the bottleneck.
C · Why this does not meet the full requirement
Ask the model to review the agreement twice in the same request, and keep only the issues that both passes of the review agree on.
Repeats the diluted pass inside the same request.
Both passes run with the same diluted attention and the same context, so they share blind spots. Keeping only agreed issues drops real findings without fixing shallow coverage.
D · Why this meets the requirement
Run focused passes over each section for local issues, then a separate integration pass that compares findings across sections for consistency.
Gives each section full attention, then reconciles across sections.
Ten section passes each check their clauses against invoice terms in detail. The integration pass then sees all findings together and reconciles the fuel clause, so the result is deep and consistent.
Check your understanding · explain the design in your own words
A single long review gives shallow and contradictory results. How do you split it?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Independent review and multi-pass review
Study: Independent review and multi-pass review Prompt chaining Long-context placement Context window
Return to Foundations Mock Exam 1 · Q574's situation and clause-by-clause explanation
Answer
**D.** One pass over a very long document dilutes attention, which explains both the shallow later checks and the contradictions. Per-section passes give each part full attention, and an integration pass resolves cross-section consistency. A larger context window lets the document fit, but fitting is not the problem; attention across 80 pages in one pass is.D3 · Prompting & Structured Output
Q575. Fenwick's contract says every backlog document must be extracted within 36 hours of arrival. Documents arrive around the clock, and the backlog runs on the Message Batches API, which can take up to 24 hours to finish a batch. How often must the team submit batches to guarantee the 36-hour limit? (Select ONE.) A) At least every 12 hours, because a document waits at most 12 hours for submission plus up to 24 hours of processing. B) Whenever 10,000 documents have accumulated, since large batches process most efficiently and arrival volume is fairly steady. C) Every 36 hours, matching the contract window, so each batch contains exactly one contract period's worth of new documents. D) Once a day at a fixed time, since most batches finish in far less than 24 hours and the remaining margin covers the rest.
Understand Foundations Mock Exam 1 · Q575 · the situation and each part of the question
The real situation behind this question
Fenwick moved its backlog to the Message Batches API to cut cost, and the client contract promises extraction within 36 hours of arrival. Batches usually finish quickly, but the API only promises completion within 24 hours. The operations lead must choose a submission schedule that keeps the promise even on the worst day, when a document arrives just after a batch was sent.
Read the question in parts
Part 1 · within 36 hours of arrival
the total budget from arrival to result that the schedule must never exceed
Part 2 · can take up to 24 hours to finish a batch
the worst-case processing time the schedule must assume, not the typical one
What you are being asked to decide
Batches can take 24 hours and the contract allows 36. How often must batches be submitted? Tests calculating batch submission frequency from an SLA and the batch processing window.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Batch processing window | the time the Message Batches API may take to finish a batch, up to 24 hours |
| SLA | the promised maximum time, here 36 hours from a document's arrival to its extraction |
Study: Message Batches API: the cost/latency lever Batch API SLA design Latency
Understand Foundations Mock Exam 1 · Q575's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Work from the worst case: maximum wait before submission plus the maximum 24-hour processing window must fit inside the SLA. With 36 hours allowed, submit at least every 12 hours.
Connect the design to the situation
A document arriving one minute after a submission, in the worst case.
Best answer: A. The guarantee must hold in the worst case: a document arriving just after a submission waits a full interval, then the batch may take the full 24 hours. With 36 hours allowed, the interval can be at most 12 hours. Daily submission can mean 24 hours of waiting plus 24 of processing, 48 hours, and relying on typical batch speed is not a guarantee.
The decisive evidence in the stem
can take up to 24 hours to finish a batch
The SLA calculation must assume the maximum processing time, which leaves 12 hours for waiting before submission.
Official objective tested: Task 4.5 · Design efficient batch processing strategies
What each choice would do here
A · Why this meets the requirement
At least every 12 hours, because a document waits at most 12 hours for submission plus up to 24 hours of processing.
Leaves exactly enough room for the worst case.
Submitting every 12 hours means no document waits more than 12 hours. Add the maximum 24 hours of processing and the worst case is 36 hours, so the contract holds on every day.
B · Why this does not meet the full requirement
Whenever 10,000 documents have accumulated, since large batches process most efficiently and arrival volume is fairly steady.
Ties submission to volume, so waiting time is unbounded.
On slow days, 10,000 documents may take far longer than 12 hours to accumulate, so the waiting time has no upper bound. The guarantee fails exactly when volume dips.
C · Why this does not meet the full requirement
Every 36 hours, matching the contract window, so each batch contains exactly one contract period's worth of new documents.
Can take up to 60 hours in the worst case.
A document can wait up to 36 hours just for submission, then up to 24 hours of processing, about 60 hours in total. The contract window is used up before processing even starts.
D · Why this does not meet the full requirement
Once a day at a fixed time, since most batches finish in far less than 24 hours and the remaining margin covers the rest.
Relies on typical speed, not the worst case; up to 48 hours.
A document arriving right after the daily submission waits about 24 hours, then the batch may take 24 more. That is 48 hours, well past the contract, even if most days look fine.
Check your understanding · explain the design in your own words
Batches can take 24 hours and the contract allows 36. How often must batches be submitted?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Message Batches API: the cost/latency lever
Study: Message Batches API: the cost/latency lever Batch API SLA design Latency
Return to Foundations Mock Exam 1 · Q575's situation and clause-by-clause explanation
Answer
**A.** The guarantee must hold in the worst case: a document arriving just after a submission waits a full interval, then the batch may take the full 24 hours. With 36 hours allowed, the interval can be at most 12 hours. Daily submission can mean 24 hours of waiting plus 24 of processing, 48 hours, and relying on typical batch speed is not a guarantee.Q576. Fenwick's extraction reaches 99.3% field accuracy overall on last month's audited sample, and management wants to stop human review of high-confidence output. Scanned fuel-surcharge notices are 6% of volume and barely appeared in that sample. What should happen before review is reduced? (Select ONE.) A) Reduce review now, since 99.3% overall already exceeds the client's 99% requirement and confidence filtering catches the rare errors left. B) Raise the confidence threshold for skipping review from 0.90 to 0.97, so only the most confident extractions bypass the auditors. C) Measure accuracy by document type and field on a labeled set with enough scanned notices, and keep stratified sampling of high-confidence output afterwards. D) Keep full human review of every document indefinitely, since any automation risks missing errors that auditors would otherwise catch.
Understand Foundations Mock Exam 1 · Q576 · the situation and each part of the question
The real situation behind this question
Fenwick's management sees 99.3% field accuracy and wants to cut the cost of human review. The number comes from last month's audit sample, which was mostly typed invoices. Scanned surcharge notices, a messy 6% of volume, hardly appeared. If extraction is weak on those notices, the overall number would barely show it, and the client's 99% requirement may fail exactly where nobody looked.
Read the question in parts
Part 1 · 99.3% field accuracy overall
an aggregate metric that can mask poor performance in a small segment
Part 2 · Scanned fuel-surcharge notices are 6% of volume
a distinct segment large enough to matter and small enough to hide in the average
What you are being asked to decide
Overall accuracy looks great, but one document type was hardly tested. Can review be reduced? Tests validating accuracy by segment and keeping stratified sampling before automating.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Stratified sampling | sampling separately within each document type so small segments are measured too |
| Segment accuracy | accuracy measured per document type and field, not only overall |
Study: Confidence calibration, stratified sampling, human review routing Stratified sampling Calibration HITL
Understand Foundations Mock Exam 1 · Q576's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Aggregate accuracy can hide weak segments. Validate accuracy by document type and field before reducing review, then keep stratified sampling of high-confidence output to catch new error patterns.
Connect the design to the situation
Scanned surcharge notices, 6% of volume, nearly missing from the audit sample.
Best answer: C. An aggregate figure can hide a weak segment, and the scanned notices were barely measured. Accuracy must be checked per document type and field before automating, and stratified sampling must continue to catch new error patterns. Reducing review on the overall number assumes every segment performs like the average, which nobody has shown.
The decisive evidence in the stem
barely appeared in that sample
One segment is unmeasured, so the overall 99.3% says little about its accuracy; segment-level validation is required first.
Official objective tested: Task 5.5 · Design human review workflows and confidence calibration
What each choice would do here
A · Why this does not meet the full requirement
Reduce review now, since 99.3% overall already exceeds the client's 99% requirement and confidence filtering catches the rare errors left.
Trusts an average that may hide a weak segment.
If scanned notices run at, say, 90% accuracy, they barely move the average but produce thousands of bad records a year. Confidence filtering is not yet calibrated for that segment either.
B · Why this does not meet the full requirement
Raise the confidence threshold for skipping review from 0.90 to 0.97, so only the most confident extractions bypass the auditors.
Tunes a threshold without knowing segment accuracy.
A higher threshold sends fewer documents past review, but nobody knows whether 0.97 means the same thing for scanned notices as for typed invoices. The segment is still unmeasured.
C · Why this meets the requirement
Measure accuracy by document type and field on a labeled set with enough scanned notices, and keep stratified sampling of high-confidence output afterwards.
Validates every segment and keeps measuring after automation.
A labeled set with enough scanned notices shows accuracy per type and field. If every segment clears 99%, review drops for high-confidence output, and a stratified sample keeps checking each segment for new error patterns.
D · Why this does not meet the full requirement
Keep full human review of every document indefinitely, since any automation risks missing errors that auditors would otherwise catch.
Ignores the evidence that most output is accurate.
Auditors keep checking documents the system extracts correctly, so the cost stays high with little benefit. Stopping all automation is an overreaction to an unmeasured segment.
Check your understanding · explain the design in your own words
Overall accuracy looks great, but one document type was hardly tested. Can review be reduced?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Confidence calibration, stratified sampling, human review routing
Study: Confidence calibration, stratified sampling, human review routing Stratified sampling Calibration HITL
Return to Foundations Mock Exam 1 · Q576's situation and clause-by-clause explanation
Answer
**C.** An aggregate figure can hide a weak segment, and the scanned notices were barely measured. Accuracy must be checked per document type and field before automating, and stratified sampling must continue to catch new error patterns. Reducing review on the overall number assumes every segment performs like the average, which nobody has shown.D3 · Prompting & Structured Output
Q577. A Fenwick batch of 25,000 documents completes with 310 failed requests. Most failures are 140-page bills of lading that exceeded the context limit. Each request carried a custom_id set to its document ID. What should the team do next? (Select ONE.) A) Resubmit the 310 failed documents unchanged, since batch failures are usually transient and a second attempt will probably succeed. B) Use the custom_id values to resubmit only the 310 failed documents, splitting the oversized bills of lading into chunks before resubmission. C) Resubmit the entire batch of 25,000 documents, since partial results could be inconsistent with a later separate rerun of only the 310 failed ones. D) Move the 310 failed documents to the synchronous API with the same full content, since synchronous requests accept larger inputs.
Understand Foundations Mock Exam 1 · Q577 · the situation and each part of the question
The real situation behind this question
Fenwick's latest backlog batch went well except for 310 documents. Looking at the errors, almost all are enormous bills of lading, some 140 pages long, that were too large for a single request. Because every request was tagged with its document ID as custom_id, the team knows exactly which documents failed. They need to finish the job without wasting money or repeating the error.
Read the question in parts
Part 1 · Most failures are 140-page bills of lading that exceeded the context limit
the cause is known and structural, so the input must change
Part 2 · Each request carried a custom_id set to its document ID
the failed documents can be identified exactly and resubmitted alone
What you are being asked to decide
310 of 25,000 batch requests failed because the documents were too long. What next? Tests resubmitting only failed batch items by custom_id, with the cause fixed.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| custom_id | the identifier on each batch request that links it to its result, here the document ID |
| Chunking | splitting a long document into parts that each fit within the context limit |
Study: Message Batches API: the cost/latency lever Batch API Chunking strategy Context window
Understand Foundations Mock Exam 1 · Q577's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Use custom_id to find and resubmit only the failed requests, and fix the cause first. For context-limit failures, that means chunking the oversized documents before resubmission.
Connect the design to the situation
A 140-page bill of lading that does not fit in one request.
Best answer: B. custom_id identifies exactly which requests failed, so only those need resubmission, and the cause, too much input, must be fixed by chunking. Resubmitting them unchanged repeats a deterministic failure: the documents are still too long for the context window.
The decisive evidence in the stem
exceeded the context limit
The failure cause is the input size, so the resubmitted requests must be modified, not just retried.
Official objective tested: Task 4.5 · Design efficient batch processing strategies
What each choice would do here
A · Why this does not meet the full requirement
Resubmit the 310 failed documents unchanged, since batch failures are usually transient and a second attempt will probably succeed.
Repeats a failure that is not transient.
The same oversized documents exceed the same context limit. The resubmission fails the same way, and the team loses another processing window before discovering it.
B · Why this meets the requirement
Use the custom_id values to resubmit only the 310 failed documents, splitting the oversized bills of lading into chunks before resubmission.
Retries only the failures, with the cause fixed.
The team selects the 310 custom_ids from the results file, splits each oversized bill of lading into page ranges that fit, and submits a small new batch. The chunk results are merged per document afterwards.
C · Why this does not meet the full requirement
Resubmit the entire batch of 25,000 documents, since partial results could be inconsistent with a later separate rerun of only the 310 failed ones.
Reprocesses 24,690 documents that already succeeded.
The 24,690 successful results are thrown away and paid for again, and the 310 long documents fail again because nothing changed about their size or how they are split.
D · Why this does not meet the full requirement
Move the 310 failed documents to the synchronous API with the same full content, since synchronous requests accept larger inputs.
Changes the API but not the input size.
The context limit belongs to the model, not to the batch interface, so a 140-page document that did not fit still does not fit. The team pays the synchronous rate for the same error.
Check your understanding · explain the design in your own words
310 of 25,000 batch requests failed because the documents were too long. What next?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Message Batches API: the cost/latency lever
Study: Message Batches API: the cost/latency lever Batch API Chunking strategy Context window
Return to Foundations Mock Exam 1 · Q577's situation and clause-by-clause explanation
Answer
**B.** custom_id identifies exactly which requests failed, so only those need resubmission, and the cause, too much input, must be fixed by chunking. Resubmitting them unchanged repeats a deterministic failure: the documents are still too long for the context window.D3 · Prompting & Structured Output
Q578. Fenwick's flag output covers five categories. Auditors confirm 90% of 'duplicate invoice' and 'rate above contract' flags but only 8% of 'unusual accessorial charge' flags, and they now distrust the whole flag list. You need time to rework that category's criteria. What should you do now? (Select ONE.) A) Lower the reporting threshold for all five categories at once, so that the model reports fewer flags overall across every category. B) Keep all five categories, but sort each invoice's flags so the high-precision categories always appear first and the noisy one appears last in the list. C) Temporarily stop emitting 'unusual accessorial charge' flags to restore trust in the accurate categories, while you rewrite and test its criteria. D) Add a disclaimer to every 'unusual accessorial charge' flag saying it may be unreliable, and keep sending it to auditors while the prompt is reworked.
Understand Foundations Mock Exam 1 · Q578 · the situation and each part of the question
The real situation behind this question
Fenwick's flagging works well in places: when Claude says an invoice is a duplicate or above the contracted rate, auditors agree nine times in ten. But the 'unusual accessorial charge' category is almost always wrong, and it produces many flags. Auditors now distrust every flag. Fixing that category's criteria will take a couple of weeks of testing. The team must decide what auditors see in the meantime.
Read the question in parts
Part 1 · only 8% of 'unusual accessorial charge' flags
one category has very low precision and drives most of the noise
Part 2 · You need time to rework that category's criteria
an immediate step is needed before the improved criteria are ready
What you are being asked to decide
One flag category is mostly wrong and spoils trust in the others. What do you do while you fix it? Tests temporarily disabling a high-false-positive category to restore trust.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Precision | the share of flags auditors confirm as real; 90% for two categories, 8% for one |
| Regression test | re-running a labeled set to check that reworked criteria do not make results worse |
Study: Explicit criteria: say what to report and what to skip Evaluation metrics Regression Feedback loop architecture
Understand Foundations Mock Exam 1 · Q578's answer · full reasoning and worked examples
Claude synthesized · the point, straight
When one category's false positives poison trust in the rest, disable it temporarily and fix its criteria. That protects the value of the accurate categories in the meantime.
Connect the design to the situation
'Unusual accessorial charge' flags confirmed only 8% of the time.
Best answer: C. One noisy category is damaging trust in categories that are accurate. Turning that category off temporarily restores trust in the 90% categories while its criteria are fixed. A disclaimer keeps the noise in the list and asks auditors to filter it mentally, which is what is already eroding their trust.
The decisive evidence in the stem
they now distrust the whole flag list
A high-false-positive category is undermining confidence in accurate categories, so removing it for now protects the useful output.
Official objective tested: Task 4.1 · Design prompts with explicit criteria to improve precision and reduce false positives
What each choice would do here
A · Why this does not meet the full requirement
Lower the reporting threshold for all five categories at once, so that the model reports fewer flags overall across every category.
Cuts flags everywhere, including in accurate categories.
The accurate categories lose some real findings, while the noisy category may still produce many false flags. The problem is concentrated in one category, so a global change is the wrong lever.
B · Why this does not meet the full requirement
Keep all five categories, but sort each invoice's flags so the high-precision categories always appear first and the noisy one appears last in the list.
Reorders the list but keeps the noisy category in it.
The noisy flags still appear on every invoice, just lower in the list. Auditors keep seeing mostly wrong flags and keep distrusting the list as a whole.
C · Why this meets the requirement
Temporarily stop emitting 'unusual accessorial charge' flags to restore trust in the accurate categories, while you rewrite and test its criteria.
Removes the noise now and fixes the category properly.
The pipeline stops producing the low-precision category for now. Auditors see only categories confirmed 90% of the time, trust recovers, and the reworked criteria return after testing against labeled invoices.
D · Why this does not meet the full requirement
Add a disclaimer to every 'unusual accessorial charge' flag saying it may be unreliable, and keep sending it to auditors while the prompt is reworked.
Labels the noise but still sends it to auditors.
Auditors must still read and dismiss the unreliable flags, now with a warning attached. The noise and the time cost remain, and the warning confirms that the list is not trustworthy.
Check your understanding · explain the design in your own words
One flag category is mostly wrong and spoils trust in the others. What do you do while you fix it?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Explicit criteria: say what to report and what to skip
Study: Explicit criteria: say what to report and what to skip Evaluation metrics Regression Feedback loop architecture
Return to Foundations Mock Exam 1 · Q578's situation and clause-by-clause explanation
Answer
**C.** One noisy category is damaging trust in categories that are accurate. Turning that category off temporarily restores trust in the 90% categories while its criteria are fixed. A disclaimer keeps the noise in the list and asks auditors to filter it mentally, which is what is already eroding their trust.Q579. An engineer proposes replacing Fenwick's processing with an autonomous agent that decides at runtime which steps to run for each document. Today every document goes through the same steps (classify, extract, validate totals, normalize units, load), and the order never changes. Which design should you keep or adopt? (Select ONE.) A) Merge all five steps into one large prompt, so the model handles classification, extraction, validation and loading in a single call. B) Run the five steps in parallel for each document, since they are independent tasks, and merge their outputs before the load step. C) Adopt the autonomous agent, since letting the model choose steps per document adapts better to the wide variety of carrier layouts. D) Keep a fixed sequential prompt chain with checks between stages, and reserve dynamic decomposition for open-ended investigation tasks.
Understand Foundations Mock Exam 1 · Q579 · the situation and each part of the question
The real situation behind this question
Fenwick's pipeline is boring in a good way: every document is classified, extracted, checked, normalized and loaded, in that order. An engineer excited about agents wants to let a model decide the steps per document, arguing that carrier layouts vary so much. The team lead must decide whether runtime planning adds anything when the process itself never varies from one document to the next.
Read the question in parts
Part 1 · decides at runtime which steps to run
the proposal adds dynamic planning, which costs predictability and testing effort
Part 2 · the order never changes
the workflow is predictable, the classic fit for a fixed prompt chain
What you are being asked to decide
Every document follows the same five steps. Should an agent choose the steps at runtime? Tests choosing a fixed prompt chain for predictable workflows over dynamic decomposition.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Prompt chaining | a fixed sequence of model calls where each step's output feeds the next |
| Dynamic decomposition | an agent deciding the next subtasks at runtime from what it finds |
Study: Workflows vs agents: Anthropic's decision rule Prompt chaining Workflow Agentic system
Understand Foundations Mock Exam 1 · Q579's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Predictable, fixed-order work belongs in a prompt chain with checks between stages. Reserve runtime decomposition for open-ended tasks whose next step depends on intermediate findings.
Connect the design to the situation
Classify, extract, validate totals, normalize units, load, in the same order for every document.
Best answer: D. When the steps and their order are known and stable, a fixed prompt chain is simpler, cheaper and easier to test, and checks between stages catch errors early. Dynamic decomposition pays off when the next step depends on what is discovered, which is not the case here. Layout variety affects how each step extracts, not which steps run.
The decisive evidence in the stem
the order never changes
A predictable, fixed sequence is the condition for a prompt chain rather than runtime-decided decomposition.
Official objective tested: Task 1.6 · Design task decomposition strategies for complex workflows
What each choice would do here
A · Why this does not meet the full requirement
Merge all five steps into one large prompt, so the model handles classification, extraction, validation and loading in a single call.
Loses the focus and checks of separate steps.
One prompt does five jobs at once, losing focused instructions per step and the chance to validate between steps. Errors from extraction flow straight into loading without a check.
B · Why this does not meet the full requirement
Run the five steps in parallel for each document, since they are independent tasks, and merge their outputs before the load step.
Ignores that each step needs the previous step's output.
Validation needs extracted values and loading needs validated, normalized data, so the steps depend on each other. Running them in parallel would validate and load before there is anything to check.
C · Why this does not meet the full requirement
Adopt the autonomous agent, since letting the model choose steps per document adapts better to the wide variety of carrier layouts.
Adds autonomy and cost to a sequence that never changes.
Every document now pays for planning, results become harder to test and reproduce, and a model may skip validation on a document it judges simple. Layout variety was already handled inside extraction.
D · Why this meets the requirement
Keep a fixed sequential prompt chain with checks between stages, and reserve dynamic decomposition for open-ended investigation tasks.
Fits a predictable sequence and keeps open-ended work dynamic.
The chain stays: classify, extract, validate, normalize, load, with a gate after validation that sends failures to retry or review. Dynamic agents remain available for dispute investigations whose steps cannot be known upfront.
Check your understanding · explain the design in your own words
Every document follows the same five steps. Should an agent choose the steps at runtime?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Workflows vs agents: Anthropic's decision rule
Study: Workflows vs agents: Anthropic's decision rule Prompt chaining Workflow Agentic system
Return to Foundations Mock Exam 1 · Q579's situation and clause-by-clause explanation
Answer
**D.** When the steps and their order are known and stable, a fixed prompt chain is simpler, cheaper and easier to test, and checks between stages catch errors early. Dynamic decomposition pays off when the next step depends on what is discovered, which is not the case here. Layout variety affects how each step extracts, not which steps run.D3 · Prompting & Structured Output
Q580. Besides extracting fields, Fenwick asks Claude to flag 'anything suspicious' on each invoice for auditors, adding 'only flag high-confidence issues.' Auditors dismiss 62% of the flags, mostly normal fuel surcharges and rounding differences under $1, and have started ignoring flags altogether. What change best improves precision? (Select ONE.) A) Replace the vague request with explicit categories to flag, such as duplicate invoice numbers, and list what to skip, such as rounding under $1. B) Have a second Claude call review every flag and remove any it considers doubtful before the flags reach the auditors' queue. C) Strengthen the instruction to 'be very conservative and flag only issues you are certain about', and repeat it at both the start and end of the prompt. D) Ask Claude to attach a confidence score to each flag, and show auditors only the flags scored above 0.9 to bring the dismissal rate down.
Understand Foundations Mock Exam 1 · Q580 · the situation and each part of the question
The real situation behind this question
Fenwick's auditors were excited when Claude started flagging suspicious invoices. Weeks later, they barely look. Six of every ten flags are nothing: a normal fuel surcharge, a few cents of rounding. The prompt only says 'flag anything suspicious, only high-confidence issues'. The auditors need flags they can trust, or the real problems among them will be ignored along with the noise.
Read the question in parts
Part 1 · flag 'anything suspicious'
the request gives no concrete definition of what an issue is, so the model guesses
Part 2 · have started ignoring flags altogether
false positives are destroying trust, so precision must improve quickly
What you are being asked to decide
Most flags are false alarms about normal charges. How do you make the flags precise? Tests replacing vague confidence instructions with explicit report and skip criteria.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Explicit criteria | named categories of issues to report and to skip, instead of a general 'be careful' instruction |
| Calibration | whether a confidence number matches real accuracy; here it does not reliably |
Study: Explicit criteria: say what to report and what to skip System prompt Calibration Prompting technique choice
Understand Foundations Mock Exam 1 · Q580's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Precision improves when the prompt defines categories to report and to skip. 'Suspicious' and 'high-confidence' are not criteria, and self-reported confidence does not replace them.
Connect the design to the situation
A normal 11% fuel surcharge flagged as 'suspicious'.
Best answer: A. Vague goals like 'suspicious' and 'high-confidence' do not tell the model where the line is, so precision stays low. Explicit categories to report and to skip draw that line. Self-reported confidence filtering is the tempting alternative, but the model's confidence is not calibrated to what auditors consider a real issue, so normal surcharges can still score high.
The decisive evidence in the stem
mostly normal fuel surcharges and rounding differences under $1
The false positives fall into a few identifiable categories, which explicit skip criteria in the prompt can exclude directly.
Official objective tested: Task 4.1 · Design prompts with explicit criteria to improve precision and reduce false positives
What each choice would do here
A · Why this meets the requirement
Replace the vague request with explicit categories to flag, such as duplicate invoice numbers, and list what to skip, such as rounding under $1.
Defines what counts as an issue and what does not.
The prompt lists what to report (duplicate invoice numbers, rates above the contract, charges for services not on the bill of lading) and what to skip (contracted fuel surcharges, rounding under $1). Flags now match what auditors care about.
B · Why this does not meet the full requirement
Have a second Claude call review every flag and remove any it considers doubtful before the flags reach the auditors' queue.
Adds a second judgment with the same unclear standard.
The second call faces the same vague standard, so it removes flags inconsistently. It adds cost and latency, and auditors still see normal surcharges whenever the reviewer judges them doubtful but not wrong.
C · Why this does not meet the full requirement
Strengthen the instruction to 'be very conservative and flag only issues you are certain about', and repeat it at both the start and end of the prompt.
Repeats the vague instruction more loudly.
The words still do not say what counts as suspicious. The model may flag a little less, but the line between real issues and normal charges is still undefined, so the same categories keep appearing.
D · Why this does not meet the full requirement
Ask Claude to attach a confidence score to each flag, and show auditors only the flags scored above 0.9 to bring the dismissal rate down.
Filters on a self-reported number that is not calibrated.
Some noise disappears, but the model's confidence is not tied to what auditors consider an issue. Normal surcharges flagged with high confidence remain, and real issues with lower scores are hidden.
Check your understanding · explain the design in your own words
Most flags are false alarms about normal charges. How do you make the flags precise?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Explicit criteria: say what to report and what to skip
Study: Explicit criteria: say what to report and what to skip System prompt Calibration Prompting technique choice
Return to Foundations Mock Exam 1 · Q580's situation and clause-by-clause explanation
Answer
**A.** Vague goals like 'suspicious' and 'high-confidence' do not tell the model where the line is, so precision stays low. Explicit categories to report and to skip draw that line. Self-reported confidence filtering is the tempting alternative, but the model's confidence is not calibrated to what auditors consider a real issue, so normal surcharges can still score high.D3 · Prompting & Structured Output
Q581. Fenwick classifies each document as invoice, bill_of_lading or surcharge_notice before extraction. Carriers increasingly send combined documents, such as a bill of lading with a charges table attached, and classification of these varies from run to run. Prose rules for combined documents have not helped. What should you add? (Select ONE.) A) Few-shot examples of combined documents showing the chosen type and a short reason it beats the plausible alternative, so the model generalizes. B) A new enum value for every combined layout seen so far, so that each carrier's combined document receives its own exact and stable classification. C) A higher temperature for the classification call, followed by a majority vote across five runs to choose the final document type. D) A rule in code that classifies any document containing a charges table as an invoice, applied before the model sees the document.
Understand Foundations Mock Exam 1 · Q581 · the situation and each part of the question
The real situation behind this question
More of Fenwick's carriers now send one PDF that is both a bill of lading and a bill: the shipment details plus a charges table. The classifier sometimes calls it an invoice, sometimes a bill of lading, and the choice decides which extraction schema runs. Written rules about combined documents have not stabilized it, and every week another carrier invents a new combined layout.
Read the question in parts
Part 1 · Carriers increasingly send combined documents
new ambiguous layouts keep appearing, so the fix must generalize beyond the known ones
Part 2 · Prose rules for combined documents have not helped
written instructions are insufficient for this judgment, pointing to examples
What you are being asked to decide
Mixed documents get different labels on different runs. How do you make the classification consistent? Tests few-shot examples that show reasoning for ambiguous classification cases.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Ambiguous case | a document that fits two labels plausibly, such as a bill of lading with charges |
| Enum | a fixed list of allowed values, here the three document types |
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Closed schema Temperature
Understand Foundations Mock Exam 1 · Q581's answer · full reasoning and worked examples
Claude synthesized · the point, straight
For ambiguous cases, give two to four few-shot examples that show the chosen label and why it beats the alternative. The reasoning lets the model generalize to layouts it has never seen.
Connect the design to the situation
A bill of lading with an attached charges table labeled invoice on one run and bill_of_lading on the next.
Best answer: A. Ambiguous cases are where few-shot examples help most, especially when each example explains why one label was chosen over a plausible one; that reasoning lets the model handle new combined layouts. A new enum value per layout chases the cases seen so far and fails on the next carrier's format.
The decisive evidence in the stem
classification of these varies from run to run
Inconsistent judgment on ambiguous inputs is the problem few-shot examples with reasoning are designed to stabilize.
Official objective tested: Task 4.2 · Apply few-shot prompting to improve output consistency and quality
What each choice would do here
A · Why this meets the requirement
Few-shot examples of combined documents showing the chosen type and a short reason it beats the plausible alternative, so the model generalizes.
Shows the judgment and its reason so it generalizes.
Three examples show a combined document, the type chosen, and why: 'classify as invoice when the charges table includes a total due and payment terms; otherwise bill_of_lading'. The model applies the same reasoning to new layouts.
B · Why this does not meet the full requirement
A new enum value for every combined layout seen so far, so that each carrier's combined document receives its own exact and stable classification.
Chases known layouts and breaks on the next new one.
The schema grows with each carrier, extraction must handle more types, and next week's layout still has no value. The ambiguity is renamed rather than resolved.
C · Why this does not meet the full requirement
A higher temperature for the classification call, followed by a majority vote across five runs to choose the final document type.
Adds randomness and cost instead of guidance.
More randomness makes each run less consistent, and five runs cost five times as much. A majority vote picks the most common guess, which is still a guess without any guidance.
D · Why this does not meet the full requirement
A rule in code that classifies any document containing a charges table as an invoice, applied before the model sees the document.
Applies a blunt rule that misclassifies many bills of lading.
Every bill of lading with a charges table becomes an invoice, including ones whose purpose is shipment proof. The rule is consistent but often wrong, and the wrong extraction schema runs on those documents.
Check your understanding · explain the design in your own words
Mixed documents get different labels on different runs. How do you make the classification consistent?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Few-shot examples for ambiguous cases and varied documents
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Closed schema Temperature
Return to Foundations Mock Exam 1 · Q581's situation and clause-by-clause explanation
Answer
**A.** Ambiguous cases are where few-shot examples help most, especially when each example explains why one label was chosen over a plausible one; that reasoning lets the model handle new combined layouts. A new enum value per layout chases the cases seen so far and fails on the next carrier's format.Q582. Each month, Fenwick asks Claude to write a carrier performance summary from 40 per-carrier extraction reports joined into one long input. Auditors notice that problems for carriers in the middle of the input are often missing from the summary, while the first and last carriers are covered well. What change best addresses this? (Select ONE.) A) Ask the model in the prompt to read the whole input carefully and to give equal attention to every one of the 40 carriers in the reports. B) Sort the 40 reports alphabetically by carrier name, so the order is predictable and auditors can check the summary's coverage more easily. C) Put a key-findings summary of all carriers at the start of the input, and give each detailed report its own section header. D) Increase max_tokens for the summary request, so the model has room to write about every carrier instead of cutting the summary short.
Understand Foundations Mock Exam 1 · Q582 · the situation and each part of the question
The real situation behind this question
Fenwick's monthly carrier summary goes to the client's logistics director. It is built from 40 reports pasted one after another. Auditors compared the summary with the reports and found a pattern: the first few and last few carriers are covered well, but serious issues for carriers in the middle often vanish. One mid-list carrier's double-billing problem was missed two months in a row.
Read the question in parts
Part 1 · joined into one long input
a long concatenated input of 40 reports is exactly where position effects appear
Part 2 · while the first and last carriers are covered well
coverage depends on position in the input, the typical signature of lost-in-the-middle
What you are being asked to decide
Carriers in the middle of a long input are skipped in the summary. How do you fix the input? Tests mitigating position effects with a leading findings summary and section headers.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Lost in the middle | the tendency to under-use information in the middle of a long input |
| Section headers | explicit labels, such as one tag per carrier, that make each part easy to find |
Study: Lost in the middle: position effects Long-context placement XML tags max_tokens
Understand Foundations Mock Exam 1 · Q582's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Long inputs lose middle content. Lead with a key-findings summary that covers every carrier, and organize the details under explicit section headers, so position no longer decides what gets reported.
Connect the design to the situation
Carrier 21 of 40 has a major billing issue that never appears in the summary.
Best answer: C. Models tend to use the beginning and end of long inputs more reliably than the middle. A findings digest at the top brings every carrier's key issues into the strong position, and clear section headers make the details easy to locate. A request to pay equal attention does not change the position effect itself.
The decisive evidence in the stem
problems for carriers in the middle of the input are often missing
Missing middle content with well-covered edges is the lost-in-the-middle pattern, which input structure and placement can mitigate.
Official objective tested: Task 5.1 · Manage conversation context to preserve critical information across long interactions
What each choice would do here
A · Why this does not meet the full requirement
Ask the model in the prompt to read the whole input carefully and to give equal attention to every one of the 40 carriers in the reports.
Asks for attention without changing the structure.
The instruction is reasonable, but it does not change how the model weighs a long input. Middle carriers remain the most likely to be missed.
B · Why this does not meet the full requirement
Sort the 40 reports alphabetically by carrier name, so the order is predictable and auditors can check the summary's coverage more easily.
Changes which carriers are in the middle, not the effect.
Alphabetical order is easier to read, but some carriers still sit in the middle and still get dropped. The effect simply moves to different names.
C · Why this meets the requirement
Put a key-findings summary of all carriers at the start of the input, and give each detailed report its own section header.
Moves key findings to the strong position and labels the details.
The input opens with a digest such as 'Carrier 21: double billing on 14 invoices', then each full report sits under its own header. The summary covers every carrier's key issue, and details are easy to find.
D · Why this does not meet the full requirement
Increase max_tokens for the summary request, so the model has room to write about every carrier instead of cutting the summary short.
Allows a longer answer but does not fix what is overlooked.
If the summary were being cut off, the last carriers would be missing, not the middle ones. More output room does not make the model use middle content better.
Check your understanding · explain the design in your own words
Carriers in the middle of a long input are skipped in the summary. How do you fix the input?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Lost in the middle: position effects
Study: Lost in the middle: position effects Long-context placement XML tags max_tokens
Return to Foundations Mock Exam 1 · Q582's situation and clause-by-clause explanation
Answer
**C.** Models tend to use the beginning and end of long inputs more reliably than the middle. A findings digest at the top brings every carrier's key issues into the strong position, and clear section headers make the details easy to locate. A request to pay equal attention does not change the position effect itself.Q583. Fenwick's dispute agent calls lookup_carrier_contract and extract_invoice_fields as needed. To save tokens, the loop sends each new request with only the system prompt, the original task and the latest tool result. Traces show the agent requesting the same contract lookup four or five times per dispute. What should the loop do? (Select ONE.) A) Add a system prompt rule telling the agent never to call lookup_carrier_contract more than once for any single dispute it handles in a session. B) Append each assistant response with its tool_use blocks, then the matching tool_result blocks, to the messages array sent on every request. C) Force tool_choice to extract_invoice_fields after the first contract lookup, so that the agent cannot request the same contract lookup again. D) Cache lookup_carrier_contract results in the tool server, so repeated calls for the same contract return instantly without another database query.
Understand Foundations Mock Exam 1 · Q583 · the situation and each part of the question
The real situation behind this question
Fenwick's dispute agent helps auditors on live calls with carriers. An engineer trimmed the loop to save tokens: each request now carries only the instructions, the task and the newest tool result. Since then the agent keeps asking for the same carrier contract, four or five times per dispute, and disputes take longer. The model is not broken; it simply cannot see what it already did.
Read the question in parts
Part 1 · To save tokens
the trimming was a cost optimization that removed information the model needs
Part 2 · requesting the same contract lookup four or five times per dispute
the model does not remember earlier results, which points to missing history
What you are being asked to decide
The agent keeps asking for the same contract because it does not see its earlier results. What should the loop send? Tests appending tool calls and results to the conversation history between loop iterations.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Messages array | the full conversation sent on each request, including earlier tool calls and results |
| tool_result | the block that returns a tool's output, linked to its tool_use by ID |
Study: The messages array: how the loop physically grows Messages array tool_result Agent loop
Understand Foundations Mock Exam 1 · Q583's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The agent loop works only if each request carries the growing history: assistant tool_use blocks and their tool_result blocks. Without it, the model forgets what it learned and repeats calls.
Connect the design to the situation
lookup_carrier_contract called five times in one dispute.
Best answer: B. The model reasons about its next step from the conversation history it is sent. If earlier tool calls and results are dropped, it no longer knows it already looked up the contract, so it asks again. Caching makes the repeated calls cheaper but leaves the agent unaware of its own earlier results, so the loop still wastes turns.
The decisive evidence in the stem
only the system prompt, the original task and the latest tool result
Earlier tool calls and results are removed from the history, so the model cannot see what it already learned.
Official objective tested: Task 1.1 · Design and implement agentic loops for autonomous task execution
What each choice would do here
A · Why this does not meet the full requirement
Add a system prompt rule telling the agent never to call lookup_carrier_contract more than once for any single dispute it handles in a session.
Restricts calls by rule without restoring the missing history.
The rule may stop repeated lookups, but the agent no longer has the contract data from the first lookup in its history. It must answer without information it needs, or break the rule.
B · Why this meets the requirement
Append each assistant response with its tool_use blocks, then the matching tool_result blocks, to the messages array sent on every request.
Gives the model its earlier calls and results to reason from.
Each iteration appends the assistant turn with its tool_use blocks and a user turn with the matching tool_result blocks. The model sees the contract it already retrieved and moves on to extraction.
C · Why this does not meet the full requirement
Force tool_choice to extract_invoice_fields after the first contract lookup, so that the agent cannot request the same contract lookup again.
Forces a tool sequence instead of letting the model decide.
The agent can no longer repeat the lookup, but it also cannot choose freely for the rest of the dispute, and it still lacks the earlier result in context. A forced sequence replaces model-driven reasoning.
D · Why this does not meet the full requirement
Cache lookup_carrier_contract results in the tool server, so repeated calls for the same contract return instantly without another database query.
Makes repeats cheap but keeps the agent unaware of its results.
Each repeat is fast, but the agent still spends a turn on every repeated request and reasons without the earlier context. The loop stays longer than needed, and other forgotten results cause other repeats.
Check your understanding · explain the design in your own words
The agent keeps asking for the same contract because it does not see its earlier results. What should the loop send?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: The messages array: how the loop physically grows
Study: The messages array: how the loop physically grows Messages array tool_result Agent loop
Return to Foundations Mock Exam 1 · Q583's situation and clause-by-clause explanation
Answer
**B.** The model reasons about its next step from the conversation history it is sent. If earlier tool calls and results are dropped, it no longer knows it already looked up the contract, so it asks again. Caching makes the repeated calls cheaper but leaves the agent unaware of its own earlier results, so the loop still wastes turns.D3 · Prompting & Structured Output
Q584. About 900 fuel-surcharge notices a month fail validation because contract_rate is empty. Investigation shows these notices only say 'rates per your master agreement', a separate document that is not included in the request. The team plans to add three retries with error feedback. What should you do instead? (Select ONE.) A) Add few-shot examples of surcharge notices with contract_rate filled in, so that the model learns where the rate usually appears on notices from each of the carriers. B) Recognize that retries cannot recover information absent from the input: supply the master agreement, or return contract_rate as null for review. C) Make contract_rate required and add an enum of the most common contract rates, so that the model picks the most likely rate for each notice it processes. D) Add the retries with error feedback as planned, including the exact missing-field message, so the model knows contract_rate must be filled in.
Understand Foundations Mock Exam 1 · Q584 · the situation and each part of the question
The real situation behind this question
Fenwick's validator rejects hundreds of surcharge notices each month because the contract rate is blank. The team's first idea is to retry with feedback, which worked well for arithmetic errors. But these notices never state the rate. They say 'per your master agreement', and that agreement is a different document the request never includes. The question is whether more retries can help at all.
Read the question in parts
Part 1 · only say 'rates per your master agreement'
the notice refers elsewhere and does not contain the value
Part 2 · The team plans to add three retries with error feedback
the proposed fix suits a different kind of failure than this one
What you are being asked to decide
The rate is not on the notice at all; it is in another document. Will retries help? Tests recognizing when retries are ineffective because information is absent from the source.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Absent information | a value that is not in the document Claude received, so no retry can extract it |
| Retry with feedback | useful for format and reading errors, not for missing source data |
Study: Validation, retry and feedback loops: when a retry can fix it Validation repair Schema missing values Hallucination vs retrieval
Understand Foundations Mock Exam 1 · Q584's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Retries help only when the answer is in the input. When the value lives in a document not provided, supply that document or record the field as absent; never pressure the model to fill it.
Connect the design to the situation
A notice that says 'rates per your master agreement' with no rate on the page.
Best answer: B. Retry with feedback fixes format and reading errors, but it cannot produce a value that exists only in a document the model never received. The fix is to supply that document or record the value as absent. Retrying with the missing-field message pressures the model to fill the field, which invites a fabricated rate.
The decisive evidence in the stem
a separate document that is not included in the request
The needed value is not in the input at all, which is the case where retries are ineffective.
Official objective tested: Task 4.4 · Implement validation, retry, and feedback loops for extraction quality
What each choice would do here
A · Why this does not meet the full requirement
Add few-shot examples of surcharge notices with contract_rate filled in, so that the model learns where the rate usually appears on notices from each of the carriers.
Teaches a location where the rate does not exist.
The examples show notices that do contain a rate, so the model learns to look for one or to imitate a typical value. On these notices there is nothing to find, so fabrication becomes more likely.
B · Why this meets the requirement
Recognize that retries cannot recover information absent from the input: supply the master agreement, or return contract_rate as null for review.
Fixes the input or records the gap honestly.
The pipeline either attaches the carrier's master agreement so the rate can be read, or sets contract_rate to null with a note such as 'rate in master agreement' and routes the notice for lookup. Nothing is invented.
C · Why this does not meet the full requirement
Make contract_rate required and add an enum of the most common contract rates, so that the model picks the most likely rate for each notice it processes.
Forces a guess from a list of typical rates.
The model must choose a rate from the list, so every notice gets a guessed value that passes validation. Errors become invisible, which is the worst outcome for an audit client.
D · Why this does not meet the full requirement
Add the retries with error feedback as planned, including the exact missing-field message, so the model knows contract_rate must be filled in.
Pressures the model to invent a value that is not there.
Each retry tells the model contract_rate is missing, but the notice still lacks it. The model either fails three more times or produces a plausible-looking rate from nowhere, which is worse than a blank.
Check your understanding · explain the design in your own words
The rate is not on the notice at all; it is in another document. Will retries help?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Validation, retry and feedback loops: when a retry can fix it
Study: Validation, retry and feedback loops: when a retry can fix it Validation repair Schema missing values Hallucination vs retrieval
Return to Foundations Mock Exam 1 · Q584's situation and clause-by-clause explanation
Answer
**B.** Retry with feedback fixes format and reading errors, but it cannot produce a value that exists only in a document the model never received. The fix is to supply that document or record the value as absent. Retrying with the missing-field message pressures the model to fill the field, which invites a fabricated rate.D3 · Prompting & Structured Output
Q585. Fenwick's validator checks that line items sum to the invoice total. About 4% of extractions fail this check, usually because a credit line was read as a charge. Failed documents are simply re-sent with the same prompt, and most fail again. How should the retry work? (Select ONE.) A) Send a follow-up with the original document, the failed extraction and the specific validation error, and ask for a corrected extraction. B) Route every document that fails the sum check directly to human auditors, since another model attempt cannot fix an arithmetic error like this one. C) Switch the extraction to strict tool use with the JSON schema, which guarantees that the extracted line items always sum to the stated invoice total. D) Re-send the same prompt up to five times and keep the first extraction that passes the sum check, since model outputs vary from run to run.
Understand Foundations Mock Exam 1 · Q585 · the situation and each part of the question
The real situation behind this question
Fenwick's validator caught a pattern: about 4 in 100 invoices extract with line items that do not add up to the total. Usually a credit, shown with a minus sign or in brackets, was read as a normal charge. The pipeline retries these, but with the identical prompt, and the model makes the same mistake again. Auditors end up fixing them by hand.
Read the question in parts
Part 1 · usually because a credit line was read as a charge
the error is specific and visible in the document, so a guided retry can fix it
Part 2 · most fail again
an uninformed retry repeats the mistake, so the retry needs the error details
What you are being asked to decide
Retries with the same prompt keep failing the sum check. What should the retry include? Tests retry-with-error-feedback for semantic validation failures.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Retry with error feedback | a follow-up request that includes the specific validation error so the model can correct it |
| Semantic error | output with the right shape but wrong values, such as items that do not sum to the total |
Study: Validation, retry and feedback loops: when a retry can fix it Validation repair Structured outputs Field: strict
Understand Foundations Mock Exam 1 · Q585's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Retries succeed when they carry the specific validation error together with the document and the failed output. Same-prompt retries repeat the mistake, and schemas cannot catch semantic errors.
Connect the design to the situation
Line items exceed the total by 212.40 because a credit was read as a charge.
Best answer: A. A retry works when the model is told what went wrong: the original document, its failed output and the precise error give it what it needs to find the misread credit line. Strict tool use guarantees the output's shape, not its arithmetic, so a sum mismatch is a semantic error that schemas cannot prevent.
The decisive evidence in the stem
Failed documents are simply re-sent with the same prompt
The retry carries no information about the error, so the model has no reason to produce a different result.
Official objective tested: Task 4.4 · Implement validation, retry, and feedback loops for extraction quality
What each choice would do here
A · Why this meets the requirement
Send a follow-up with the original document, the failed extraction and the specific validation error, and ask for a corrected extraction.
Gives the model the exact error to correct.
The follow-up says: 'Line items sum to 2,550.40 but the stated total is 2,338.00, a 212.40 difference. Check for credit lines.' The model re-reads the document, finds the bracketed credit and corrects its sign.
B · Why this does not meet the full requirement
Route every document that fails the sum check directly to human auditors, since another model attempt cannot fix an arithmetic error like this one.
Sends fixable errors to humans.
Auditors get documents the model could have fixed with one informed retry. Their limited time goes to arithmetic corrections instead of the genuinely ambiguous documents that need them.
C · Why this does not meet the full requirement
Switch the extraction to strict tool use with the JSON schema, which guarantees that the extracted line items always sum to the stated invoice total.
Fixes shape, not arithmetic.
Strict tool use ensures valid JSON matching the schema's shape. Nothing in the schema can require that the items add up, so the same semantic errors pass straight through.
D · Why this does not meet the full requirement
Re-send the same prompt up to five times and keep the first extraction that passes the sum check, since model outputs vary from run to run.
Hopes for a different random result without new information.
Some runs pass by chance, but the systematic misreading of credits repeats most of the time. A passing run may also be wrong in a way that happens to sum, and five attempts cost five times as much.
Check your understanding · explain the design in your own words
Retries with the same prompt keep failing the sum check. What should the retry include?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Validation, retry and feedback loops: when a retry can fix it
Study: Validation, retry and feedback loops: when a retry can fix it Validation repair Structured outputs Field: strict
Return to Foundations Mock Exam 1 · Q585's situation and clause-by-clause explanation
Answer
**A.** A retry works when the model is told what went wrong: the original document, its failed output and the precise error give it what it needs to find the misread credit line. Strict tool use guarantees the output's shape, not its arithmetic, so a sum mismatch is a semantic error that schemas cannot prevent.Q586. Fenwick exposes one generic process_document tool whose input is free text and whose output changes by mode: extract fields, verify a total, or summarize. Traces show Claude often runs it in the wrong mode, and downstream code breaks on the varied output shapes. What change fits best? (Select ONE.) A) Keep process_document and add few-shot examples of correct mode choices to the system prompt, leaving the tool definition unchanged. B) Split it into purpose-specific tools such as extract_invoice_fields, verify_invoice_total and summarize_document, each with its own description and schemas. C) Add a post-processing layer in code that detects which output shape came back and converts it into the single fixed format that the downstream code expects. D) Keep process_document but add a required mode parameter with an enum of the three modes, and describe each of the modes in detail in the system prompt.
Understand Foundations Mock Exam 1 · Q586 · the situation and each part of the question
The real situation behind this question
Fenwick's first tool design was convenient for engineers: one process_document tool that can extract fields, verify a total or write a summary, depending on a word in its free-text input. For Claude it is confusing. It often picks the wrong mode, and each mode returns a different shape, so the accounts-payable loader crashes. The team wants tools that are hard to misuse.
Read the question in parts
Part 1 · one generic process_document tool
a single tool covering several purposes is the root of both problems
Part 2 · downstream code breaks on the varied output shapes
the tool lacks a stable output contract for each of its three jobs
What you are being asked to decide
One tool does three jobs, and Claude uses the wrong job. How do you redesign the tools? Tests splitting a generic tool into purpose-specific tools with defined contracts.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Purpose-specific tool | a tool that does one job, with its own name, description and schemas |
| Output contract | the defined shape of a tool's result that downstream code can rely on |
Study: Writing tool definitions that score points Tool selection Input vs output schema Tool description
Understand Foundations Mock Exam 1 · Q586's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A generic multi-purpose tool confuses selection and output contracts. Split it into purpose-specific tools, each with a clear description and defined input and output schemas.
Connect the design to the situation
process_document called in summarize mode when field extraction was needed.
Best answer: B. A generic tool hides three different jobs behind one name and one description, so selection and output contracts are both unclear. Purpose-specific tools give each job a clear description and defined input and output schemas. A mode enum improves the input side but keeps one tool with three output shapes and one shared description.
The decisive evidence in the stem
whose output changes by mode
Three different jobs share one tool and one contract, which is why both selection and downstream parsing fail.
Official objective tested: Task 2.1 · Design effective tool interfaces with clear descriptions and boundaries
What each choice would do here
A · Why this does not meet the full requirement
Keep process_document and add few-shot examples of correct mode choices to the system prompt, leaving the tool definition unchanged.
Teaches mode choice while the tool stays generic.
Examples help on cases like those shown, but the tool still has one vague description and free-text input. New situations are misrouted, and the output-shape problem is untouched.
B · Why this meets the requirement
Split it into purpose-specific tools such as extract_invoice_fields, verify_invoice_total and summarize_document, each with its own description and schemas.
Gives each job its own name, description and contract.
Claude now sees extract_invoice_fields with a field schema, verify_invoice_total with a total check result, and summarize_document with text output. Each description says when to use it, and downstream code knows each result's shape.
C · Why this does not meet the full requirement
Add a post-processing layer in code that detects which output shape came back and converts it into the single fixed format that the downstream code expects.
Patches outputs instead of fixing the tool design.
Downstream code survives the varied shapes, but Claude still runs the wrong mode. A summary converted into extraction format is still a summary, so the data is wrong even when the format is right.
D · Why this does not meet the full requirement
Keep process_document but add a required mode parameter with an enum of the three modes, and describe each of the modes in detail in the system prompt.
Constrains the mode but keeps three outputs behind one tool.
Mode choice improves somewhat, but the model still selects among three behaviors inside one tool with one description, and downstream code still receives three output shapes from the same tool name.
Check your understanding · explain the design in your own words
One tool does three jobs, and Claude uses the wrong job. How do you redesign the tools?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Writing tool definitions that score points
Study: Writing tool definitions that score points Tool selection Input vs output schema Tool description
Return to Foundations Mock Exam 1 · Q586's situation and clause-by-clause explanation
Answer
**B.** A generic tool hides three different jobs behind one name and one description, so selection and output contracts are both unclear. Purpose-specific tools give each job a clear description and defined input and output schemas. A mode enum improves the input side but keeps one tool with three output shapes and one shared description.D3 · Prompting & Structured Output
Q587. Fenwick's extraction returns null for fuel_surcharge on 14% of documents that actually contain one. Reviews show the value appears in varied forms: a line item, a footnote like 'FSC 11.5% applied', or a percentage inside the rate table. The prompt already describes all three forms in prose. What is the most effective next step? (Select ONE.) A) Rewrite the prose to describe the three forms in more detail, with exact wording for each, and move that description to the end of the prompt. B) Run a second extraction call for fuel_surcharge only, and keep the second answer whenever the first call returned a null value for that field. C) Add two to four few-shot examples showing documents with each surcharge form and the correct extracted value, plus one with no surcharge. D) Make fuel_surcharge a required field in the schema, so that the model must return a value for every document instead of leaving the field null.
Understand Foundations Mock Exam 1 · Q587 · the situation and each part of the question
The real situation behind this question
Fenwick's client noticed that surcharges are missing from many records. The surcharges are there; carriers just show them differently. Some list a fuel surcharge line, some hide 'FSC 11.5% applied' in a footnote, some put a percentage inside the rate table. The prompt already explains this in words, but the model still returns null for about one document in seven that has a surcharge.
Read the question in parts
Part 1 · returns null for fuel_surcharge on 14% of documents that actually contain one
the model misses real values, a recall problem on varied layouts
Part 2 · The prompt already describes all three forms in prose
description alone has not worked, so a different technique is needed
What you are being asked to decide
Surcharges hide in different places, and the model often misses them even with a prose description. What helps most? Tests few-shot examples for extraction from varied document structures.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Few-shot examples | sample documents paired with their correct extraction, placed in the prompt |
| Null | the value for 'not present in this document', which must stay available for honest output |
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Schema missing values Hallucination vs retrieval
Understand Foundations Mock Exam 1 · Q587's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Prose was not enough to recognize varied layouts. Targeted few-shot examples of each form, plus a genuine absence case, teach the pattern without forcing fabricated values.
Connect the design to the situation
A surcharge shown as a footnote 'FSC 11.5% applied' extracted as null.
Best answer: C. When prose descriptions do not produce consistent extraction across varied layouts, a few targeted examples showing each form and its correct output teach the pattern most effectively, and the no-surcharge example keeps nulls honest. Making the field required removes the null option, so on documents without a surcharge the model would invent one.
The decisive evidence in the stem
The prompt already describes all three forms in prose
Prose has been tried and is not enough, which is when few-shot examples of the varied forms become the next step.
Official objective tested: Task 4.2 · Apply few-shot prompting to improve output consistency and quality
What each choice would do here
A · Why this does not meet the full requirement
Rewrite the prose to describe the three forms in more detail, with exact wording for each, and move that description to the end of the prompt.
Repeats prose that has already failed.
Moving and lengthening the prose changes emphasis, but the model still has to translate words into recognizing a footnote or a table cell. The 14% miss rate may barely move.
B · Why this does not meet the full requirement
Run a second extraction call for fuel_surcharge only, and keep the second answer whenever the first call returned a null value for that field.
Doubles the calls without teaching the pattern.
The second call faces the same difficulty and often returns null again. When it does return a value, nothing shows that value is more accurate than a true null on a document without a surcharge.
C · Why this meets the requirement
Add two to four few-shot examples showing documents with each surcharge form and the correct extracted value, plus one with no surcharge.
Shows each form with its correct output, and an honest null case.
The prompt shows a line-item invoice with 245.10, a footnote invoice with 11.5%, a rate-table invoice with its value, and an invoice with no surcharge returning null. The model learns what each form looks like and when null is right.
D · Why this does not meet the full requirement
Make fuel_surcharge a required field in the schema, so that the model must return a value for every document instead of leaving the field null.
Forces a value even when none exists, inviting fabrication.
Nulls disappear, but on documents with no surcharge the model must invent a number to satisfy the schema. Missed values become fabricated values, which is worse for an audit client.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Few-shot pairs for surcharge forms (illustrative)
[
{"document_excerpt": "Line 4: Fuel surcharge ..... 245.10", "fuel_surcharge": {"amount": 245.10, "percent": null}},
{"document_excerpt": "* FSC 11.5% applied to linehaul", "fuel_surcharge": {"amount": null, "percent": 11.5}},
{"document_excerpt": "Rate table: Linehaul 2,130.00 | FSC 9.8% | Total 2,338.74", "fuel_surcharge": {"amount": null, "percent": 9.8}},
{"document_excerpt": "Linehaul 1,450.00 | Detention 75.00 | Total 1,525.00", "fuel_surcharge": null}
]Excerpts and values are illustrative. The last pair shows that null is the correct output when no surcharge exists.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Surcharges hide in different places, and the model often misses them even with a prose description. What helps most?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Few-shot examples for ambiguous cases and varied documents
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Schema missing values Hallucination vs retrieval
Return to Foundations Mock Exam 1 · Q587's situation and clause-by-clause explanation
Answer
**C.** When prose descriptions do not produce consistent extraction across varied layouts, a few targeted examples showing each form and its correct output teach the pattern most effectively, and the no-surcharge example keeps nulls honest. Making the field required removes the null option, so on documents without a surcharge the model would invent one.D3 · Prompting & Structured Output
Q588. Fenwick's extract_invoice schema marks every field required, and accessorial_type is an enum of six charge types. Audits find invented PO numbers on invoices that have none, and new charges such as 'lift-gate service' forced into the closest enum value. Which two schema changes address these problems? (Select TWO.) A) Make po_number and other fields that documents may omit optional or nullable, so the model can return null instead of inventing a value. B) Add an 'other' value to the accessorial_type enum with an accompanying detail string, so new charge types are captured rather than misfiled. C) Add a description to every required field telling the model never to invent values, while keeping all of the fields required. D) Replace the accessorial_type enum with a free-text string field, so the model can write any charge type it finds on the document.
Understand Foundations Mock Exam 1 · Q588 · the situation and each part of the question
The real situation behind this question
Fenwick's client found two kinds of bad data. Some invoices show purchase-order numbers that do not exist anywhere on the document. And charges the schema does not know, like lift-gate service, are filed under whatever existing category looks closest, which breaks the client's cost reports. Both problems trace back to how the extraction schema itself is designed, not to the prompt wording.
Read the question in parts
Part 1 · marks every field required
the schema forces a value for every field, even when the document has none
Part 2 · forced into the closest enum value
the enum has no honest option for new types, so the model misfiles them
What you are being asked to decide
The schema forces values that do not exist and squeezes new charges into old categories. Which two schema changes fix this? Tests nullable fields for absent data and 'other' plus detail for extensible enums.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Nullable field | a schema field that allows null when the document does not contain the value |
| 'other' + detail | an enum value for unlisted categories plus a string that records what it actually was |
Study: Schema design details that prevent hallucination Schema missing values Closed schema JSON Schema
Understand Foundations Mock Exam 1 · Q588's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Schema design prevents two kinds of fabrication: nullable fields for information that may be absent, and an 'other' value with a detail string for categories the enum does not cover yet.
Connect the design to the situation
An invoice with no PO number gets 'PO-10442' anyway; 'lift-gate service' becomes 'detention'.
Best answer: AB. Required fields push the model to fill something even when the document has nothing, so fields that can be absent must be nullable. An 'other' value with a detail string keeps the enum useful while capturing new types. Free text would also capture new charges, but it throws away the controlled categories that downstream accounting depends on.
The decisive evidence in the stem
invented PO numbers on invoices that have none
The schema requires a value the source lacks, which pushes the model to fabricate; a nullable field removes that pressure.
Official objective tested: Task 4.3 · Enforce structured output using tool use and JSON schemas
What each choice would do here
A · Why this does not meet the full requirement
Make po_number and other fields that documents may omit optional or nullable, so the model can return null instead of inventing a value.
Lets the model say 'not present' instead of inventing.
po_number becomes nullable. On an invoice without one, the model returns null, which accounts payable can route for follow-up instead of matching against a fake order.
B · Why this does not meet the full requirement
Add an 'other' value to the accessorial_type enum with an accompanying detail string, so new charge types are captured rather than misfiled.
Keeps the categories and records new types honestly.
accessorial_type gains 'other', with accessorial_detail set to 'lift-gate service'. Known types stay clean, and the client can see new types and decide whether to add them to the enum.
C · Why this does not meet the full requirement
Add a description to every required field telling the model never to invent values, while keeping all of the fields required.
Asks for honesty while the schema still demands a value.
The description asks the model not to invent, but the schema still requires a value, so the instruction and the contract conflict. Fabricated PO numbers decrease at best, and the enum problem is untouched.
D · Why this does not meet the full requirement
Replace the accessorial_type enum with a free-text string field, so the model can write any charge type it finds on the document.
Captures new charges but loses the categories downstream needs.
New charges are captured, but so are endless spellings of known ones, such as 'fuel', 'FSC' and 'fuel surch.'. The client's cost reports, which group by category, break in a different way.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Schema fragment with nullable field and extensible enum (illustrative)
{
"type": "object",
"properties": {
"po_number": {"type": ["string", "null"]},
"accessorial_type": {"type": "string", "enum": ["detention", "fuel", "residential", "inside_delivery", "redelivery", "other"]},
"accessorial_detail": {"type": ["string", "null"], "description": "Required when accessorial_type is other: the charge as written."}
},
"required": ["po_number", "accessorial_type", "accessorial_detail"]
}Listing a nullable field in required means the key must appear, but null is an allowed value. Enum values are illustrative.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The schema forces values that do not exist and squeezes new charges into old categories. Which two schema changes fix this?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Schema design details that prevent hallucination
Study: Schema design details that prevent hallucination Schema missing values Closed schema JSON Schema
Return to Foundations Mock Exam 1 · Q588's situation and clause-by-clause explanation