Foundations Mock Exam 4 — 60 Scenario Questions, Timed (Q709–Q768)
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 · Multi-Agent Research System · Claude Code for Continuous Integration · 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 1 · Mock 2 · Mock 3.
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 4 · 60 questions (Q709–Q768)
Scenario 1 · Customer Support Resolution Agent
Q709. To save time, a developer exposed one MCP tool, account_action(action, params), that handles password resets, address changes, marketing-email opt-outs and loyalty-point adjustments. Logs show the agent often sends the wrong params shape for the chosen action, and twice it adjusted loyalty points when the customer asked to stop marketing emails. Which redesign most improves reliability? (Select ONE.) A) Split it into purpose-specific tools such as reset_password and update_address, each with its own input schema and a description of when to use it. B) Keep the single tool and add six few-shot examples to the system prompt showing the correct action string and params for each request type. C) Keep the single tool but make the action parameter an enum and validate params against the chosen action, returning the error so the agent can retry. D) Keep the single tool and write a long description that documents every action, its params shape, and which customer requests map to each one.
Understand Foundations Mock Exam 4 · Q709 · the situation and each part of the question
The real situation behind this question
A Corvane developer was in a hurry and wrapped four account operations into one flexible MCP tool. It worked in the demo. In production the agent sometimes sends address fields to the password reset action, and twice it changed a customer's loyalty points when they only wanted fewer marketing emails. Changing loyalty points touches real money value. The architect must decide how to make the agent pick and fill the right operation.
Read the question in parts
Part 1 · one MCP tool, account_action(action, params)
the operation is chosen by a string inside one tool, not by tool selection, so descriptions cannot separate them.
Part 2 · sends the wrong params shape for the chosen action
params has no schema per action, so the model guesses its structure.
What you are being asked to decide
One tool does four jobs and the agent mixes them up. How should the tool be redesigned? Tests splitting a generic tool into purpose-specific tools with defined input 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 |
|---|---|
| input_schema | the JSON Schema for a tool's arguments; with one generic tool, params has no fixed shape |
| Tool selection | choosing an operation, which a generic tool turns into choosing a free-text action string |
Study: Writing tool definitions that score points Tool selection input_schema
Understand Foundations Mock Exam 4 · Q709's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A generic tool turns tool selection into guessing an action string and an unstructured params object. Splitting it into purpose-specific tools gives the model clear names, boundaries and schemas. Validation, examples or longer descriptions only patch the symptoms of the generic design.
Connect the design to the situation
account_action('loyalty_adjust', …) runs when the customer only wanted to stop marketing emails.
Best answer: A. A generic tool hides four different contracts behind one name, so the model must pick an action string and a matching params shape with no schema guiding either. Purpose-specific tools give each operation its own name, description and input schema. Enum validation with retry catches some errors after the fact, but cannot stop a valid-but-wrong action such as adjusting points.
The decisive evidence in the stem
it adjusted loyalty points when the customer asked to stop marketing emails
A wrong but schema-valid action got through, which validation of one generic tool cannot catch; distinct tools with clear descriptions make the choice explicit.
Official objective tested: Task 2.1 · Design effective tool interfaces with clear descriptions and boundaries
What each choice would do here
A · Why this meets the requirement
Split it into purpose-specific tools such as reset_password and update_address, each with its own input schema and a description of when to use it.
Gives each operation its own name, schema and usage boundary, so selection and inputs are both clear.
The agent now sees reset_password(email), update_address(customer_id, address), unsubscribe_marketing(customer_id) and adjust_loyalty_points(customer_id, delta, reason). Each has a schema and a 'use when' line. An unsubscribe request maps to one obvious tool with nothing to confuse.
B · Why this does not meet the full requirement
Keep the single tool and add six few-shot examples to the system prompt showing the correct action string and params for each request type.
Adds token cost and examples while the tool itself still has no per-action contract.
Six examples help on the common requests, but customers phrase things in many ways. The examples cost tokens in every request, and the model still has to fill an unstructured params object for whichever action it picks.
C · Why this does not meet the full requirement
Keep the single tool but make the action parameter an enum and validate params against the chosen action, returning the error so the agent can retry.
Catches malformed params after the call, but a valid wrong action like a loyalty change still passes.
The enum stops typos and the validator rejects wrong shapes, so the agent retries those. But 'loyalty_adjust' with valid params passes every check. The most damaging error, a wrong but valid action, is untouched, and retries add turns.
D · Why this does not meet the full requirement
Keep the single tool and write a long description that documents every action, its params shape, and which customer requests map to each one.
Puts four contracts into one description, which keeps the choice buried inside a parameter.
The description becomes a manual for four operations. The model must read it, choose a string, and remember the matching shape. Long, multi-purpose descriptions are exactly what makes selection unreliable among similar options.
Check your understanding · explain the design in your own words
One tool does four jobs and the agent mixes them up. How should the tool be redesigned?
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_schema
Return to Foundations Mock Exam 4 · Q709's situation and clause-by-clause explanation
Answer
**A.** A generic tool hides four different contracts behind one name, so the model must pick an action string and a matching params shape with no schema guiding either. Purpose-specific tools give each operation its own name, description and input schema. Enum validation with retry catches some errors after the fact, but cannot stop a valid-but-wrong action such as adjusting points.Q710. A customer's first message is: 'I want to talk to a real person, not a bot. My installation technician never showed up.' The agent could find the appointment status with one lookup_order call. Current behaviour is to investigate first and offer a solution, which in such chats adds three turns before any handoff. How should the agent respond? (Select ONE.) A) Escalate to a human immediately, passing the customer's stated issue and identifiers in the handoff, without investigating first. B) Acknowledge the frustration, offer to check the appointment right away, and escalate only if the customer repeats the request for a person. C) Look up the order first so the human agent receives tracking details, then escalate to the human team with that information included. D) Score the message's sentiment and escalate immediately only when it is strongly negative, otherwise attempt resolution with the tools.
Understand Foundations Mock Exam 4 · Q710 · the situation and each part of the question
The real situation behind this question
Some Corvane customers do not want to talk to a bot at all. This one says so in the first message, along with a simple problem: a missed installation. The agent could look it up in seconds. But the customer has made a clear choice, and today's agent makes them wait three turns while it investigates. That is where complaints come from. The architect must decide how the agent treats an explicit request for a person.
Read the question in parts
Part 1 · The agent could find the appointment status with one lookup_order call
the issue is easy, which tempts you to resolve first, but ease does not override an explicit request.
Part 2 · adds three turns before any handoff
the current design delays what the customer asked for, the behaviour the change must remove.
What you are being asked to decide
The customer asks for a person right away, though the issue is easy. Should the agent try first? Tests honouring an explicit request for a human immediately, versus offering help to a frustrated customer.
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 | calling escalate_to_human so a person takes over this chat |
| Handoff | the details passed with the escalation: the missed installation, the customer's email and any order number given |
Study: Escalation and ambiguity: when to hand off, when to ask Escalation Handoff
Understand Foundations Mock Exam 4 · Q710's answer · full reasoning and worked examples
Claude synthesized · the point, straight
An explicit request for a human is a trigger on its own, whatever the complexity of the issue. The agent escalates at once and includes what it already knows in the handoff. Offering to resolve first is for frustration without such a request, and sentiment scores cannot decide this.
Connect the design to the situation
'I want a real person' about a missed installation the agent could check in one call.
Best answer: A. An explicit request for a human is an escalation trigger to honour right away, even if the issue is simple. Offering to resolve first is right when a customer is frustrated but has not asked for a person. Investigating before handing off still delays what the customer clearly asked for, and sentiment does not decide whether an explicit request counts.
The decisive evidence in the stem
I want to talk to a real person, not a bot.
The customer explicitly asks for a human, which calls for immediate escalation, not an attempt at resolution first.
Official objective tested: Task 5.2 · Design effective escalation and ambiguity resolution patterns
What each choice would do here
A · Why this meets the requirement
Escalate to a human immediately, passing the customer's stated issue and identifiers in the handoff, without investigating first.
Honours the explicit request at once and still passes what is known so the human can start quickly.
The agent replies 'I'll connect you with a person now' and calls escalate_to_human with the missed-installation issue and the email from the form. The human starts with the basics in hand, and the customer gets what they asked for at once.
B · Why this does not meet the full requirement
Acknowledge the frustration, offer to check the appointment right away, and escalate only if the customer repeats the request for a person.
Fits a frustrated customer who has not asked for a person; this customer has asked directly.
This is the right move for 'this is so frustrating, nobody came to install my service' with no request for a person. Here the customer has already stated a preference, so offering to check first ignores it and adds the turns the team wants to remove.
C · Why this does not meet the full requirement
Look up the order first so the human agent receives tracking details, then escalate to the human team with that information included.
Delays the handoff the customer asked for in order to gather data, which ignores the explicit request.
The lookup takes one call, but the agent also has to explain what it is doing, and the customer who asked for a person sees the bot continue. The human gets appointment data, but the customer's trust is already damaged by the delay.
D · Why this does not meet the full requirement
Score the message's sentiment and escalate immediately only when it is strongly negative, otherwise attempt resolution with the tools.
Uses sentiment, an unreliable proxy, to decide whether to honour a clear and explicit request.
A calm, firm request for a person may score as neutral and be ignored, while an emotional message with no request for a human gets escalated. Sentiment measures tone, not whether the customer asked for a human.
Check your understanding · explain the design in your own words
The customer asks for a person right away, though the issue is easy. Should the agent try 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: Escalation and ambiguity: when to hand off, when to ask
Study: Escalation and ambiguity: when to hand off, when to ask Escalation Handoff
Return to Foundations Mock Exam 4 · Q710's situation and clause-by-clause explanation
Answer
**A.** An explicit request for a human is an escalation trigger to honour right away, even if the issue is simple. Offering to resolve first is right when a customer is frustrated but has not asked for a person. Investigating before handing off still delays what the customer clearly asked for, and sentiment does not decide whether an explicit request counts.Q711. Long billing disputes are summarized every 20 turns to save tokens. A QA review finds a summary that turned 'agent promised an 86.40 credit on order 7731 by Friday' into 'customer discussed a credit'; ten turns later the agent offered a smaller amount. How should you preserve these details across long conversations? (Select ONE.) A) Keep order IDs, amounts, dates and promises in a case-facts block sent with every request, outside the summarized history. B) Summarize every five turns instead of every 20, so each summary condenses less text and is less likely to drop specific values. C) Switch to a model with a larger context window so that summarization happens less often and fewer details are lost during each dispute. D) Instruct the summarizer to be thorough and keep every important detail, so future summaries include amounts, dates and any promises made.
Understand Foundations Mock Exam 4 · Q711 · the situation and each part of the question
The real situation behind this question
Corvane's billing disputes can run for an hour. To control cost, the harness replaces older turns with a summary every 20 turns. In one dispute the agent had promised an exact credit by a specific day. The summary kept only 'customer discussed a credit'. Ten turns later the agent offered a lower amount, and the customer felt cheated. The architect must keep exact commitments intact no matter how long the chat runs.
Read the question in parts
Part 1 · summarized every 20 turns to save tokens
summarization is a deliberate cost choice, so the fix must work with it, not abandon it.
Part 2 · the agent offered a smaller amount
losing one number caused a broken promise, the real harm of a vague summary.
What you are being asked to decide
Summaries of long chats lose the exact refund amount and date. How do you keep those facts? Tests persisting transactional facts in a case-facts 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 |
|---|---|
| Compaction | replacing older turns of the dispute with a shorter summary to save tokens |
| Case-facts block | a small structured section with order 7731, 86.40 and 'by Friday' that is sent unchanged every turn |
Study: Long-conversation strategy (support-agent scenario) Compaction Context engineering
Understand Foundations Mock Exam 4 · Q711's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Summaries compress, and compression blurs exact amounts, dates and promises. Keeping those facts in a persistent block outside the summarized history protects them on every turn. Bigger windows, different intervals or vague instructions only move the point where the loss happens.
Connect the design to the situation
A promised 86.40 credit by Friday becomes 'discussed a credit', and the agent later offers less.
Best answer: A. Summaries compress, and compression is exactly where exact amounts, dates and promises become vague. Keeping those facts in a separate, persistent block that is never summarized protects them whatever happens to the history. A bigger window or more frequent summaries only change when the loss happens, and 'be thorough' is a vague instruction.
The decisive evidence in the stem
turned 'agent promised an 86.40 credit on order 7731 by Friday' into 'customer discussed a credit'
Progressive summarization lost the exact amount, order and date, so these facts must live outside the summarized text.
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 meets the requirement
Keep order IDs, amounts, dates and promises in a case-facts block sent with every request, outside the summarized history.
Stores the critical values separately so no summary can blur them, and sends them every turn.
The harness keeps {order: 7731, promised_refund: 86.40, due: 'Friday'} in a block at the top of every request. Summaries can shorten the chat, but this block is copied, never rewritten, so the agent always sees the exact promise.
B · Why this does not meet the full requirement
Summarize every five turns instead of every 20, so each summary condenses less text and is less likely to drop specific values.
Summarizes more often, which means more compression steps and more chances to blur a value.
Smaller summaries are produced four times as often. Each pass is another chance to paraphrase a number or a date, so the risk of losing the promise can actually rise.
C · Why this does not meet the full requirement
Switch to a model with a larger context window so that summarization happens less often and fewer details are lost during each dispute.
Delays summarization but does not remove it, so long disputes still lose the facts later.
A larger window means summaries start at turn 60 instead of 20. The longest disputes still reach that point and lose the details, and each request now costs more because it carries more history.
D · Why this does not meet the full requirement
Instruct the summarizer to be thorough and keep every important detail, so future summaries include amounts, dates and any promises made.
Relies on a vague instruction to a process whose nature is to compress, so details still get lost.
The summarizer may keep more detail in some runs, but 'thorough' has no fixed meaning, and each pass still rewrites the facts in new words. Over several summaries the exact 86.40 can still turn into 'about 190'.
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.
Case-facts block sent with every request (illustrative)
<case_facts>
customer_id: C-88412 (verified)
order 7731: fiber outage, 3 days
promised: credit 86.40 on next bill, by Friday 2026-10-23
order 7740: duplicate charge 64.00, reversal pending
</case_facts>
<conversation_summary>…</conversation_summary>The harness updates case_facts from tool results and agent commitments; the summarizer never touches it.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Summaries of long chats lose the exact refund amount and date. How do you keep those facts?
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 engineering
Return to Foundations Mock Exam 4 · Q711's situation and clause-by-clause explanation
Answer
**A.** Summaries compress, and compression is exactly where exact amounts, dates and promises become vague. Keeping those facts in a separate, persistent block that is never summarized protects them whatever happens to the history. A bigger window or more frequent summaries only change when the loss happens, and 'be thorough' is a vague instruction.Q712. Corvane has 140 policy documents (outage credits, early termination, equipment, regional rules). The agent finds them through a search_policies tool and averages five exploratory searches per conversation before it locates the right document. The policy MCP server is yours to change. What change would most reduce these exploratory calls? (Select ONE.) A) Raise the agent's turn limit so that five or more searches per conversation no longer risk cutting off the end of a long support case. B) Paste all 140 policy documents into the system prompt so the agent always has every policy available without calling any tool. C) Expose the policy catalog as an MCP resource, so the agent sees which documents exist and reads the right one directly. D) Add a sentence to the search_policies description asking the agent to make its first search query as specific as possible.
Understand Foundations Mock Exam 4 · Q712 · the situation and each part of the question
The real situation behind this question
Corvane's policies grew over ten years into 140 documents with overlapping names. The agent cannot see the list, so it tries search after search until something matches. Each search adds a turn and some latency, and the customer waits. The team owns the policy MCP server and can add to it. The architect must choose a change that lets the agent find the right policy without trial and error.
Read the question in parts
Part 1 · 140 policy documents
the catalog is too large to load fully into every request but small enough to list.
Part 2 · The policy MCP server is yours to change
you can add a resource on the server side, not only adjust prompts or limits.
What you are being asked to decide
The agent searches five times to find the right policy. How do you let it see what policies exist? Tests exposing a content catalog as an MCP resource to reduce 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 the policy server offers, here a catalog listing all 140 documents |
| Context window | the space for all text in one request, which 140 full policies would mostly waste |
Study: MCP resources & config scoping — two details tested by file path MCP resource Context window
Understand Foundations Mock Exam 4 · Q712's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The agent explores because the catalog is invisible to it. Exposing the catalog as an MCP resource gives it the list of available documents, so it can read the right one directly. Loading everything or allowing more turns treats the cost of exploring, not its cause.
Connect the design to the situation
Searches for 'outage refund', 'service credit fiber', 'credits policy' before finding 'Outage Credits – Fiber (Texas)'.
Best answer: C. The agent searches repeatedly because it cannot see what content exists. An MCP resource that lists the catalog gives it that visibility up front, so it can go straight to the right document. Loading every document into the system prompt also removes searches but fills the context with mostly irrelevant text on every request.
The decisive evidence in the stem
averages five exploratory searches per conversation before it locates the right document
The searches are exploration of an unknown catalog, which a resource listing the available content removes.
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
Raise the agent's turn limit so that five or more searches per conversation no longer risk cutting off the end of a long support case.
Makes room for the waste instead of removing it; every conversation still makes the exploratory calls.
A higher turn limit stops long cases from being cut off, which is a different problem. The agent still makes about five searches in every conversation, so latency and cost stay the same.
B · Why this does not meet the full requirement
Paste all 140 policy documents into the system prompt so the agent always has every policy available without calling any tool.
Removes searches but adds a huge, mostly irrelevant block to every request and every turn.
Every request now carries 140 documents, most of them irrelevant to one outage credit. Costs and latency rise on every turn, and important rules can get lost in the middle of a very long prompt. The searches are gone, but at a high price.
C · Why this meets the requirement
Expose the policy catalog as an MCP resource, so the agent sees which documents exist and reads the right one directly.
Shows the agent the available documents once, so it reads the right one without guessing searches.
The server exposes a resource such as policy://catalog with each document's title, topic, region and effective date. The application gives the agent that catalog, it sees 'Outage Credits – Fiber (Texas)', and reads that one document. Five searches become one read.
D · Why this does not meet the full requirement
Add a sentence to the search_policies description asking the agent to make its first search query as specific as possible.
Asks for better queries but still leaves the agent guessing at a catalog it cannot see.
Specific queries help a little, but the agent still does not know that documents are named by product and region. It keeps guessing names, and the average number of searches barely changes.
Check your understanding · explain the design in your own words
The agent searches five times to find the right policy. How do you let it see what policies exist?
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 & config scoping — two details tested by file path
Study: MCP resources & config scoping — two details tested by file path MCP resource Context window
Return to Foundations Mock Exam 4 · Q712's situation and clause-by-clause explanation
Answer
**C.** The agent searches repeatedly because it cannot see what content exists. An MCP resource that lists the catalog gives it that visibility up front, so it can go straight to the right document. Loading every document into the system prompt also removes searches but fills the context with mostly irrelevant text on every request.Q713. The tool descriptions for process_refund and check_credit_policy were rewritten last month and are detailed. Yet logs show the agent calling process_refund when customers only ask 'what is your refund policy if I cancel early?' The system prompt contains the line 'Whenever the customer mentions a refund, use process_refund.' What is the most effective first fix? (Select ONE.) A) Expand the process_refund description further with a list of question types it should never handle, placed at the start of the description. B) Rewrite that prompt line as a decision rule: refund only after eligibility is confirmed, and answer policy questions with check_credit_policy. C) Add a routing layer that detects the word 'policy' in each customer message and removes process_refund from the tool list for that turn. D) Rename check_credit_policy to refund_policy_lookup so the word 'refund' in customer messages points the model toward the policy tool too, not only process_refund.
Understand Foundations Mock Exam 4 · Q713 · the situation and each part of the question
The real situation behind this question
Corvane's team spent a week writing excellent tool descriptions, with input formats and 'use this, not that' guidance. Misrouting improved, but one pattern remained: customers asking about the refund policy got a refund attempt instead of an answer. Someone finally read the old system prompt and found a line written in the first prototype. The architect must decide where the first fix belongs.
Read the question in parts
Part 1 · were rewritten last month and are detailed
the descriptions are not the problem, so another description edit is unlikely to help.
Part 2 · customers only ask 'what is your refund policy if I cancel early?'
the request is informational, so the policy tool fits and the refund tool should not run.
What you are being asked to decide
The tool descriptions are fine, but a line in the system prompt sends every 'refund' message to the refund tool. What do you fix first? Tests spotting keyword-sensitive system prompt wording that overrides good tool descriptions.
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 selection | the model's choice between process_refund and check_credit_policy for each customer message |
| System prompt | the standing instructions your application sends with every request, where the keyword rule lives |
Study: What the descriptions should say Tool selection System prompt Tool description
Understand Foundations Mock Exam 4 · Q713's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Good descriptions lose when the system prompt maps a keyword directly to a tool. The fix is to rewrite that line as a decision rule so the word 'refund' stops triggering process_refund. Renames, routers and longer descriptions all leave the conflicting instruction in place.
Connect the design to the situation
'What is your refund policy for early cancellation?' triggers process_refund because of one prompt line.
Best answer: B. The descriptions are already good; the system prompt contains a keyword trigger that overrides them by tying the word 'refund' to one tool. Rewriting that instruction around the actual decision removes the bad association at its source. A rename adds a second keyword association, and a routing layer adds machinery around a one-line prompt flaw.
The decisive evidence in the stem
'Whenever the customer mentions a refund, use process_refund.'
This keyword-sensitive instruction maps a word to a tool, so it overrides well-written descriptions whenever a customer says 'refund' for any reason.
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
Expand the process_refund description further with a list of question types it should never handle, placed at the start of the description.
Edits descriptions that are already good, while the conflicting prompt instruction still wins.
A longer description of what process_refund should not do competes with an explicit system prompt instruction to use it. System prompt instructions usually carry more weight, so the misrouting continues.
B · Why this meets the requirement
Rewrite that prompt line as a decision rule: refund only after eligibility is confirmed, and answer policy questions with check_credit_policy.
Removes the keyword trigger that overrides the descriptions and states the real decision rule.
The new prompt line says what to do and when: answer policy questions with check_credit_policy, and call process_refund only after eligibility is confirmed for a specific order. The word 'refund' no longer points to a tool, so the good descriptions decide again.
C · Why this does not meet the full requirement
Add a routing layer that detects the word 'policy' in each customer message and removes process_refund from the tool list for that turn.
Adds keyword-based infrastructure for a problem caused by one line of prompt wording.
The routing layer catches 'policy' but misses 'do I get money back if I cancel?' and similar wording. The team now maintains keyword rules in code while the prompt instruction keeps pulling the model toward process_refund.
D · Why this does not meet the full requirement
Rename check_credit_policy to refund_policy_lookup so the word 'refund' in customer messages points the model toward the policy tool too, not only process_refund.
Creates another keyword association instead of removing the one that causes the misrouting.
Now both tool names contain 'refund', and the prompt still says 'use process_refund' when the word appears. The model gets two competing keyword signals, and the old instruction still wins in many cases.
Check your understanding · explain the design in your own words
The tool descriptions are fine, but a line in the system prompt sends every 'refund' message to the refund tool. 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: What the descriptions should say
Study: What the descriptions should say Tool selection System prompt Tool description
Return to Foundations Mock Exam 4 · Q713's situation and clause-by-clause explanation
Answer
**B.** The descriptions are already good; the system prompt contains a keyword trigger that overrides them by tying the word 'refund' to one tool. Rewriting that instruction around the actual decision removes the bad association at its source. A rename adds a second keyword association, and a routing layer adds machinery around a one-line prompt flaw.Q714. Staff on the human billing team spend roughly 11 minutes rebuilding each escalated case, because the escalate_to_human payload today is a single line: 'Customer needs help with a credit, see chat'. Their ticket console has no way to show chat transcripts, and that will not change this year. What should the agent send when it escalates? (Select ONE.) A) The complete chat transcript pasted into the ticket's notes field, so the human agent can read the full conversation exactly as the customer wrote it. B) A structured summary with customer ID, order IDs, the issue, what was verified and tried, the likely root cause, the amount, and a recommended action. C) A short note asking the customer to describe the problem again to the human agent, who then starts a fresh investigation with full backend access. D) A priority score from one to five based on the customer's frustration level, so that the human team handles the most upset customers first.
Understand Foundations Mock Exam 4 · Q714 · the situation and each part of the question
The real situation behind this question
Corvane's agent escalates credits above its limit and policy exceptions to a small human team. Those people work in an older ticket console that shows only the ticket fields, not the chat. Today the agent sends one vague sentence. So each person opens the order system, finds the customer, guesses what was discussed, and often contacts the customer again. Pick-up time is 11 minutes. The team wants escalations people can act on right away.
Read the question in parts
Part 1 · spend roughly 11 minutes rebuilding each escalated case
the cost is the human rebuilding context, so the fix must deliver that context ready to use.
Part 2 · that will not change this year
giving humans transcript access is ruled out, so the agent's payload must carry the information.
What you are being asked to decide
Humans who take over a case cannot see the chat. What should the agent hand them? Tests writing a structured handoff for a human who lacks the transcript.
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 package of facts the agent passes to the human billing team when it escalates |
| Escalation | the escalate_to_human call that moves this case from the agent to a person |
Study: Escalation design (scenario 1 territory) Handoff Escalation HITL
Understand Foundations Mock Exam 4 · Q714's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The human cannot see the chat, so whatever the agent sends is all they have. A structured summary with the facts, what was verified, the root cause and a recommended action lets them act at once. Raw transcripts or a re-explaining customer only move the rebuilding work elsewhere.
Connect the design to the situation
A credit over the agent's limit is escalated with one vague sentence, and staff spend 11 minutes rebuilding the case.
Best answer: B. The human cannot see the conversation, so the handoff itself must carry the facts and the agent's conclusion in a form that is quick to act on. A pasted transcript technically delivers the information but makes the human re-read and re-derive it, which is the 11-minute cost. Asking the customer to repeat everything wastes the work already done.
The decisive evidence in the stem
Their ticket console has no way to show chat transcripts
The receiving human has no access to context, so the escalation payload must be a self-contained structured summary with the decision-relevant facts.
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
The complete chat transcript pasted into the ticket's notes field, so the human agent can read the full conversation exactly as the customer wrote it.
Moves raw text instead of conclusions, so the human still has to read and analyse the whole conversation.
A 40-turn transcript lands in the notes field. The facts are there somewhere, but the human must read it all, find the amounts, and work out what the agent already checked. Pick-up time drops a little at best.
B · Why this meets the requirement
A structured summary with customer ID, order IDs, the issue, what was verified and tried, the likely root cause, the amount, and a recommended action.
Gives the human everything needed to act at once, including the agent's analysis and proposed next step.
The ticket arrives with fields such as customer_id C-88412, orders 7731 and 7740, 'modem failed after line upgrade', 'outage confirmed in network log', 'credit 186.00 exceeds agent limit', 'recommend approve full credit'. The human checks and approves in about a minute.
C · Why this does not meet the full requirement
A short note asking the customer to describe the problem again to the human agent, who then starts a fresh investigation with full backend access.
Throws away the agent's investigation and makes the customer repeat themselves, which hurts experience.
The customer has already explained the problem to the agent. Being asked to start over is the experience that makes people angry, and the human repeats lookups the agent already performed, so time per ticket may even rise.
D · Why this does not meet the full requirement
A priority score from one to five based on the customer's frustration level, so that the human team handles the most upset customers first.
Ranks by emotion rather than by facts, and still tells the human nothing about the case itself.
Frustration is not the same as urgency or complexity. A calm customer with a large refund may wait behind an annoyed one with a simple question, and every ticket still arrives without the case facts.
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 (illustrative values)
{"customer_id": "C-88412", "order_ids": ["7731"], "issue": "Modem failed after line upgrade", "verified": ["identity via get_customer", "outage in network log", "inside 60-day credit window"], "root_cause": "Faulty modem firmware", "amount": 186.00, "reason_for_escalation": "Refund above 150 agent limit", "recommended_action": "Approve full credit"}Every field answers a question the human would otherwise have to research.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Humans who take over a case cannot see the chat. What should the agent hand 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 HITL
Return to Foundations Mock Exam 4 · Q714's situation and clause-by-clause explanation
Answer
**B.** The human cannot see the conversation, so the handoff itself must carry the facts and the agent's conclusion in a form that is quick to act on. A pasted transcript technically delivers the information but makes the human re-read and re-derive it, which is the 11-minute cost. Asking the customer to repeat everything wastes the work already done.Q715. A PreToolUse gate already blocks process_refund unless check_credit_policy has run earlier in the conversation. An audit finds a customer with two orders who received a refund for order 5512 after the policy check ran only for order 5508; order 5512 was outside its credit window. Which change closes this gap? (Select ONE.) A) Route any conversation that mentions two or more order numbers to escalate_to_human, so multi-order cases are always handled by staff. B) Record each check_credit_policy result by order ID and let the gate allow process_refund only for an order ID with an eligible result. C) Require a fresh get_customer verification immediately before every process_refund call so the agent re-confirms the account before money moves. D) Add a system prompt rule telling the agent to run check_credit_policy again for every order it intends to refund during the conversation.
Understand Foundations Mock Exam 4 · Q715 · the situation and each part of the question
The real situation behind this question
Corvane thought refunds were safe because a hook blocks process_refund until the credit policy has been checked. Then finance found an ineligible refund. The customer had asked about two orders. The agent checked the first order, which was fine, and then refunded the second one, which was outside its window. The hook only asked 'did a policy check happen at all?' The team must decide how to make the gate check the real rule.
Read the question in parts
Part 1 · unless check_credit_policy has run earlier in the conversation
the current prerequisite is session-wide, so one eligible order unlocks refunds for every order.
Part 2 · order 5512 was outside its credit window
the money moved for an order that never passed its own eligibility check, a real financial error.
What you are being asked to decide
The refund gate checks that a policy lookup happened, but not for which order. How do you make it check the right thing? Tests designing a programmatic prerequisite whose condition matches the business rule exactly.
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 |
|---|---|
| PreToolUse gate | harness code that runs before process_refund executes and can deny the call |
| Deterministic | the refund is allowed or blocked by code every time, not by whether the model remembers an instruction |
Study: Harness controls — what makes an agent production-grade Hook Harness Deterministic
Understand Foundations Mock Exam 4 · Q715's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The gate passed because its condition was 'a policy check ran', not 'this order is eligible'. A financial prerequisite must match the exact rule it protects. So the harness keys eligibility by order ID and allows process_refund only for that order.
Connect the design to the situation
Order 5508 passed the policy check, and the gate then let a refund through for order 5512.
Best answer: B. The gate exists but checks the wrong condition: 'a policy check happened' instead of 'this order passed the policy check'. Keying the prerequisite to the order ID makes the guarantee match the business rule. A prompt rule brings back probabilistic compliance, and re-verifying the customer checks identity, which was never the failure.
The decisive evidence in the stem
after the policy check ran only for order 5508
The prerequisite was satisfied by a different order, so the gate's condition is too coarse; it must bind eligibility to the specific order being refunded.
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
Route any conversation that mentions two or more order numbers to escalate_to_human, so multi-order cases are always handled by staff.
Sends many easy multi-order cases to humans and hurts first-contact resolution without fixing the gate.
Many customers mention two orders in simple cases, such as asking about two installation dates. Escalating all of them moves solvable work to humans, lowers first-contact resolution, and still leaves single-order refunds governed by the coarse gate.
B · Why this meets the requirement
Record each check_credit_policy result by order ID and let the gate allow process_refund only for an order ID with an eligible result.
Makes the gate's condition per order, so only an order that passed its own policy check can be refunded.
The harness stores {order_id: eligible} from each check_credit_policy result. When process_refund arrives for 5512, the hook looks up 5512, finds no eligible result, and denies the call with a message telling the agent to check that order first.
C · Why this does not meet the full requirement
Require a fresh get_customer verification immediately before every process_refund call so the agent re-confirms the account before money moves.
Strengthens identity checks, but the refund failed on order eligibility, not on who the customer was.
Calling get_customer again proves the account is the right one. It says nothing about whether order 5512 is inside its credit window. The extra call adds latency and leaves the eligibility gap exactly where it was.
D · Why this does not meet the full requirement
Add a system prompt rule telling the agent to run check_credit_policy again for every order it intends to refund during the conversation.
Returns enforcement of a financial rule to the prompt, which has a non-zero failure rate.
The agent will usually re-check each order, but the original problem is that the rule must hold every time money moves. A prompt instruction can be skipped in a long, multi-order chat, and the audit would eventually find another ineligible refund.
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.
Per-order prerequisite (illustrative)
eligible = {} # order_id -> bool, filled from check_credit_policy results
def record_policy(tool_input, tool_output):
eligible[tool_input['order_id']] = tool_output.get('eligible') is True
def pre_refund_gate(tool_input):
oid = tool_input['order_id']
if not eligible.get(oid):
return {'decision': 'deny', 'reason': f'Run check_credit_policy for order {oid} first.'}
return {'decision': 'allow'}The gate's condition names the order being refunded, so a check on another order cannot satisfy it.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The refund gate checks that a policy lookup happened, but not for which order. How do you make it check the right thing?
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 Hook Harness Deterministic
Return to Foundations Mock Exam 4 · Q715's situation and clause-by-clause explanation
Answer
**B.** The gate exists but checks the wrong condition: 'a policy check happened' instead of 'this order passed the policy check'. Keying the prerequisite to the order ID makes the guarantee match the business rule. A prompt rule brings back probabilistic compliance, and re-verifying the customer checks identity, which was never the failure.Q716. When process_refund fails, the MCP server returns 'Operation failed' for every cause. Logs show the agent retrying refunds of non-refundable activation fees three times, then telling customers 'we are having a system issue', while genuine timeouts get the same treatment. What change to the tool's error responses would most improve the agent's recovery? (Select ONE.) A) Return isError with an errorCategory, an isRetryable flag and a readable message, so fee refusals are final and timeouts retryable. B) Escalate every process_refund failure to escalate_to_human automatically, so a person investigates each failed refund instead of the agent. C) Add a system prompt instruction telling the agent never to retry a refund more than once, whatever the error message says. D) Return HTTP status codes in the error text, such as 403 or 504, so the agent can tell different failures apart by the number it sees.
Understand Foundations Mock Exam 4 · Q716 · the situation and each part of the question
The real situation behind this question
Corvane charges a one-time activation fee that can never be refunded. When the agent tries to refund it, the refund service says only 'Operation failed', the same message it sends when the billing system is slow. So the agent keeps retrying, then blames a system problem. Customers call back angry, and some think the company is hiding something. The architect must redesign what the tool reports when it fails.
Read the question in parts
Part 1 · retrying refunds of non-refundable activation fees three times
retries are wasted on an error that can never succeed, because the agent lacks a retryable signal.
Part 2 · while genuine timeouts get the same treatment
two very different failures look identical, so no single agent behaviour can be right for both.
What you are being asked to decide
Every refund failure says 'Operation failed', so the agent retries hopeless cases. What should the error say? 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 here: business (a non-refundable fee), transient (timeout), validation and permission |
| isError | the MCP result flag that tells the agent this process_refund call failed |
Study: The MCP error contract — isError and structured error metadata Error taxonomy MCP server
Understand Foundations Mock Exam 4 · Q716's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A uniform 'Operation failed' hides the one fact the agent needs: can a retry ever succeed? Structured metadata with a category, a retryable flag and a readable message lets it retry timeouts and explain business refusals. Number codes, retry caps or blanket escalation all leave the agent guessing.
Connect the design to the situation
An activation-fee refund is retried three times and the customer hears 'system issue' instead of 'activation fees are non-refundable'.
Best answer: A. The agent cannot choose a good recovery when every failure looks the same. Structured metadata tells it whether to retry, and the readable explanation lets it tell the customer the real reason for a business-rule refusal. Status codes leave the agent to interpret numbers, and a blanket retry limit treats a policy refusal and a timeout the same way.
The decisive evidence in the stem
returns 'Operation failed' for every cause
A uniform error hides whether the failure is a business rule or a transient fault, so the agent cannot decide between retrying and explaining.
Official objective tested: Task 2.2 · Implement structured error responses for MCP tools
What each choice would do here
A · Why this meets the requirement
Return isError with an errorCategory, an isRetryable flag and a readable message, so fee refusals are final and timeouts retryable.
Tells the agent exactly what failed, whether a retry can help, and what to say to the customer.
An activation-fee refusal returns isError true, errorCategory 'business', isRetryable false, and 'Activation fees are non-refundable; a bill credit for the first month is possible'. A timeout returns 'transient', isRetryable true. The agent retries timeouts and explains activation-fee refusals at once.
B · Why this does not meet the full requirement
Escalate every process_refund failure to escalate_to_human automatically, so a person investigates each failed refund instead of the agent.
Sends simple, explainable refusals to humans and lowers first-contact resolution for no gain.
Activation-fee refusals are clear policy that the agent can explain in one sentence. Sending all of them to humans wastes staff time and makes customers wait for an answer that the agent could have given immediately.
C · Why this does not meet the full requirement
Add a system prompt instruction telling the agent never to retry a refund more than once, whatever the error message says.
Treats a timeout and a policy refusal the same, so timeouts get too few retries and policy cases still get one.
With one retry allowed, a slow billing system gets only one more attempt, and activation-fee refusals still get one wasted retry. The customer still hears a vague message, because the agent still does not know the reason.
D · Why this does not meet the full requirement
Return HTTP status codes in the error text, such as 403 or 504, so the agent can tell different failures apart by the number it sees.
Gives the agent a number to interpret rather than an explicit category and retry decision.
The agent sees '403' or '504' in text and must guess what each means for this business. 403 might mean a non-refundable fee or missing permission. The agent still has no explicit retry signal and no customer-ready explanation.
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.
Structured MCP error result (illustrative)
{"isError": true, "content": [{"type": "text", "text": "{\"errorCategory\": \"business\", \"isRetryable\": false, \"code\": \"NONREFUNDABLE_FEE\", \"message\": \"Activation fees are non-refundable. A first-month bill credit is available.\"}"}]}The agent branches on errorCategory and isRetryable, and can quote the message to the customer.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Every refund failure says 'Operation failed', so the agent retries hopeless cases. What should the error say?
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
Return to Foundations Mock Exam 4 · Q716's situation and clause-by-clause explanation
Answer
**A.** The agent cannot choose a good recovery when every failure looks the same. Structured metadata tells it whether to retry, and the readable explanation lets it tell the customer the real reason for a business-rule refusal. Status codes leave the agent to interpret numbers, and a blanket retry limit treats a policy refusal and a timeout the same way.Q717. A customer writes one message: the router from order 7731 arrived dead, order 7740 was charged twice, and the installation visit for order 7752 must move to another day. Logs show the agent resolves the router issue thoroughly, then ends the conversation, leaving the other two unaddressed. Which change best handles messages like this? (Select ONE.) A) Instruct the agent to handle only the first issue in each message and then ask the customer to send any remaining issues as new conversations. B) Split the message into three separate tickets automatically and send each one to the human team, since multi-issue contacts are complex by nature. C) Have a classifier pick the primary concern of each message and route the conversation to the tool set designed for that single concern. D) Have the agent first list each distinct concern as an item, investigate the items using the shared customer context, then send one combined resolution.
Understand Foundations Mock Exam 4 · Q717 · the situation and each part of the question
The real situation behind this question
Customers rarely send one tidy question. One Corvane customer wrote a single long message about a dead router, a double charge on a different order, and an installation visit that must move. The agent handled the router perfectly, said goodbye, and stopped. The customer had to contact support twice more. The architect must choose how the agent should treat messages that contain several separate problems.
Read the question in parts
Part 1 · one message
the three concerns arrive together, so the agent must separate them itself before acting.
Part 2 · resolves the router issue thoroughly, then ends the conversation
the agent's quality per issue is fine; what is missing is coverage of every issue raised.
What you are being asked to decide
A customer raises three problems at once and the agent solves only one. How should it handle such messages? Tests decomposing a multi-concern request into items, investigating each, then resolving them together.
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 | turning the single customer message into three separate items: faulty router, double charge, rescheduled visit |
| Parallelization | looking up orders 7731, 7740 and 7752 in the same step instead of one after another |
Study: Harness controls — what makes an agent production-grade Decomposition Parallelization
Understand Foundations Mock Exam 4 · Q717's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The failure is coverage, not quality: the agent treats one message as one task. Decomposing the message into items and investigating each with the shared customer context fixes coverage without losing first-contact resolution. Routing to one concern or to humans only hides the dropped items.
Connect the design to the situation
Dead router, double charge and a visit to reschedule arrive in one message about three different orders.
Best answer: D. A multi-concern request should be decomposed into distinct items, each investigated with the shared customer context, and then resolved in one unified reply. Picking a primary concern throws the other two away, just less visibly. Handing all three to humans gives up on issues the agent can clearly resolve.
The decisive evidence in the stem
leaving the other two unaddressed
The agent treats the message as one task, so it needs an explicit step that turns the message into separate items before it starts investigating.
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
Instruct the agent to handle only the first issue in each message and then ask the customer to send any remaining issues as new conversations.
Pushes work back to the customer and makes one contact into three, the opposite of first-contact resolution.
The agent would resolve the router and then tell the customer to start two new chats. The customer repeats identity checks twice, first-contact resolution drops, and the technician may arrive on the wrong day for order 7752.
B · Why this does not meet the full requirement
Split the message into three separate tickets automatically and send each one to the human team, since multi-issue contacts are complex by nature.
Escalates issues the agent can resolve and floods the human team with tickets that need no human.
Three tickets reach a human team that is supposed to handle only exceptions. Each one is simple, so people spend time on work the agent was built to do, and the customer waits longer for all three answers.
C · Why this does not meet the full requirement
Have a classifier pick the primary concern of each message and route the conversation to the tool set designed for that single concern.
Chooses one concern by design, so the other two are still dropped, now by a routing layer.
The classifier labels the message 'equipment' and the agent receives equipment tools. The double charge and the visit change are now never even considered, so the design makes the observed failure permanent.
D · Why this meets the requirement
Have the agent first list each distinct concern as an item, investigate the items using the shared customer context, then send one combined resolution.
Makes every concern an explicit item, investigates each with shared context, and closes them all in one reply.
The agent writes three items, calls lookup_order for 7731, 7740 and 7752 together, checks each against policy with the same verified customer, and replies once: replacement router shipped, duplicate charge reversed, and the visit moved.
Check your understanding · explain the design in your own words
A customer raises three problems at once and the agent solves 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
Return to Foundations Mock Exam 4 · Q717's situation and clause-by-clause explanation
Answer
**D.** A multi-concern request should be decomposed into distinct items, each investigated with the shared customer context, and then resolved in one unified reply. Picking a primary concern throws the other two away, just less visibly. Handing all three to humans gives up on issues the agent can clearly resolve.Q718. Your agent loop exits as soon as a model response contains any text block. In about 7% of conversations Claude replies 'Let me pull up that service order for you' together with a lookup_order tool_use block, and the loop ends before the tool runs, so the customer receives no answer. Which change to the loop's control flow fixes this reliably? (Select ONE.) A) Replace the text check with a fixed budget of eight model calls per conversation, so every request has enough turns to finish its tool work. B) Keep the text check, but add a regular expression that continues the loop whenever the reply contains phrases such as 'let me check' or 'one moment'. C) Drive the loop from stop_reason: run the requested tools and return their results while it is 'tool_use', and finish only when it is 'end_turn'. D) Tell the agent in the system prompt never to write text in the same turn as a tool call, so a text block always means the work is finished.
Understand Foundations Mock Exam 4 · Q718 · the situation and each part of the question
The real situation behind this question
Corvane's support agent often tells the customer what it is about to do before it does it. That is good customer experience. But the developer who wrote the first loop treated 'the reply has text' as 'the agent is finished'. So the loop quits right after the friendly sentence and never runs the order lookup. Customers see a promise and then silence. The team needs a loop rule that does not depend on how Claude words its replies.
Read the question in parts
Part 1 · exits as soon as a model response contains any text block
the current stop rule inspects content, which the guide lists as an anti-pattern for loop termination.
Part 2 · the loop ends before the tool runs
a requested tool call is dropped, so the model never receives the tool_result it needs to answer.
What you are being asked to decide
The loop stops when it sees text, but Claude sometimes writes text and asks for a tool in the same reply. What should decide when the loop stops? Tests using stop_reason, not text content or a turn cap, as the loop's continue/stop signal.
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 |
|---|---|
| Agent loop | your application code that sends a request, runs requested tools, sends results back, and repeats |
| stop_reason | the field in each API response that says why Claude stopped: here 'tool_use' (wants lookup_order) or 'end_turn' (done) |
Study: Stop reasons — memorize this table Agent loop stop_reason tool_use
Understand Foundations Mock Exam 4 · Q718's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A response can contain friendly text and a pending tool call at the same time. Only stop_reason reports whether Claude is waiting for a tool result. So the loop continues on 'tool_use' and ends on 'end_turn', with any iteration cap kept only as a safety limit.
Connect the design to the situation
Claude says 'Let me pull up that service order' and requests lookup_order in the same response; the loop quits before running it.
Best answer: C. The API already says whether Claude wants a tool: stop_reason is 'tool_use' when a tool call is pending and 'end_turn' when Claude is done. A response can contain text and a tool call together, so text is not a completion signal. The phrase-matching fix still parses natural language, and a fixed call budget turns an arbitrary cap into the stopping rule.
The decisive evidence in the stem
together with a lookup_order tool_use block
The response carries both text and a pending tool call, so any rule based on the presence of text ends the loop while work is still requested.
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
Replace the text check with a fixed budget of eight model calls per conversation, so every request has enough turns to finish its tool work.
Makes an arbitrary cap the main stop rule, so simple chats waste calls and long cases can still be cut off.
Eight calls is too many for 'when is my installation' and may be too few for a three-account billing dispute. A conversation that finishes early still waits for no reason, and one that needs more tools is cut off. A cap is a safety net, not the stop condition.
B · Why this does not meet the full requirement
Keep the text check, but add a regular expression that continues the loop whenever the reply contains phrases such as 'let me check' or 'one moment'.
Still decides termination by parsing Claude's wording, which breaks the first time Claude phrases it differently.
The regular expression catches today's phrases, but Claude also writes 'I'll look into that' or 'Checking now'. Each new wording causes another dropped tool call, and the team ends up maintaining a growing phrase list that still cannot see the pending tool_use block.
C · Why this meets the requirement
Drive the loop from stop_reason: run the requested tools and return their results while it is 'tool_use', and finish only when it is 'end_turn'.
Uses the structured signal the API provides for exactly this decision, independent of any text in the response.
The loop checks stop_reason after each response. When it is 'tool_use', the harness runs lookup_order, appends the tool_result as a user message, and calls the API again. When it is 'end_turn', the final answer goes to the customer. Text in the response no longer matters.
D · Why this does not meet the full requirement
Tell the agent in the system prompt never to write text in the same turn as a tool call, so a text block always means the work is finished.
Tries to change model behaviour with an instruction that will sometimes be ignored, and keeps the wrong signal.
Claude may follow the instruction most of the time, but prompts are probabilistic. The rule also removes a helpful customer-facing sentence. And the loop still looks at text, so any miss produces the same silent failure.
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 driven by stop_reason (illustrative)
while True:
resp = client.messages.create(model=MODEL, system=SYSTEM, tools=TOOLS, messages=messages, max_tokens=1024)
messages.append({'role': 'assistant', 'content': resp.content})
if resp.stop_reason != 'tool_use':
break # 'end_turn': deliver the final answer
results = [run_tool(b) for b in resp.content if b.type == 'tool_use']
messages.append({'role': 'user', 'content': results})Text blocks can appear in either kind of response; only stop_reason decides whether a tool result is still owed.
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.
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 when it sees text, but Claude sometimes writes text and asks for a tool in the same reply. 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: Stop reasons — memorize this table
Study: Stop reasons — memorize this table Agent loop stop_reason tool_use
Return to Foundations Mock Exam 4 · Q718's situation and clause-by-clause explanation
Answer
**C.** The API already says whether Claude wants a tool: stop_reason is 'tool_use' when a tool call is pending and 'end_turn' when Claude is done. A response can contain text and a tool call together, so text is not a completion signal. The phrase-matching fix still parses natural language, and a fixed call budget turns an arbitrary cap into the stopping rule.Q719. Every contact form already includes the customer's email, and your harness sends the first request with tool_choice set to 'auto'. In 9% of conversations the agent's first reply is text asking 'Could you share your email?' instead of calling get_customer with the email it was given. How should you configure the first request? (Select ONE.) A) Keep tool_choice 'auto' and add a system prompt line saying the email is always provided and must be used with get_customer right away. B) Force get_customer with tool_choice {'type': 'tool', 'name': 'get_customer'} on the first request only, then use 'auto' for the following turns. C) Set tool_choice to 'any' on every request in the conversation, so the agent must always call one of its tools rather than reply in text. D) Remove every other tool from the first request so that get_customer is the only option, then add the full tool list back afterwards.
Understand Foundations Mock Exam 4 · Q719 · the situation and each part of the question
The real situation behind this question
Corvane's contact form makes customers type their email before they start. The agent should use it immediately to find the account. But with the default setting, the agent sometimes opens with a polite question asking for the email again. Customers find this silly and some leave. The architect knows the API can control whether and which tool Claude must call. They must pick the setting for the first request.
Read the question in parts
Part 1 · Every contact form already includes the customer's email
the required input for get_customer always exists, so forcing that call never lacks data.
Part 2 · instead of calling get_customer
one specific tool must run first, which a forced tool_choice can guarantee.
What you are being asked to decide
The agent should always look up the customer first, but sometimes asks for an email it already has. How do you set tool_choice? Tests forcing a specific first tool call, then returning to auto for later turns.
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_choice | the request parameter your harness sets: 'auto', 'any', or one named tool such as get_customer |
| Forced tool | tool_choice naming get_customer, so the first response must be that tool call |
Study: Tool choice: auto, any, or one forced tool tool_choice Messages array
Understand Foundations Mock Exam 4 · Q719's answer · full reasoning and worked examples
Claude synthesized · the point, straight
'auto' lets Claude answer in text, which is why it sometimes asks for the email it already has. Forcing get_customer on the first request guarantees that call, and switching to 'auto' afterwards keeps normal replies possible. 'any' everywhere or a trimmed tool list either over-constrains or under-constrains.
Connect the design to the situation
The form contains anna@example.com, yet the agent asks 'Could you share your email?'.
Best answer: B. Forcing a named tool guarantees that a specific tool runs first, and returning to 'auto' afterwards lets the agent reply in text when it should. 'any' on every turn would stop the agent from ever answering the customer in text. Trimming the tool list to one tool still leaves 'auto' free to reply in text.
The decisive evidence in the stem
with tool_choice set to 'auto'
With 'auto' the model may answer in text instead of calling a tool, which is exactly the observed first-turn behaviour.
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 tool_choice 'auto' and add a system prompt line saying the email is always provided and must be used with get_customer right away.
Keeps the setting that allows a text reply, so a share of first turns still asks for the email.
The extra prompt line reduces the 9% but cannot remove it, because 'auto' still allows a text reply. Some customers keep getting the odd question, and the team keeps adjusting wording.
B · Why this meets the requirement
Force get_customer with tool_choice {'type': 'tool', 'name': 'get_customer'} on the first request only, then use 'auto' for the following turns.
Guarantees get_customer runs first and then gives the agent its normal freedom for the rest.
The harness sends turn one with tool_choice naming get_customer, so Claude returns a get_customer call with the form's email. From turn two the harness sends 'auto', so the agent can call other tools or reply to the customer as needed.
C · Why this does not meet the full requirement
Set tool_choice to 'any' on every request in the conversation, so the agent must always call one of its tools rather than reply in text.
Guarantees a tool call but also blocks every text reply, so the agent could never answer the customer.
The first turn now calls a tool, but so does every later turn. When the agent should tell the customer 'your refund is done', it is forced to call some tool instead. The harness would need special cases to ever reply, and the design breaks.
D · Why this does not meet the full requirement
Remove every other tool from the first request so that get_customer is the only option, then add the full tool list back afterwards.
Leaves 'auto' in place, so the model can still reply in text even with only one tool offered.
With one tool and 'auto', Claude can still reply in text instead of calling it. The harness also has to rebuild the tool list mid-conversation, which adds complexity without the guarantee the team wants.
Check your understanding · explain the design in your own words
The agent should always look up the customer first, but sometimes asks for an email it already has. How do you set tool_choice?
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: Tool choice: auto, any, or one forced tool
Study: Tool choice: auto, any, or one forced tool tool_choice Messages array
Return to Foundations Mock Exam 4 · Q719's situation and clause-by-clause explanation
Answer
**B.** Forcing a named tool guarantees that a specific tool runs first, and returning to 'auto' afterwards lets the agent reply in text when it should. 'any' on every turn would stop the agent from ever answering the customer in text. Trimming the tool list to one tool still leaves 'auto' free to reply in text.Q720. You are reviewing the agent's system prompt before launch. Legal has marked some of its rules as 'must hold on every single conversation'; others are style guidance. Which TWO rules should you move out of the prompt into hooks or other harness code so they are enforced deterministically? (Select TWO.) A) A refund above 150 dollars is never processed by the agent; the case must go to escalate_to_human with a summary for staff approval. B) When the customer has no stated preference, offer a bill credit first and a refund to the card second, explaining both options briefly. C) process_refund may run only for a customer ID that get_customer returned as verified earlier in the same conversation. D) When a customer sounds frustrated, acknowledge the feeling in one sentence before offering the next step toward a solution.
Understand Foundations Mock Exam 4 · Q720 · the situation and each part of the question
The real situation behind this question
Before Corvane launches its agent, legal reviews the system prompt line by line. Some rules protect money and identity, and legal says they must hold in every conversation, even the strangest one. Other rules describe tone and sales preferences. The architect knows that a model follows prompt rules most of the time, not all of the time. They must pick which rules move into code that runs around the model.
Read the question in parts
Part 1 · others are style guidance
some rules tolerate occasional variation and need judgment, so they can stay as prompt instructions.
Part 2 · enforced deterministically
the chosen rules must be checked by code on every tool call, independent of what the model decides.
What you are being asked to decide
Some rules must never be broken; others are about tone. Which ones belong in code? Tests separating rules that need deterministic enforcement from guidance that can stay in the prompt.
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 | Agent SDK code that runs before a tool call such as process_refund and can deny it or redirect the agent |
| Guardrail | a control that keeps the agent inside policy, here enforced by code rather than requested in text |
Study: Agent SDK hooks: block a call, clean up a result Hook Guardrail Deterministic
Understand Foundations Mock Exam 4 · Q720's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Rules that must never fail and that a tool call can violate belong in hooks; tone and preference stay in the prompt. The refund limit and the verified-identity prerequisite both guard money on a specific tool call. So code enforces those two, and the prompt keeps the guidance.
Connect the design to the situation
A refund limit, an identity prerequisite, an empathy rule and a bill-credit preference all sit in one system prompt.
Best answer: AC. The refund limit and the verified-identity prerequisite protect money and must hold every time, so each belongs in a hook that denies or redirects the tool call. Acknowledging frustration and offering a bill credit first are judgment and tone, where occasional variation is acceptable and a prompt is the right home. Each correct rule is independently a compliance rule.
The decisive evidence in the stem
'must hold on every single conversation'
Rules that must never fail need deterministic enforcement, because prompt instructions alone have a non-zero failure rate in production.
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 refund above 150 dollars is never processed by the agent; the case must go to escalate_to_human with a summary for staff approval.
A money limit that legal requires every time; a PreToolUse hook can deny the refund and point the agent to escalation.
A PreToolUse hook reads the amount in the process_refund input. If it exceeds 150, the hook denies the call and returns a reason telling the agent to call escalate_to_human with a summary. The limit holds even in a 50-turn conversation.
B · Why this does not meet the full requirement
When the customer has no stated preference, offer a bill credit first and a refund to the card second, explaining both options briefly.
A preference for how to present options; it needs judgment, and an occasional variation causes no compliance breach.
Offering a bill credit first is a business preference. If the agent occasionally mentions the card refund first, nothing illegal happens. Forcing it in code would also need judgment about when the customer has already stated a preference.
C · Why this does not meet the full requirement
process_refund may run only for a customer ID that get_customer returned as verified earlier in the same conversation.
A prerequisite for moving money; the harness can check the verified ID before process_refund runs.
The harness records the customer ID that get_customer returned as verified. A hook on process_refund compares the refund's customer ID with it and denies any mismatch, so a refund to an unverified account cannot happen.
D · Why this does not meet the full requirement
When a customer sounds frustrated, acknowledge the feeling in one sentence before offering the next step toward a solution.
Tone guidance; small variation is harmless, and code cannot judge when a sentence of empathy fits.
Code cannot reliably detect when a customer is frustrated or write a natural sentence of empathy. If the agent sometimes skips the acknowledgement, the customer experience dips slightly, but no policy or law is broken.
Check your understanding · explain the design in your own words
Some rules must never be broken; others are about tone. Which ones belong in 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: Agent SDK hooks: block a call, clean up a result
Study: Agent SDK hooks: block a call, clean up a result Hook Guardrail Deterministic
Return to Foundations Mock Exam 4 · Q720's situation and clause-by-clause explanation
Answer
**AC.** The refund limit and the verified-identity prerequisite protect money and must hold every time, so each belongs in a hook that denies or redirects the tool call. Acknowledging frustration and offering a bill credit first are judgment and tone, where occasional variation is acceptable and a prompt is the right home. Each correct rule is independently a compliance rule.Q721. During a 40-minute order-database outage, lookup_order returned an empty list for every query, exactly as it does when an email has no orders. The agent told hundreds of customers 'I can't find any orders under your email' and several placed duplicate service orders. How should lookup_order report results so the agent can respond correctly? (Select ONE.) A) Return a timeout as an isError transient, retryable failure, and a real no-match as a successful empty result naming the email that was searched. B) Return an empty list in both cases but add a note to the system prompt that empty results may sometimes be caused by outages. C) Raise an exception in the MCP server on any database problem, so the whole conversation stops and the customer is asked to try later. D) Have the agent call lookup_order three times whenever the list is empty, and treat the result as real only if all three are empty.
Understand Foundations Mock Exam 4 · Q721 · the situation and each part of the question
The real situation behind this question
Corvane's order database went down for 40 minutes on a busy afternoon. The lookup tool hid the failure and simply returned an empty list. To the agent this looked exactly like a customer with no orders, so it told many customers that their orders did not exist. Some panicked and ordered service again. The architect must change how the tool reports 'could not look' versus 'looked and found nothing'.
Read the question in parts
Part 1 · returned an empty list for every query
the failure was suppressed and presented as a successful search, which is the silent-error anti-pattern.
Part 2 · several placed duplicate service orders
the wrong interpretation has real business cost, so the tool must make the two cases unambiguous.
What you are being asked to decide
An outage and 'no orders found' look the same to the agent. How should the tool report them? Tests distinguishing access failures from valid empty results in tool responses.
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 | the search worked and this email truly has no orders, a successful answer |
| Graceful degradation | during the outage the agent still behaves sensibly, for example by apologizing and offering a callback |
Study: The MCP error contract — isError and structured error metadata Error taxonomy Graceful degradation
Understand Foundations Mock Exam 4 · Q721's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The tool turned 'could not look' into 'found nothing', so the agent gave confident wrong answers. Reporting the outage as a retryable transient error and the no-match as a successful empty result restores the difference. Only then can the agent choose between retrying and asking for another identifier.
Connect the design to the situation
The database is down, the tool returns [], and the agent tells customers they have no orders.
Best answer: A. An access failure and a valid empty result mean opposite things: one says 'we could not look', the other says 'we looked and found nothing'. Reporting them differently lets the agent retry or apologize for an outage in the first case and ask for another identifier in the second. Triple-calling still cannot tell a 40-minute outage from a true no-match.
The decisive evidence in the stem
exactly as it does when an email has no orders
The tool gives identical output for an access failure and a successful empty query, so the agent cannot distinguish them.
Official objective tested: Task 2.2 · Implement structured error responses for MCP tools
What each choice would do here
A · Why this meets the requirement
Return a timeout as an isError transient, retryable failure, and a real no-match as a successful empty result naming the email that was searched.
Makes the two situations visibly different, so the agent can retry an outage or ask for another identifier.
During the outage the tool returns isError true, errorCategory 'transient', isRetryable true, so the agent retries once and then apologizes and offers a follow-up. A real no-match returns success with orders: [] and searched_email, so the agent asks for an order number instead.
B · Why this does not meet the full requirement
Return an empty list in both cases but add a note to the system prompt that empty results may sometimes be caused by outages.
Leaves the agent unable to tell which case it is in, so the prompt note only adds doubt to real no-matches.
The agent now sees [] and a vague warning. For a real no-match it may wrongly suggest an outage, and during an outage it still cannot be sure. The data does not change, so the agent's answer is a guess either way.
C · Why this does not meet the full requirement
Raise an exception in the MCP server on any database problem, so the whole conversation stops and the customer is asked to try later.
Ends conversations on a single failure that might clear in seconds, which is an anti-pattern.
Every customer on a slow query loses the whole conversation, even if the database recovers seconds later. Terminating the workflow on a single failure is as wrong as hiding it, and first-contact resolution drops sharply.
D · Why this does not meet the full requirement
Have the agent call lookup_order three times whenever the list is empty, and treat the result as real only if all three are empty.
Adds calls during every real no-match and still reports an outage longer than the retries as 'no orders'.
Three empty answers in a row are normal for a customer with no orders, so every such chat gets two extra calls. A 40-minute outage still returns three empties, and the agent still says 'no orders'.
Check your understanding · explain the design in your own words
An outage and 'no orders found' look the same to the agent. How should the tool report 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: The MCP error contract — isError and structured error metadata
Study: The MCP error contract — isError and structured error metadata Error taxonomy Graceful degradation
Return to Foundations Mock Exam 4 · Q721's situation and clause-by-clause explanation
Answer
**A.** An access failure and a valid empty result mean opposite things: one says 'we could not look', the other says 'we looked and found nothing'. Reporting them differently lets the agent retry or apologize for an outage in the first case and ask for another identifier in the second. Triple-calling still cannot tell a 40-minute outage from a true no-match.Q722. lookup_order returns installed_at as a Unix timestamp, check_credit_policy returns window dates in ISO 8601, and the legacy network tool reports line status as numeric codes such as 3 for outage. The agent misjudges credit eligibility in about 4% of cases. The backend teams cannot change these APIs this quarter. What change addresses this most reliably? (Select ONE.) A) Give the agent a convert_timestamp tool and a decode_status tool so it can translate values itself whenever it notices a raw format. B) Add a PostToolUse hook that converts every timestamp to ISO 8601 and every status code to a named status before the agent reads the result. C) Enable extended thinking for the agent so it reasons step by step through date arithmetic and status codes before deciding eligibility. D) Add a section to the system prompt explaining how to convert Unix timestamps and listing what each numeric network status code means.
Understand Foundations Mock Exam 4 · Q722 · the situation and each part of the question
The real situation behind this question
Corvane's tools were built by three teams in three different decades. One returns dates as seconds since 1970, one as readable ISO dates, and the oldest one says '3' when it means 'outage'. The agent compares these values to decide if a credit is still allowed and gets it wrong about once in 25 cases. The backend teams are busy until next quarter. The architect needs a fix that works now and does not depend on the model translating correctly.
Read the question in parts
Part 1 · numeric codes such as 3 for outage
the meaning of a value is hidden from the model unless something translates it first.
Part 2 · misjudges credit eligibility in about 4% of cases
the failures come from inconsistent data formats, a reliability problem that needs a guaranteed fix.
What you are being asked to decide
Three tools return dates and statuses in three formats, and the agent makes mistakes. Where should the formats be unified? Tests using a PostToolUse hook to normalize heterogeneous tool data before the model processes it.
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 each MCP tool returns and can rewrite the result before the agent reads it |
| tool_result | the data from lookup_order or the network tool that is sent back to Claude |
Study: Agent SDK hooks: block a call, clean up a result Hook tool_result
Understand Foundations Mock Exam 4 · Q722's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The agent errs because the same facts arrive in three formats. A PostToolUse hook rewrites every result into one format in code before Claude reads it. That removes the translation step entirely, which prompts, extra tools or more reasoning cannot do.
Connect the design to the situation
installed_at 1760400000, window_end 2026-11-12, status 3 — and the agent miscounts the credit window.
Best answer: B. A PostToolUse hook transforms tool results in code before the model sees them, so every result arrives in one consistent format no matter which tool produced it. Prompt explanations and extra reasoning still ask the model to translate correctly every time. Conversion tools work only when the agent notices it needs them, and add calls.
The decisive evidence in the stem
The backend teams cannot change these APIs this quarter
The formats must be fixed between the tools and the model, which is exactly where a result-transforming hook runs.
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
Give the agent a convert_timestamp tool and a decode_status tool so it can translate values itself whenever it notices a raw format.
Depends on the agent noticing raw formats and choosing to call extra tools, adding calls and misses.
The agent must first recognize 1760400000 as a timestamp, then call convert_timestamp, then continue. In some conversations it will just guess, and each conversion adds a model turn and latency to every service-order lookup.
B · Why this meets the requirement
Add a PostToolUse hook that converts every timestamp to ISO 8601 and every status code to a named status before the agent reads the result.
Normalizes all data deterministically in one place, so the agent always reasons over consistent values.
After each tool call, the hook rewrites installed_at 1760400000 to '2026-10-14T00:00:00Z' and status 3 to 'outage'. The agent compares two ISO dates and a named status every time, with no translation step left to get wrong.
C · Why this does not meet the full requirement
Enable extended thinking for the agent so it reasons step by step through date arithmetic and status codes before deciding eligibility.
Spends more tokens on reasoning while still relying on the model to decode inconsistent formats correctly.
Extended thinking may improve some calculations, but it costs tokens on every request and still asks the model to interpret status 3 and epoch seconds itself. The root cause, inconsistent formats, stays in place.
D · Why this does not meet the full requirement
Add a section to the system prompt explaining how to convert Unix timestamps and listing what each numeric network status code means.
Leaves translation to the model on every result, so the error rate shrinks but does not disappear.
The prompt now explains epoch seconds and lists codes 1 to 9. The model applies the table most of the time, but date arithmetic on raw epochs still slips occasionally, and every new code requires a prompt edit. Errors fall but remain.
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.
Normalizing results after each tool call (illustrative)
from datetime import datetime, timezone
STATUS = {1: 'active', 2: 'degraded', 3: 'outage', 4: 'suspended'}
def normalize(result):
if isinstance(result.get('installed_at'), int):
ts = result['installed_at']
result['installed_at'] = datetime.fromtimestamp(ts, timezone.utc).isoformat()
if isinstance(result.get('status'), int):
result['status'] = STATUS.get(result['status'], 'unknown')
return resultRegistered as a PostToolUse hook, this runs on every result, so the model never sees the raw formats.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Three tools return dates and statuses in three formats, and the agent makes mistakes. Where should the formats be unified?
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
Return to Foundations Mock Exam 4 · Q722's situation and clause-by-clause explanation
Answer
**B.** A PostToolUse hook transforms tool results in code before the model sees them, so every result arrives in one consistent format no matter which tool produced it. Prompt explanations and extra reasoning still ask the model to translate correctly every time. Conversion tools work only when the agent notices it needs them, and add calls.Q723. To save setup time, the agent was connected to the company's whole internal MCP server, so it now sees 19 tools, including network capacity planning, marketing promo codes and technician dispatch. Since then, wrong-tool calls have tripled and the agent once dispatched a technician during a billing dispute. What is the most effective change? (Select ONE.) A) Upgrade the agent to a larger model, which is better at choosing among many similar tools without needing changes to the tool set. B) Rewrite all 19 tool descriptions in detail, adding a sentence to each about which support situations should and should not use it. C) Expose only the five or six tools the support role needs and keep the rest of the internal server's tools out of the agent's tool list. D) Add few-shot examples to the system prompt that show the agent choosing correctly among the 19 tools for common support requests.
Understand Foundations Mock Exam 4 · Q723 · the situation and each part of the question
The real situation behind this question
Connecting Corvane's agent to the full internal MCP server took one line of configuration, so a developer did it. The agent suddenly had 19 tools, including ones for network planning and marketing. Wrong-tool calls tripled, and in one billing dispute the agent dispatched a technician nobody asked for. The architect has to decide whether to teach the agent to cope with the big menu or to change the menu.
Read the question in parts
Part 1 · network capacity planning, marketing promo codes and technician dispatch
these tools are outside the support role, so the agent has no legitimate use for them.
Part 2 · wrong-tool calls have tripled
selection reliability fell when the tool count rose, the known effect of too many tools.
What you are being asked to decide
The agent got 19 tools, most of them unrelated to support, and now picks wrong ones. What do you change? Tests scoping an agent's tools to its role instead of compensating for an oversized tool set.
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 |
|---|---|
| Least privilege | the support agent gets only get_customer, lookup_order, check_credit_policy, process_refund and escalate_to_human |
| Capability bloat | the agent gaining network-planning, marketing and dispatch tools it has no reason to use |
Study: Remove irrelevant tools or explain useful ones? Least privilege Capability bloat
Understand Foundations Mock Exam 4 · Q723's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Selection got worse because the agent's menu grew to 19 tools, most outside its role. The fix is to scope the tool list to the support job so wrong choices are not available. Descriptions, examples or a larger model only help choose among tools that should be there.
Connect the design to the situation
During a billing dispute the agent dispatches a technician, a tool it should never have had.
Best answer: C. More tools means more decision complexity, and tools outside the agent's role invite misuse such as a technician dispatch in a billing dispute. Scoping the tool list to the role removes the wrong choices entirely. Better descriptions or examples help selection among tools that belong there, but cannot make irrelevant tools harmless.
The decisive evidence in the stem
it now sees 19 tools
The jump in errors followed the jump in tool count, and most of the new tools have no support purpose, so removing them is the direct fix.
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
Upgrade the agent to a larger model, which is better at choosing among many similar tools without needing changes to the tool set.
Spends more per request on a design problem; irrelevant tools are still there to be misused.
A larger model may choose slightly better, but each request still carries 19 tool definitions, and the promo-code and dispatch tools remain callable. The cost per conversation rises and the next odd case can still trigger an unrelated tool.
B · Why this does not meet the full requirement
Rewrite all 19 tool descriptions in detail, adding a sentence to each about which support situations should and should not use it.
Improves descriptions of tools that should not be available, while decision complexity stays high.
Nineteen careful descriptions take days and add tokens to every request. Selection among support tools may improve, but technician dispatch is still one plausible-looking call away during a confusing conversation.
C · Why this meets the requirement
Expose only the five or six tools the support role needs and keep the rest of the internal server's tools out of the agent's tool list.
Removes the irrelevant choices, which lowers decision complexity and prevents cross-role misuse.
The agent's MCP configuration now exposes get_customer, lookup_order, check_credit_policy, process_refund and escalate_to_human. The model chooses among five relevant tools, and dispatching a technician or issuing a promo code is simply impossible for it.
D · Why this does not meet the full requirement
Add few-shot examples to the system prompt that show the agent choosing correctly among the 19 tools for common support requests.
Adds token overhead and covers only common requests; unusual ones still reach the wrong tools.
Examples teach the common paths, and the model follows them for those. But examples cost tokens in every request, and an unusual dispute still has 14 irrelevant tools available to choose from.
Check your understanding · explain the design in your own words
The agent got 19 tools, most of them unrelated to support, and now picks wrong ones. 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 Capability bloat
Return to Foundations Mock Exam 4 · Q723's situation and clause-by-clause explanation
Answer
**C.** More tools means more decision complexity, and tools outside the agent's role invite misuse such as a technician dispatch in a billing dispute. Scoping the tool list to the role removes the wrong choices entirely. Better descriptions or examples help selection among tools that belong there, but cannot make irrelevant tools harmless.Scenario 2 · Multi-Agent Research System
Q724. The coordinator's prompt to the document analysis subagent is a 12-step procedure: open each PDF, read the executive summary, copy the third table, and so on. When the corpus includes spreadsheets, slide decks or reports without executive summaries, the subagent either stops or extracts the wrong table. How should the coordinator's delegation prompts be rewritten? (Select ONE.) A) Have the coordinator convert every corpus file to PDF with an executive summary before delegating, so the existing procedure always applies. B) Have the coordinator review each step's output and send the next step separately, so a mismatch is caught after every single step. C) State the research goal and the quality criteria, such as which figures matter and how to cite them, and let the subagent decide how to get there. D) Add more branches to the procedure, with separate step lists for spreadsheets, slide decks and reports that have no executive summary section.
Understand Foundations Mock Exam 4 · Q724 · the situation and each part of the question
The real situation behind this question
Halcyon's corpus started as PDF reports, and the coordinator's instructions to the analysis subagent were written for them, step by step. Now staff add supplementary data spreadsheets, conference slide decks, and short regulatory letters. The subagent follows the steps exactly, so it stops when there is no executive summary or copies the wrong table. Important figures are missed. The architect must decide how the coordinator should phrase its delegations.
Read the question in parts
Part 1 · a 12-step procedure
the prompt fixes the method, not the outcome, so it only works for documents shaped like the original ones.
Part 2 · spreadsheets, slide decks or reports without executive summaries
the corpus is varied and will keep changing, so the subagent must be able to adapt.
What you are being asked to decide
Step-by-step instructions break on unusual documents. What should the coordinator tell the subagent instead? Tests delegation prompts that state goals and quality criteria rather than procedures.
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 |
|---|---|
| Orchestrator | the coordinator that writes the delegation prompt for the document analysis subagent |
| Quality criteria | the standards a finding must meet, such as a dated source and the exact figure quoted |
Study: Coordinator handoffs: wait, pass context, then continue Orchestrator Prompt template
Understand Foundations Mock Exam 4 · Q724's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Procedural prompts assume every document looks the same, so they fail on new formats. Delegations should state the goal and the quality criteria and leave the method to the subagent. More branches, forced conversions or step-by-step supervision all keep the brittle procedure.
Connect the design to the situation
'Copy the third table' fails on a slide deck that has no tables numbered that way.
Best answer: C. Procedural prompts break whenever the input does not match the procedure's assumptions. Stating goals and quality criteria lets the subagent adapt its method to each document while still meeting the standard the coordinator needs. Adding branches only covers the formats someone predicted, and step-by-step supervision turns the coordinator into the worker.
The decisive evidence in the stem
the subagent either stops or extracts the wrong table
A fixed procedure fails on documents it did not anticipate, which shows the subagent needs goals it can adapt to, not steps.
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
Have the coordinator convert every corpus file to PDF with an executive summary before delegating, so the existing procedure always applies.
Adds a conversion step that distorts spreadsheets and decks to fit a procedure that should change instead.
Converting a spreadsheet to PDF flattens its structure, and a slide deck has no natural executive summary to add. The conversion loses information, takes time, and keeps a procedure that is the real problem.
B · Why this does not meet the full requirement
Have the coordinator review each step's output and send the next step separately, so a mismatch is caught after every single step.
Makes the coordinator micromanage every step, adding turns and removing the subagent's purpose.
Every step becomes a separate delegation and a coordinator review. A document needs 12 round trips, the coordinator's context fills with step outputs, and the subagent never uses its own judgment on the document.
C · Why this meets the requirement
State the research goal and the quality criteria, such as which figures matter and how to cite them, and let the subagent decide how to get there.
Tells the subagent what success looks like, so it can choose a method that suits each document.
The prompt says: 'Goal: find each trial's endpoints, effect sizes and follow-up periods. Criteria: quote exact figures, give document, page or sheet, and date; mark anything ambiguous.' The subagent reads a spreadsheet tab or a slide as needed to meet that goal.
D · Why this does not meet the full requirement
Add more branches to the procedure, with separate step lists for spreadsheets, slide decks and reports that have no executive summary section.
Grows the procedure to cover today's formats while the next unexpected format breaks it again.
The procedure grows to three branches and 30 steps. It now handles spreadsheets and decks, but the next letter format or scanned letter falls outside every branch. The team keeps adding branches, and the prompt becomes long and brittle.
Check your understanding · explain the design in your own words
Step-by-step instructions break on unusual documents. What should the coordinator tell the subagent 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: Coordinator handoffs: wait, pass context, then continue
Study: Coordinator handoffs: wait, pass context, then continue Orchestrator Prompt template
Return to Foundations Mock Exam 4 · Q724's situation and clause-by-clause explanation
Answer
**C.** Procedural prompts break whenever the input does not match the procedure's assumptions. Stating goals and quality criteria lets the subagent adapt its method to each document while still meeting the standard the coordinator needs. Adding branches only covers the formats someone predicted, and step-by-step supervision turns the coordinator into the worker.Q725. Requests range from 'What dose was used in the drug's pivotal phase 3 trial?' to 'Compare cardiovascular outcomes across ten GLP-1 trials.' The coordinator sends every request through all four subagents, so one-line factual questions take about 40 minutes and produce a multi-page report nobody asked for. How should the coordinator be redesigned? (Select ONE.) A) Run all four subagents in parallel instead of in sequence for every request, so short factual questions finish faster through the same pipeline. B) Have the coordinator analyze each request's requirements and invoke only the subagents it needs, such as web search alone for a single dosed fact. C) Build a second, hard-coded fast pipeline in application code and route requests to it whenever the question is shorter than twenty words. D) Move the coordinator to a larger model, so it handles every request faster while still sending it through the full four-agent pipeline.
Understand Foundations Mock Exam 4 · Q725 · the situation and each part of the question
The real situation behind this question
Medical-affairs reviewers use Halcyon for two very different things. Sometimes they need a quick, cited fact for a slide. Sometimes they need a long comparison for an advisory board. Today the coordinator treats both the same way: every request goes through search, analysis, synthesis and a formal report. A one-line question about one trial's dose takes 40 minutes and returns pages. Reviewers have started asking colleagues instead. The architect must redesign how the coordinator plans each request.
Read the question in parts
Part 1 · Requests range from
query complexity varies widely, so one fixed path cannot fit all of them.
Part 2 · a multi-page report nobody asked for
the full pipeline adds output, not just time, that the requester does not need.
What you are being asked to decide
Every question, even a one-line fact, goes through all four agents. How should the coordinator decide? Tests a coordinator that selects subagents dynamically based on query requirements.
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 |
|---|---|
| Orchestrator | the coordinator agent that decides which of the four subagents each request needs |
| Subagent | a specialized worker, such as web search or synthesis, that the coordinator starts through the Task tool |
Study: Choosing the simplest sufficient design Orchestrator Subagent
Understand Foundations Mock Exam 4 · Q725's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The coordinator always runs the full pipeline, so simple questions cost as much as complex ones. Its job is to read each request and invoke only the subagents that request needs. Parallelizing, word-count routing or a bigger model all keep the one-size-fits-all plan.
Connect the design to the situation
A single dose question takes 40 minutes and returns a multi-page brief.
Best answer: B. A coordinator's job includes deciding which subagents a query needs based on its complexity, not always running the full pipeline. A simple dated fact needs one search and a cited answer, not analysis, synthesis and a report. Parallelizing the full pipeline cannot work because synthesis depends on earlier results, and a word-count router is a brittle stand-in for that judgment.
The decisive evidence in the stem
sends every request through all four subagents
The coordinator never adapts the pipeline to the request, so simple questions pay the cost of the most complex workflow.
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
Run all four subagents in parallel instead of in sequence for every request, so short factual questions finish faster through the same pipeline.
Ignores that synthesis and reporting depend on earlier results, and still does unneeded work for simple questions.
Synthesis needs search and analysis results, and the report needs synthesis. Running them at the same time either breaks those dependencies or leaves the later agents waiting. Simple questions still get analysis and a report they never wanted.
B · Why this meets the requirement
Have the coordinator analyze each request's requirements and invoke only the subagents it needs, such as web search alone for a single dosed fact.
Matches the work to the request, so simple facts take one subagent and complex comparisons use all four.
The coordinator reads 'What dose was used…' and calls only the web search subagent with a goal: find the dose with a dated, citable source. It returns a two-line cited answer. For the ten-trial comparison it plans all four steps.
C · Why this does not meet the full requirement
Build a second, hard-coded fast pipeline in application code and route requests to it whenever the question is shorter than twenty words.
Replaces judgment with a word count, which misroutes short complex questions and long simple ones.
'Why did uptake stall?' is short but complex; a long question with many polite words may be simple. The router sends both the wrong way, and the team now maintains routing code outside the coordinator's reasoning.
D · Why this does not meet the full requirement
Move the coordinator to a larger model, so it handles every request faster while still sending it through the full four-agent pipeline.
Makes each step a bit faster while keeping every unnecessary step for simple questions.
A larger model may plan and write faster, but it still runs search, analysis, synthesis and reporting for a single dose. The answer is still a report, and most of the 40 minutes is spent on steps the request does not need.
Check your understanding · explain the design in your own words
Every question, even a one-line fact, goes through all four agents. How should the coordinator decide?
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: Choosing the simplest sufficient design
Study: Choosing the simplest sufficient design Orchestrator Subagent
Return to Foundations Mock Exam 4 · Q725's situation and clause-by-clause explanation
Answer
**B.** A coordinator's job includes deciding which subagents a query needs based on its complexity, not always running the full pipeline. A simple dated fact needs one search and a cited answer, not analysis, synthesis and a report. Parallelizing the full pipeline cannot work because synthesis depends on earlier results, and a word-count router is a brittle stand-in for that judgment.Q726. The corpus folder holds text extracted from 2,300 trial PDFs, with file names like 'CSR-2025-0412.txt'. Asked to find every document that reports 'QT prolongation' findings, the analysis subagent ran Glob with '/QT' and found three files, while staff know of at least twenty relevant ones. Which approach should the subagent use? (Select ONE.) A) Use Bash to list the corpus directory with ls, then pick likely files from their names and Read those to look for QT prolongation content. B) Run Glob again with broader name patterns such as '/cardiac' and '**/CSR', so that more of the relevant files match by their names. C) Glob for every .txt file in the corpus and then Read all 2,300 files into context, checking each one for QT prolongation content in turn. D) Use Grep to search file contents for 'QT prolongation' and related terms, then Read only the matching files to analyze what they say.
Understand Foundations Mock Exam 4 · Q726 · the situation and each part of the question
The real situation behind this question
Halcyon's corpus stores each clinical study report as a text file named by its report number. A staffer asks for every document about QT prolongation. The analysis subagent searches for files whose names contain 'QT' and finds three. The staffer knows there are at least twenty. Nothing is wrong with the corpus; the subagent used a tool that looks at names when the topic lives inside the text.
Read the question in parts
Part 1 · ran Glob with '**/*QT*'
the subagent searched paths, so it can only find files whose names contain the word.
Part 2 · staff know of at least twenty relevant ones
most relevant files were missed, which shows the search looked in the wrong place.
What you are being asked to decide
The agent searched file names for a topic that only appears inside the files. Which tool should it use? Tests choosing Grep for content search versus Glob for file-name patterns.
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 built-in tool that searches inside files for text such as 'QT prolongation' |
| Glob | the built-in tool that finds files whose names or paths match a pattern |
Study: Built-in tools — the selection criteria (Read, Write, Edit, Bash, Grep, Glob) Grep Glob Read
Understand Foundations Mock Exam 4 · Q726's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The topic appears inside the documents, while their names are report numbers. Grep searches contents, and Read then loads only the matching files. Glob, ls and name patterns all search names, and reading everything wastes context.
Connect the design to the situation
Glob '**/*QT*' finds 3 files; at least 20 documents report QT prolongation.
Best answer: D. Glob matches file names and paths; Grep searches file contents. The topic lives inside the documents, not in names like 'CSR-2025-0412', so Glob misses most relevant files. Grep finds the matching files, and Read then loads only those. Reading every file upfront wastes context, and broader name patterns or directory listings still rely on names.
The decisive evidence in the stem
with file names like 'CSR-2025-0412.txt'
File names carry no topic words, so a name-based search cannot find documents by what they discuss.
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 list the corpus directory with ls, then pick likely files from their names and Read those to look for QT prolongation content.
Guesses from names again, adding a shell step without searching contents.
ls prints 2,300 report names. The subagent cannot tell from 'CSR-2025-0412' what a report covers, so it guesses, reads a few, and misses most relevant documents.
B · Why this does not meet the full requirement
Run Glob again with broader name patterns such as '/cardiac' and '/CSR', so that more of the relevant files match by their names.
Still searches names, which carry report numbers rather than topics.
'**/*cardiac*' and '**/*CSR*' return hundreds of files by report prefix, most unrelated, and still miss relevant reports from other sponsors. Names simply do not describe the topic.
C · Why this does not meet the full requirement
Glob for every .txt file in the corpus and then Read all 2,300 files into context, checking each one for QT prolongation content in turn.
Fills the context with 2,300 documents when only about twenty matter.
Reading 2,300 files would overflow the context long before the end, and most of them are irrelevant. Even if it fit, the subagent would lose the twenty important ones in the middle of a huge input.
D · Why this meets the requirement
Use Grep to search file contents for 'QT prolongation' and related terms, then Read only the matching files to analyze what they say.
Searches the contents where the topic actually appears, then reads only the hits.
Grep for 'QT prolongation|QTc|torsades' returns 24 files. The subagent reads those and finds the QT findings. It starts from where the content is and reads only what matters.
Check your understanding · explain the design in your own words
The agent searched file names for a topic that only appears inside the files. Which tool should it use?
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 (Read, Write, Edit, Bash, Grep, Glob)
Study: Built-in tools — the selection criteria (Read, Write, Edit, Bash, Grep, Glob) Grep Glob Read
Return to Foundations Mock Exam 4 · Q726's situation and clause-by-clause explanation
Answer
**D.** Glob matches file names and paths; Grep searches file contents. The topic lives inside the documents, not in names like 'CSR-2025-0412', so Glob misses most relevant files. Grep finds the matching files, and Read then loads only those. Reading every file upfront wastes context, and broader name patterns or directory listings still rely on names.Q727. A teammate prototyped the document analysis worker as a small custom loop on the Messages API. To save tokens, each new request sends only the system prompt, the original task and the latest tool result. Traces show the worker reopening the same PDFs three or four times and contradicting its own earlier notes. What change fixes the loop? (Select ONE.) A) Cap the worker at six tool calls per task, so that it stops reopening documents after a fixed number of steps and returns what it has. B) Store each loaded document's text in a cache inside the worker code, so repeated load_corpus_document calls are answered without reading the corpus. C) Keep the trimmed requests, and add a system prompt rule telling the worker never to load a document it has already read during this task. D) Append every assistant turn and its tool results to the messages list, and send that full history with each request.
Understand Foundations Mock Exam 4 · Q727 · the situation and each part of the question
The real situation behind this question
Halcyon's document analysis worker started as a quick experiment. The teammate who wrote it worried about token cost, so each new call carried only the latest tool result. The worker therefore forgot everything it had read before. It kept reopening the same reports and wrote notes that contradicted earlier ones. The brief deadline is five business days, and analysis runs were taking twice as long as planned. The architect must fix how the loop builds its requests.
Read the question in parts
Part 1 · To save tokens
the design choice was a cost trade-off, and it removed information the model needs to work correctly.
Part 2 · contradicting its own earlier notes
the model cannot see its earlier reasoning, a symptom of missing history, not of a weak model.
What you are being asked to decide
The loop forgets earlier tool results to save tokens, so the worker repeats itself. What should the loop send? Tests appending tool results to the conversation history so the model can reason about the next action.
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 list of user and assistant turns your code sends on every Messages API call |
| tool_result | the text of each loaded PDF that your code sends back after a load_corpus_document call |
Study: The messages array — how the loop physically grows Messages array tool_result Agent loop
Understand Foundations Mock Exam 4 · Q727's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The model only knows what is in the request, so dropping earlier tool results erased the worker's memory. Appending every assistant turn and tool result to the messages list lets it reason about what it already did. Caches, rules or caps do not give the model back what it cannot see.
Connect the design to the situation
The worker reads the same trial-report PDF four times and contradicts a note it wrote two steps earlier.
Best answer: D. The model has no memory between API calls; it reasons only over the messages it is sent. Dropping earlier tool results removes the information it needs to decide its next step, so it re-reads documents and loses its own conclusions. A cache makes repeat reads cheaper but the model still cannot see what it learned, and a cap hides the symptom.
The decisive evidence in the stem
sends only the system prompt, the original task and the latest tool result
Earlier tool results never reach the model again, so it cannot reason about what it already read and repeats the work.
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
Cap the worker at six tool calls per task, so that it stops reopening documents after a fixed number of steps and returns what it has.
Stops the loop early on a count, so the worker returns incomplete analysis instead of fixing the cause.
After six calls the worker stops, even if it has read only half of the relevant reports. The synthesis agent receives incomplete findings, and the root cause, missing history, still makes the six calls inefficient.
B · Why this does not meet the full requirement
Store each loaded document's text in a cache inside the worker code, so repeated load_corpus_document calls are answered without reading the corpus.
Speeds up repeated reads but leaves the model blind to what it already learned.
Repeat calls now return instantly from the cache. But the model still asks for the same PDF because it does not know it saw it, and it still contradicts notes it cannot see. Time drops a little; quality does not improve.
C · Why this does not meet the full requirement
Keep the trimmed requests, and add a system prompt rule telling the worker never to load a document it has already read during this task.
Asks the model to remember reads it can no longer see, so the rule cannot work reliably.
The rule says 'do not reload documents you have read', but the model cannot see which ones it read, because those results are no longer in the request. It cannot follow the rule, so the repeated reads continue.
D · Why this meets the requirement
Append every assistant turn and its tool results to the messages list, and send that full history with each request.
Gives the model the full record of its work, which it needs to choose the next step.
After each response the loop appends the assistant turn with its tool_use blocks and a user turn with the tool_result blocks. The next request carries the whole sequence, so the model knows it read trial report 14 and what it concluded. Prompt caching can keep the repeated prefix affordable.
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.
Appending each turn to the history (illustrative)
messages = [{'role': 'user', 'content': task}]
while True:
resp = client.messages.create(model=MODEL, system=SYSTEM, tools=TOOLS, messages=messages, max_tokens=2048)
messages.append({'role': 'assistant', 'content': resp.content})
if resp.stop_reason != 'tool_use':
break
messages.append({'role': 'user', 'content': [run_tool(b) for b in resp.content if b.type == 'tool_use']})Every request carries the full history, so each decision is based on all earlier tool results.
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.
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 forgets earlier tool results to save tokens, so the worker repeats itself. 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 4 · Q727's situation and clause-by-clause explanation
Answer
**D.** The model has no memory between API calls; it reasons only over the messages it is sent. Dropping earlier tool results removes the information it needs to decide its next step, so it re-reads documents and loses its own conclusions. A cache makes repeat reads cheaper but the model still cannot see what it learned, and a cap hides the symptom.Q728. One statistics API used by the web search subagent returns 503 errors for a few seconds at a time, several times an hour. The subagent passes every 503 straight to the coordinator, which aborts the whole brief on any subagent error; three briefs missed their deadline this week. When the API stays down, staff still want the brief delivered. Which TWO changes fit best? (Select TWO.) A) Have synthesis output annotate coverage, marking which findings are well supported and which topic areas have gaps because a source stayed unavailable. B) Have the search subagent return an empty result marked as successful whenever the API fails, so the coordinator never has a reason to stop the brief. C) Keep the coordinator's abort-on-error rule but add a larger deadline buffer, so an aborted brief can be restarted from the beginning in time. D) Have the search subagent retry transient failures locally with backoff, and report only failures it cannot resolve, with what it tried and any partial results.
Understand Foundations Mock Exam 4 · Q728 · the situation and each part of the question
The real situation behind this question
Halcyon's search subagent depends on a statistics API that flickers several times an hour. Each flicker lasts a few seconds. Today the subagent reports every flicker as a failure, and the coordinator responds by cancelling the entire brief. Three briefs missed their deadline this week because of errors that would have cleared almost at once. Staff say they would rather receive a brief with a clearly marked gap than no brief. The architect must redesign failure handling.
Read the question in parts
Part 1 · aborts the whole brief on any subagent error
terminating the entire workflow on one failure is an anti-pattern that wastes all completed work.
Part 2 · staff still want the brief delivered
partial results with clearly marked gaps are acceptable, so the design should degrade gracefully.
What you are being asked to decide
Short API blips abort whole briefs. Which two changes keep briefs flowing and honest? Tests local recovery of transient failures plus coverage annotations for gaps that remain.
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 failure | a short 503 from the statistics API that usually succeeds if tried again a moment later |
| Graceful degradation | if the API stays down, the brief still ships and clearly marks the area that lacks sources |
Study: Error propagation: what a subagent reports when it fails Graceful degradation Error taxonomy Jitter
Understand Foundations Mock Exam 4 · Q728's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Brief, transient failures belong inside the subagent, which retries and escalates only what it cannot fix. When a source stays down, coverage annotations let the brief ship with the gap visible. Hiding failures as empty success and aborting on any error are the two anti-patterns to avoid.
Connect the design to the situation
A five-second 503 burst kills a brief that was 90% done.
Best answer: AD. Short transient failures should be recovered inside the subagent, and only unresolved failures should reach the coordinator, with context it can act on. When a source stays down, coverage annotations let the brief ship honestly with its gaps marked. Returning empty success hides the failure, and aborting the whole workflow on one error is the opposite anti-pattern.
The decisive evidence in the stem
for a few seconds at a time
The failures are brief and transient, so a local retry inside the subagent usually resolves them without involving the coordinator at all.
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 synthesis output annotate coverage, marking which findings are well supported and which topic areas have gaps because a source stayed unavailable.
Lets a brief ship when a source stays down, with its gaps visible to readers.
When the API stays down, the brief says '2025 prescription statistics could not be retrieved; figures below rely on 2024 national reports.' Readers see exactly which area is weaker, and the brief still meets its deadline.
B · Why this does not meet the full requirement
Have the search subagent return an empty result marked as successful whenever the API fails, so the coordinator never has a reason to stop the brief.
Hides real failures as empty successes, so the brief may state that no data exists.
The coordinator never aborts, but it also never knows the statistics were missing. Synthesis may conclude that no data exists for a topic, and the brief makes confident claims based on a silent failure.
C · Why this does not meet the full requirement
Keep the coordinator's abort-on-error rule but add a larger deadline buffer, so an aborted brief can be restarted from the beginning in time.
Keeps a workflow that dies on a single error and only budgets more time for restarts.
Briefs still die on every blip and restart from zero, now with more calendar time reserved for it. Cost doubles for affected briefs, and a bad hour of flickers can still exhaust any buffer.
D · Why this does not meet the full requirement
Have the search subagent retry transient failures locally with backoff, and report only failures it cannot resolve, with what it tried and any partial results.
Absorbs short blips where they happen and escalates only what needs a coordinator decision.
The subagent retries a 503 after one, two and four seconds with jitter. Almost every blip clears. If the API is still down after the retries, it reports {type: 'transient', source: 'stats API', query, attempts: 3, partial_results} so the coordinator can try another source or continue.
Check your understanding · explain the design in your own words
Short API blips abort whole briefs. Which two changes keep briefs flowing and honest?
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 Jitter
Return to Foundations Mock Exam 4 · Q728's situation and clause-by-clause explanation
Answer
**AD.** Short transient failures should be recovered inside the subagent, and only unresolved failures should reach the coordinator, with context it can act on. When a source stays down, coverage annotations let the brief ship honestly with its gaps marked. Returning empty success hides the failure, and aborting the whole workflow on one error is the opposite anti-pattern.Q729. To speed up large briefs, the coordinator now starts two web search subagents on the same topic, each told to 'find the most important sources on GLP-1 drug adverse events'. Their results overlap by about 60%, and the second instance adds little new evidence while doubling search cost. How should the coordinator assign the work? (Select ONE.) A) Go back to a single search instance, but give it twice the time budget, so it covers the whole topic without any risk of duplicated work. B) Let the two search instances send each other their result lists directly while they run, so each one can avoid sources the other has already found. C) Partition the scope before delegating, giving each instance distinct subtopics or source types, such as trial reports versus safety reports. D) Keep both instances on the same instruction and remove duplicate sources during synthesis, so each instance can search the topic as broadly as it likes.
Understand Foundations Mock Exam 4 · Q729 · the situation and each part of the question
The real situation behind this question
Halcyon's large briefs were slow, so the team ran two search subagents at once. Both got the same instruction. Predictably, they found mostly the same sources, and the second one cost as much as the first while adding little. The team still wants the speed of parallel search. The architect must decide how the coordinator should hand out work so that two searches find more than one.
Read the question in parts
Part 1 · Their results overlap by about 60%
most of the second instance's work repeats the first, so parallelism is not adding coverage.
Part 2 · doubling search cost
the duplication has a direct price, so removing it after the fact is not enough.
What you are being asked to decide
Two search agents with the same instruction find the same sources. How should the work be split? Tests partitioning research scope across parallel 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 |
|---|---|
| Hub-and-spoke | all communication flows through the coordinator; the search subagents do not talk to each other |
| Parallelization | running the two search subagents at the same time, which helps only if their work differs |
Study: Coordinator communication from plan to final report Hub-and-spoke Parallelization
Understand Foundations Mock Exam 4 · Q729's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Parallel subagents with identical instructions repeat each other's work. The coordinator should partition the topic into distinct subtopics or source types before delegating. Deduplicating later, letting agents coordinate directly, or dropping parallelism all fail to give speed and coverage together.
Connect the design to the situation
Two adverse-event searches return 60% of the same sources.
Best answer: C. Parallel subagents add value only when their scopes differ; identical instructions produce identical searches. Partitioning by subtopic or source type before delegation removes duplication at its source. Letting subagents message each other breaks the hub-and-spoke pattern, where the coordinator controls all communication, and deduplicating in synthesis still pays for the duplicated search.
The decisive evidence in the stem
each told to 'find the most important sources on GLP-1 drug adverse events'
Both instances received the same scope, so overlap is the expected result; the fix is distinct assignments from the coordinator.
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
Go back to a single search instance, but give it twice the time budget, so it covers the whole topic without any risk of duplicated work.
Removes duplication by removing parallelism, which gives back the speed the change was meant to add.
One instance with a bigger budget avoids duplicates, but the brief takes as long as before. The team loses the speed it wanted, and the coordinator still has not learned to split scope when it does run agents in parallel.
B · Why this does not meet the full requirement
Let the two search instances send each other their result lists directly while they run, so each one can avoid sources the other has already found.
Creates direct agent-to-agent traffic outside the coordinator, losing control and observability.
The two subagents exchange lists mid-run through a side channel the coordinator cannot see. Errors in that exchange are not handled centrally, timing is fragile, and the design moves away from routing all communication through the coordinator.
C · Why this meets the requirement
Partition the scope before delegating, giving each instance distinct subtopics or source types, such as trial reports versus safety reports.
Gives each instance a distinct slice, so parallel work adds coverage instead of repeating it.
The coordinator assigns instance one to randomized trial publications and registries and instance two to post-marketing safety reports and regulator safety communications. Overlap falls to a few shared sources, and together they cover far more ground in the same time.
D · Why this does not meet the full requirement
Keep both instances on the same instruction and remove duplicate sources during synthesis, so each instance can search the topic as broadly as it likes.
Pays for duplicated searching and then spends synthesis effort removing what should never have been fetched.
Both instances keep returning the same trial papers and news. Synthesis deduplicates them, but the searches, tool results and tokens were already paid for, and the extra coverage from the second instance stays small.
Check your understanding · explain the design in your own words
Two search agents with the same instruction find the same sources. How should the work be split?
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 Hub-and-spoke Parallelization
Return to Foundations Mock Exam 4 · Q729's situation and clause-by-clause explanation
Answer
**C.** Parallel subagents add value only when their scopes differ; identical instructions produce identical searches. Partitioning by subtopic or source type before delegation removes duplication at its source. Letting subagents message each other breaks the hub-and-spoke pattern, where the coordinator controls all communication, and deduplicating in synthesis still pays for the duplicated search.Q730. For 'Why did uptake of a once-weekly diabetes drug stall in three countries after 2023?', the coordinator writes six subtasks from the question before any research and never revises them. Early findings show a reimbursement rule change in two of the countries, but no subtask covers reimbursement, so the brief barely mentions it. Which decomposition approach fits this kind of request? (Select ONE.) A) Use adaptive decomposition: start with a mapping pass, then create and reprioritize subtasks from what each round of findings reveals. B) Have the coordinator write twelve subtasks at the start instead of six, so the plan is broad enough to include causes like reimbursement changes. C) Move the coordinator to a larger model so its first plan is more likely to predict every relevant cause before research begins. D) Use a fixed prompt chain of search, analysis, synthesis and report for every investigation, so each run follows the same well-tested sequence.
Understand Foundations Mock Exam 4 · Q730 · the situation and each part of the question
The real situation behind this question
A reviewer asks Halcyon a 'why' question about drug uptake in three countries. The coordinator immediately writes six subtasks about prices, supply shortages and prescriber habits, then sticks to them. Research soon finds that two countries changed how insurers reimburse the drug. That is probably the main cause, but no subtask exists for it, so the brief mentions it in one line. The architect must choose how the coordinator should plan investigations like this.
Read the question in parts
Part 1 · before any research
the plan is fixed before evidence exists, which suits predictable tasks, not open-ended ones.
Part 2 · Early findings show a reimbursement rule change
research produced new information that should have changed the plan, but the plan had no way to absorb it.
What you are being asked to decide
Research finds a new cause, but the plan was fixed at the start. How should open questions be broken down? Tests choosing dynamic, adaptive decomposition for open-ended investigation tasks.
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 | how the coordinator breaks 'why did uptake stall?' into research subtasks |
| Workflow | a fixed sequence of steps, which suits predictable work rather than open investigation |
Study: Multi-agent design judgments (scenario 3 territory) Decomposition Workflow
Understand Foundations Mock Exam 4 · Q730's answer · full reasoning and worked examples
Claude synthesized · the point, straight
In an open-ended investigation, the important subtopics appear during research. Adaptive decomposition adds and reprioritizes subtasks as findings arrive. Larger fixed plans, stronger planners or fixed chains all commit before the evidence exists.
Connect the design to the situation
A reimbursement change explains much of the stall, but no subtask exists for it.
Best answer: A. Open-ended investigations cannot be fully planned in advance, because the important subtopics are discovered during research. An adaptive plan generates new subtasks from intermediate findings, such as adding reimbursement once it appears. A larger upfront plan or a stronger planner still guesses before the evidence exists, and a fixed chain is the pattern for predictable work.
The decisive evidence in the stem
never revises them
The plan cannot react to what research uncovers, so a cause discovered midway gets no subtask and no coverage.
Official objective tested: Task 1.6 · Design task decomposition strategies for complex workflows
What each choice would do here
A · Why this meets the requirement
Use adaptive decomposition: start with a mapping pass, then create and reprioritize subtasks from what each round of findings reveals.
Lets findings shape the plan, so a newly discovered cause gets its own subtask and coverage.
The coordinator first maps the landscape: policy changes, prices and prescription data per country. When reimbursement appears, it adds subtasks for the rule changes and their measured effect, and drops a weak supply-shortage thread. The brief centres on the real cause.
B · Why this does not meet the full requirement
Have the coordinator write twelve subtasks at the start instead of six, so the plan is broad enough to include causes like reimbursement changes.
Makes a bigger guess before evidence exists; it may still miss causes that research reveals.
Twelve subtasks cost twice as much and may happen to include reimbursement. But the next question will reveal a different unexpected cause, and the plan still cannot add a subtask for it. Coverage depends on luck in the first guess.
C · Why this does not meet the full requirement
Move the coordinator to a larger model so its first plan is more likely to predict every relevant cause before research begins.
Improves the first guess slightly but keeps a plan that cannot change when evidence arrives.
A stronger model may write a better first plan, but it still plans before seeing evidence. If the key cause is not obvious from the question, the plan misses it and still never changes.
D · Why this does not meet the full requirement
Use a fixed prompt chain of search, analysis, synthesis and report for every investigation, so each run follows the same well-tested sequence.
Applies a predictable-work pattern to an open question whose subtopics cannot be known in advance.
Search, analysis, synthesis and report run in the same order every time. That is reliable for predictable work, but it has no step that turns a new finding into new research, so reimbursement still gets one line.
Check your understanding · explain the design in your own words
Research finds a new cause, but the plan was fixed at the start. How should open questions be broken down?
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) Decomposition Workflow
Return to Foundations Mock Exam 4 · Q730's situation and clause-by-clause explanation
Answer
**A.** Open-ended investigations cannot be fully planned in advance, because the important subtopics are discovered during research. An adaptive plan generates new subtasks from intermediate findings, such as adding reimbursement once it appears. A larger upfront plan or a stronger planner still guesses before the evidence exists, and a fixed chain is the pattern for predictable work.Q731. The document analysis subagent was given a generic fetch_url tool so it could open linked sources. Traces show it following links inside reports to news aggregators, advocacy blogs and ad pages, then citing them as primary evidence. The group only accepts regulator, trial-registry and peer-reviewed sources. What change fits best? (Select ONE.) A) Add a line to the subagent's prompt listing acceptable source types and asking it not to follow links to blogs, aggregators or advertising pages. B) Let the synthesis agent remove any citation from a non-approved domain at the end, so unapproved sources never reach the final brief. C) Replace fetch_url with a load_document tool that accepts only URLs on the group's approved source domains and rejects anything else with a clear error. D) Remove link-following entirely, so the subagent can analyze only the documents already in the corpus folder and nothing else from the web.
Understand Foundations Mock Exam 4 · Q731 · the situation and each part of the question
The real situation behind this question
Halcyon's analysts like it when the analysis subagent follows a report's footnotes to the original data. So someone gave it a general web tool. The subagent now follows every kind of link, including to opinion blogs and pages full of ads, and treats them as evidence. The group's rule is strict: only regulator, registry and peer-reviewed sources count. The architect must keep the useful link-following while stopping the misuse.
Read the question in parts
Part 1 · a generic fetch_url tool
the tool can reach any web page, far more than the subagent's role requires.
Part 2 · citing them as primary evidence
the misuse reaches the output, so the group's quality rule is being broken.
What you are being asked to decide
A general web tool lets the analysis agent cite blogs and ads. How do you limit it? 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 |
|---|---|
| Least-privilege tooling | giving the analysis subagent a tool that can open only approved source domains |
| Allowlist | the list of accepted domains, such as drug regulators, trial registries and journals, that load_document checks |
Study: Reuse implementation without exposing unrestricted tools Least-privilege tooling Allowlist
Understand Foundations Mock Exam 4 · Q731's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A generic tool gives the subagent more reach than its role needs, so it misuses it. A constrained tool that accepts only approved domains keeps the legitimate capability and enforces the source rule in code. Prompt text, cleanup at the end, or removing the tool all fail on one side or the other.
Connect the design to the situation
The subagent follows a footnote to an advocacy blog and cites it as primary evidence.
Best answer: C. A generic tool gives the subagent capability far beyond its role, so it uses it in ways the group does not want. A constrained replacement keeps the legitimate need (opening linked primary sources) while making the unwanted use impossible in code. A prompt line is guidance only, and removing link-following throws away a capability the work needs.
The decisive evidence in the stem
The group only accepts regulator, trial-registry and peer-reviewed sources
There is a clear, checkable rule for which URLs are valid, so a tool can enforce it instead of the prompt requesting it.
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
Add a line to the subagent's prompt listing acceptable source types and asking it not to follow links to blogs, aggregators or advertising pages.
Asks for the rule in text, so the subagent will still follow some unwanted links.
The subagent now hesitates before some blog links, but long reports contain many footnotes, and some unwanted pages look official. Without enforcement, a share of bad sources still enters the analysis.
B · Why this does not meet the full requirement
Let the synthesis agent remove any citation from a non-approved domain at the end, so unapproved sources never reach the final brief.
Cleans up after the fact, so analysis effort and context are still wasted on unusable sources.
Synthesis drops bad citations, but the analysis subagent already spent time and context reading those pages, and claims that depended on them may survive without their citation. The waste and some risk remain.
C · Why this meets the requirement
Replace fetch_url with a load_document tool that accepts only URLs on the group's approved source domains and rejects anything else with a clear error.
Keeps the useful capability and enforces the source rule in code on every call.
load_document checks each URL against approved domains such as drug regulators, trial registries and journals. A blog link returns an error saying 'domain not approved; find the primary source instead'. The subagent follows only valid sources.
D · Why this does not meet the full requirement
Remove link-following entirely, so the subagent can analyze only the documents already in the corpus folder and nothing else from the web.
Removes a legitimate need, because many reports link to primary sources the brief should use.
The subagent can no longer open the trial registry record a review cites, so the brief misses primary data. The group loses the very feature analysts asked for, and must add documents to the corpus by hand.
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.
Constrained load_document definition (illustrative)
{"name": "load_document", "description": "Load a primary source document by URL. Accepts only approved domains: drug regulators, trial registries, and peer-reviewed journals. Returns an error for any other domain; look for the primary source instead.", "input_schema": {"type": "object", "properties": {"url": {"type": "string", "description": "https URL on an approved domain"}}, "required": ["url"]}}The server checks the domain list in code; the description tells the model what will be accepted.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
A general web tool lets the analysis agent cite blogs and ads. How do you limit 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: Reuse implementation without exposing unrestricted tools
Study: Reuse implementation without exposing unrestricted tools Least-privilege tooling Allowlist
Return to Foundations Mock Exam 4 · Q731's situation and clause-by-clause explanation
Answer
**C.** A generic tool gives the subagent capability far beyond its role, so it uses it in ways the group does not want. A constrained replacement keeps the legitimate need (opening linked primary sources) while making the unwanted use impossible in code. A prompt line is guidance only, and removing link-following throws away a capability the work needs.Q732. For a brief on a new anticoagulant's safety, the synthesis agent's output ends with 'Evidence is thin on bleeding risk in patients over 75; only one 2019 source found.' The coordinator passes this straight to the report agent, and the delivered brief repeats the gap. Medical-affairs reviewers had asked about older patients specifically. What should change in the coordinator's workflow? (Select ONE.) A) Instruct the synthesis agent to fill any gap it notices from the model's own background knowledge, so reports never contain coverage warnings. B) Increase the number of initial search queries from 10 to 40 for every brief, so gaps are less likely to appear in the first place. C) Give the report agent search_web so that it can look up missing evidence by itself while it formats the final brief for medical-affairs reviewers. D) Have the coordinator check synthesis for stated gaps, re-delegate targeted queries, and re-run synthesis until coverage is sufficient.
Understand Foundations Mock Exam 4 · Q732 · the situation and each part of the question
The real situation behind this question
A medical reviewer asked Halcyon about a new anticoagulant's safety and especially about bleeding risk in patients over 75. The synthesis agent did its job honestly and wrote that evidence on that point was thin. But the coordinator treated synthesis as the last real step and sent everything on to the report agent. The reviewer received a polished brief that admitted it could not answer their main question. The architect must decide what the coordinator should do with such signals.
Read the question in parts
Part 1 · only one 2019 source found
the gap is specific and named, so targeted queries can address it directly.
Part 2 · Medical-affairs reviewers had asked about older patients specifically
the missing topic is central to the request, so delivering without it fails the requester.
What you are being asked to decide
Synthesis says a key topic is thin, but the coordinator ships the brief anyway. What should the coordinator do? Tests an iterative refinement loop where the coordinator re-delegates based on gaps in synthesis 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 |
|---|---|
| Orchestrator | the coordinator, which here must read synthesis output and decide whether more research is needed |
| Evaluator-optimizer | a loop where one step checks the output against criteria and sends it back for improvement |
Study: Successful workers can still produce an incomplete report Orchestrator Evaluator-optimizer
Understand Foundations Mock Exam 4 · Q732's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The system already detected the gap; the coordinator simply did not act on it. A coordinator should evaluate synthesis for gaps, re-delegate targeted research, and re-run synthesis until coverage is sufficient. Filling gaps from memory or adding search to the report agent breaks citation and role boundaries.
Connect the design to the situation
Bleeding risk over age 75 has one 2019 source, and that is exactly what reviewers asked about.
Best answer: D. The coordinator is responsible for evaluating combined results and re-delegating when coverage is insufficient. The synthesis agent has already named the gap, so targeted re-search and re-synthesis close it. Filling gaps from background knowledge removes the citations the brief requires, and giving the report agent search tools spreads research into an agent built for formatting.
The decisive evidence in the stem
The coordinator passes this straight to the report agent
The coordinator ignores a gap the synthesis output states explicitly, so no part of the system acts on it before delivery.
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 synthesis agent to fill any gap it notices from the model's own background knowledge, so reports never contain coverage warnings.
Hides the gap with uncited claims, which breaks the requirement that every claim cites a dated source.
The synthesis agent writes plausible bleeding rates from what the model remembers, with no source or date. The brief now reads as complete, but its central claims cannot be cited and may be outdated, which breaks the group's core requirement.
B · Why this does not meet the full requirement
Increase the number of initial search queries from 10 to 40 for every brief, so gaps are less likely to appear in the first place.
Spends more on every brief without guaranteeing coverage of the specific topic that was missing.
Forty initial queries raise cost and time on every brief. They may or may not hit older-patient bleeding data, and when a gap still appears, the coordinator still ships it without acting.
C · Why this does not meet the full requirement
Give the report agent search_web so that it can look up missing evidence by itself while it formats the final brief for medical-affairs reviewers.
Moves research into the formatting agent, which bypasses the coordinator and mixes roles.
The report agent starts searching while formatting, outside the coordinator's view. Its findings skip document analysis, citations may be inconsistent, and errors in that path are not handled by the coordinator that manages everything else.
D · Why this meets the requirement
Have the coordinator check synthesis for stated gaps, re-delegate targeted queries, and re-run synthesis until coverage is sufficient.
Uses the gap the system already found to drive targeted research, then re-synthesizes with the new evidence.
The coordinator sees the gap, asks the search agent for 2022–2026 subgroup analyses and asks analysis to read two bleeding-registry studies. It re-runs synthesis with the new findings and checks again before the report agent formats the brief.
Check your understanding · explain the design in your own words
Synthesis says a key topic is thin, but the coordinator ships the brief anyway. What should the coordinator do?
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: Successful workers can still produce an incomplete report
Study: Successful workers can still produce an incomplete report Orchestrator Evaluator-optimizer
Return to Foundations Mock Exam 4 · Q732's situation and clause-by-clause explanation
Answer
**D.** The coordinator is responsible for evaluating combined results and re-delegating when coverage is insufficient. The synthesis agent has already named the gap, so targeted re-search and re-synthesis close it. Filling gaps from background knowledge removes the citations the brief requires, and giving the report agent search tools spreads research into an agent built for formatting.Q733. The coordinator's Task call to the synthesis subagent says only: 'Synthesize the findings from the previous agents into key conclusions.' The resulting syntheses cite almost nothing from the document analysis step and sometimes invent sources. The search and analysis subagents both returned detailed results to the coordinator. What change fixes this? (Select ONE.) A) Give the synthesis subagent search_web and load_corpus_document, so it can gather the findings again for itself when it needs supporting evidence. B) Configure the synthesis subagent to inherit the coordinator's full conversation history automatically, so it can see everything the earlier agents reported. C) Move the synthesis subagent to a model with a larger context window, so it has enough room to hold all of the earlier agents' findings. D) Include the complete search and analysis results in the synthesis Task prompt, keeping each finding's source URL, document name and page as separate fields.
Understand Foundations Mock Exam 4 · Q733 · the situation and each part of the question
The real situation behind this question
Halcyon's coordinator receives rich results from its search and analysis subagents: dozens of findings with URLs and page numbers. Then it starts the synthesis subagent with a one-line instruction that refers to 'the findings from the previous agents'. The synthesis agent never saw those findings. It writes general conclusions and sometimes makes up sources to sound complete. Staff notice citations that do not exist. The architect must fix what the coordinator passes to synthesis.
Read the question in parts
Part 1 · The search and analysis subagents both returned detailed results to the coordinator
the information exists, but only in the coordinator's context, not in the synthesis agent's.
Part 2 · sometimes invent sources
the subagent fills the missing input with fabricated content, a serious risk for a cited brief.
What you are being asked to decide
The coordinator tells synthesis to use 'the previous findings' but never sends them. How do you fix the handoff? Tests passing complete prior findings, with separated metadata, directly in a subagent's prompt.
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 | the synthesis subagent starts fresh and sees only its own Task prompt, not the coordinator's history |
| Subagent handoff | the data the coordinator puts in the Task prompt when it starts the synthesis subagent |
Study: See the handoff as data Context isolation Subagent handoff
Understand Foundations Mock Exam 4 · Q733's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A subagent sees only its Task prompt, so 'the previous findings' means nothing to it unless they are included. The coordinator must pass the complete findings with source metadata as separate fields. There is no automatic inheritance, and more context space or extra tools do not deliver the missing input.
Connect the design to the situation
Synthesis cites invented sources because its prompt mentions findings it never received.
Best answer: D. A subagent starts with only what its Task prompt contains; it does not see the coordinator's history or other subagents' outputs. 'The findings from the previous agents' refers to text the synthesis agent never received, so it guesses. Passing the complete findings with structured source metadata gives it the material and keeps attribution intact. There is no inheritance setting to switch on.
The decisive evidence in the stem
'Synthesize the findings from the previous agents into key conclusions.'
The prompt refers to findings it does not contain, and the subagent cannot see them anywhere else, so it has nothing real to synthesize.
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
Give the synthesis subagent search_web and load_corpus_document, so it can gather the findings again for itself when it needs supporting evidence.
Repeats research inside synthesis, mixing roles and duplicating work the other agents already did.
The synthesis agent now searches and reads documents itself. It repeats work, may find different sources than analysis did, and becomes a second research agent, so roles blur and cost rises while the coordinator's findings stay unused.
B · Why this does not meet the full requirement
Configure the synthesis subagent to inherit the coordinator's full conversation history automatically, so it can see everything the earlier agents reported.
Relies on automatic inheritance, which subagents do not have; their context comes only from the prompt.
Subagents started through the Task tool begin with a fresh context built from their prompt. There is no switch that copies the coordinator's history in. Choosing this would leave the handoff unchanged and the invented sources in place.
C · Why this does not meet the full requirement
Move the synthesis subagent to a model with a larger context window, so it has enough room to hold all of the earlier agents' findings.
Adds space for findings that are still never sent, so the synthesis agent still has nothing to read.
A larger window gives the synthesis agent room, but the coordinator still sends one sentence. The window is mostly empty, and the agent still has no findings to synthesize.
D · Why this meets the requirement
Include the complete search and analysis results in the synthesis Task prompt, keeping each finding's source URL, document name and page as separate fields.
Puts the actual findings and their source metadata into the only channel the subagent can see.
The Task prompt now contains a structured list: each finding's claim, excerpt, source URL, document name, page and date. The synthesis agent reasons over real evidence and keeps each claim tied to its source, so invented citations stop.
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.
Synthesis Task prompt payload (illustrative)
{"goal": "Synthesize conclusions on GLP-1 drug adverse events for medical-affairs reviewers", "findings": [{"claim": "Nausea was reported in 20% of patients on the drug", "excerpt": "…nausea occurred in 20% of participants…", "source_url": "https://example.org/trial-report-17", "document": "Phase 3 Trial Report 17", "page": 4, "date": "2026-02-10"}], "quality_criteria": ["cite every claim", "flag conflicting rates"]}Content and metadata travel as 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 coordinator tells synthesis to use 'the previous findings' but never sends them. How do you fix the handoff?
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: See the handoff as data
Study: See the handoff as data Context isolation Subagent handoff
Return to Foundations Mock Exam 4 · Q733's situation and clause-by-clause explanation
Answer
**D.** A subagent starts with only what its Task prompt contains; it does not see the coordinator's history or other subagents' outputs. 'The findings from the previous agents' refers to text the synthesis agent never received, so it guesses. Passing the complete findings with structured source metadata gives it the material and keeps attribution intact. There is no inheritance setting to switch on.Q734. Six engineers develop the research system in Claude Code, and each has set up the group's corpus MCP server by hand, with slightly different settings. Last week one engineer committed a config file containing the corpus API token. The team wants one shared, versioned server definition with no secrets in git. Where and how should it be configured? (Select ONE.) A) Commit a .mcp.json that contains the token itself, since the repository is private and only lab engineers are able to read it. B) Describe the server's command and token in the project CLAUDE.md, so Claude Code knows how to connect to the corpus server in every session. C) Define the server in the project's .mcp.json and reference the token as ${CORPUS_API_TOKEN}, set in each engineer's environment. D) Have each engineer add the server to their own ~/.claude.json with their personal copy of the token, and share setup steps in the README.
Understand Foundations Mock Exam 4 · Q734 · the situation and each part of the question
The real situation behind this question
Halcyon's six engineers all need the corpus MCP server while they build and test the research system in Claude Code. Each one set it up separately, so their settings drift and bugs appear on one laptop but not another. Then someone committed a config file with the real API token, and the group had to rotate it. The team wants one definition everyone gets automatically from the repository, with no secrets ever in git.
Read the question in parts
Part 1 · each has set up the group's corpus MCP server by hand
per-user configuration causes drift, so the server should be defined once at project scope.
Part 2 · committed a config file containing the corpus API token
secrets in git are a real incident here, so the shared file must reference the token, not contain it.
What you are being asked to decide
The team needs one shared MCP server config without the token in git. Where does it go? Tests configuring a shared MCP server in project .mcp.json with environment variable expansion.
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.json | the project file in the repository that defines MCP servers shared by the whole team |
| Environment variable expansion | writing ${CORPUS_API_TOKEN} in the file so Claude Code reads the real token from each engineer's environment |
Study: MCP and tool config files: where each one lives .mcp.json MCP server
Understand Foundations Mock Exam 4 · Q734's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The team needs a shared, versioned definition and no secret in git. Project-scoped .mcp.json provides the sharing, and ${VAR} expansion keeps the token in each engineer's environment. User files do not share, committed tokens leak, and CLAUDE.md does not configure servers.
Connect the design to the situation
Six hand-made configs drift, and one commit leaked the corpus token.
Best answer: C. Project-scoped .mcp.json is the shared, version-controlled place for team MCP servers, and environment variable expansion keeps the credential out of the file. User-level ~/.claude.json suits personal or experimental servers and is not shared. A private repository does not make a committed secret safe, and CLAUDE.md holds instructions, not connection configuration.
The decisive evidence in the stem
one shared, versioned server definition with no secrets in git
The requirement names both team sharing and secret safety, which together point to project .mcp.json with environment variable expansion.
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
Commit a .mcp.json that contains the token itself, since the repository is private and only lab engineers are able to read it.
Commits a secret, which stays in git history and spreads to every clone, even in a private repository.
The token now lives in every clone and in git history forever. Anyone who gains repository access, including through a leaked laptop or a later public fork, has a working credential. The group just rotated a token for exactly this reason.
B · Why this does not meet the full requirement
Describe the server's command and token in the project CLAUDE.md, so Claude Code knows how to connect to the corpus server in every session.
Puts connection details in an instruction file; Claude Code does not configure servers from CLAUDE.md.
CLAUDE.md is read by the model as instructions. Claude Code does not start MCP servers from it, so the server would not connect, and the token would now sit in a committed text file as well.
C · Why this meets the requirement
Define the server in the project's .mcp.json and reference the token as ${CORPUS_API_TOKEN}, set in each engineer's environment.
Shares one versioned definition and keeps the token in each engineer's environment.
The repo's .mcp.json defines the corpus server once, with headers or env values written as ${CORPUS_API_TOKEN}. Every engineer gets the same definition on pull, sets the token in their own environment, and nothing secret is committed.
D · Why this does not meet the full requirement
Have each engineer add the server to their own ~/.claude.json with their personal copy of the token, and share setup steps in the README.
Keeps configs personal and unversioned, so they keep drifting and nothing is shared.
Each engineer copies README steps into their own ~/.claude.json. The token stays out of git, but six configs keep drifting, new engineers set it up wrong, and a change to the server command must be repeated six times.
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.
Project .mcp.json with expansion (illustrative)
{"mcpServers": {"corpus": {"type": "http", "url": "https://corpus.internal.example/mcp", "headers": {"Authorization": "Bearer ${CORPUS_API_TOKEN}"}}}}The file is committed; each engineer exports CORPUS_API_TOKEN locally.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The team needs one shared MCP server config without the token in git. Where does 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: MCP and tool config files: where each one lives
Study: MCP and tool config files: where each one lives .mcp.json MCP server
Return to Foundations Mock Exam 4 · Q734's situation and clause-by-clause explanation
Answer
**C.** Project-scoped .mcp.json is the shared, version-controlled place for team MCP servers, and environment variable expansion keeps the credential out of the file. User-level ~/.claude.json suits personal or experimental servers and is not shared. A private repository does not make a committed secret safe, and CLAUDE.md holds instructions, not connection configuration.Q735. An analyst ran a long Claude Code session named anticoag-review-q3 that explored all 40 corpus documents on anticoagulant safety. Overnight, three of those documents were replaced with corrected versions; the other 37 are unchanged. The analyst wants to continue the investigation today with as little rework as possible. What should they do? (Select ONE.) A) Fork the old session twice, using one branch for the unchanged documents and the other branch for the three documents that were revised. B) Resume with --resume anticoag-review-q3 and tell Claude exactly which three documents changed, asking it to re-read and re-analyze only those. C) Resume with --resume anticoag-review-q3 and continue asking questions as before, since most of the earlier analysis in that session is still valid. D) Start a fresh session and ask Claude to explore all 40 documents again, so every conclusion rests on the current versions of the corpus.
Understand Foundations Mock Exam 4 · Q735 · the situation and each part of the question
The real situation behind this question
A Halcyon analyst spent most of a day in Claude Code reading and comparing 40 documents about anticoagulant safety. They named the session so they could come back. Overnight, a journal published corrected versions of three documents, with updated figures. The other 37 are the same. The analyst wants to keep yesterday's work, but does not want the final brief to quote figures that are no longer true.
Read the question in parts
Part 1 · a long Claude Code session named anticoag-review-q3
the session can be continued by name, so earlier context is available to reuse.
Part 2 · three of those documents were replaced with corrected versions
a small, known set of earlier tool results is now stale and must be refreshed.
What you are being asked to decide
Three of 40 documents changed overnight. How do you continue yesterday's session efficiently and correctly? Tests resuming a named session and informing it of specific file changes 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 continues the named session anticoag-review-q3 with its earlier context |
| Stale tool results | yesterday's readings of the three replaced documents, still in the session's context |
Study: Named sessions: resume, continue, fork, or start fresh Claude Code Context window
Understand Foundations Mock Exam 4 · Q735's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Most of the session's work is still valid, so resuming it by name is efficient. But three tool results are stale, so Claude must be told which files changed and re-read them. Silent resumption risks outdated figures, and starting fresh wastes valid analysis.
Connect the design to the situation
Yesterday's session holds analysis of 40 documents; three now have corrected versions.
Best answer: B. When most prior context is still valid, resuming the named session keeps that work, and telling Claude which files changed lets it re-analyze just those. Resuming silently leaves stale tool results for three documents in context, so Claude may cite outdated figures. Starting fresh is the right choice when most results are stale, which is not the case here.
The decisive evidence in the stem
the other 37 are unchanged
Most earlier analysis is still valid, so resuming is efficient, but only if the session learns which three results are now stale.
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
Fork the old session twice, using one branch for the unchanged documents and the other branch for the three documents that were revised.
Uses forking, which is for exploring different approaches, to split documents for no benefit.
Forking creates independent branches from one baseline to compare different approaches. Splitting by document gives two partial views that must be merged by hand, and both branches still contain the stale readings unless told otherwise.
B · Why this meets the requirement
Resume with --resume anticoag-review-q3 and tell Claude exactly which three documents changed, asking it to re-read and re-analyze only those.
Keeps the valid work and directs targeted re-analysis at exactly the documents that changed.
The analyst resumes and writes: 'Documents trial-aristo-2026, registry-garfield and label-update-eu were replaced with corrected versions. Re-read those three and update any conclusions based on them.' Claude refreshes three readings and keeps the other 37.
C · Why this does not meet the full requirement
Resume with --resume anticoag-review-q3 and continue asking questions as before, since most of the earlier analysis in that session is still valid.
Keeps outdated readings of three documents in context without warning, so old figures may be reused.
The resumed session still holds yesterday's readings of the three replaced documents. Claude does not know they changed, so when asked about the major-bleeding rate it answers from the old version. The brief may cite figures that the journal has corrected.
D · Why this does not meet the full requirement
Start a fresh session and ask Claude to explore all 40 documents again, so every conclusion rests on the current versions of the corpus.
Throws away valid analysis of 37 documents and repeats hours of exploration.
The fresh session reads 40 documents again, most of which have not changed. The analyst loses a day of accumulated reasoning and waits hours to reach the point they were at yesterday. This choice suits sessions where most results are stale.
Check your understanding · explain the design in your own words
Three of 40 documents changed overnight. How do you continue yesterday's session efficiently and correctly?
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 Claude Code Context window
Return to Foundations Mock Exam 4 · Q735's situation and clause-by-clause explanation
Answer
**B.** When most prior context is still valid, resuming the named session keeps that work, and telling Claude which files changed lets it re-analyze just those. Resuming silently leaves stale tool results for three documents in context, so Claude may cite outdated figures. Starting fresh is the right choice when most results are stale, which is not the case here.Q736. The internal MCP server exposes fetch_source ('Gets document content') and load_corpus_document ('Retrieves document content'). Traces show the document analysis subagent calling fetch_source with corpus file IDs, which fail, and load_corpus_document with web URLs, which also fail. Both tools work correctly when called properly. What is the most effective fix? (Select ONE.) A) Add a system prompt section explaining that one tool is for web pages and the other is for corpus files, with a few examples of each call. B) Merge the two tools into a single get_document tool that accepts either a URL or a corpus ID and decides internally which backend it should query. C) Catch the failing calls in the MCP server and retry each one automatically with the other tool, so the subagent never sees the misrouted error. D) Rename them fetch_web_page and read_corpus_pdf, and give each description its input format, an example, and when to use the other.
Understand Foundations Mock Exam 4 · Q736 · the situation and each part of the question
The real situation behind this question
Halcyon's MCP server grew one tool at a time. One engineer added a tool for web pages; another added one for the internal PDF corpus. Both called theirs something like 'get document', with one-line descriptions. The analysis subagent cannot tell them apart, so it often sends a corpus ID to the web tool and a URL to the corpus tool. Each mistake costs a failed call and a retry. The architect wants the agent to choose correctly the first time.
Read the question in parts
Part 1 · calling fetch_source with corpus file IDs
the model does not know which input format each tool accepts, a description problem.
Part 2 · Both tools work correctly when called properly
the tools themselves are fine; only their names and descriptions cause the misrouting.
What you are being asked to decide
Two tools have almost the same name and description, so the agent mixes them up. How do you fix it? Tests renaming tools and rewriting descriptions to remove functional overlap.
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 each tool definition that tells the model what the tool does and what input it takes |
| Tool selection | the subagent's choice between the web tool and the corpus tool for each document |
Study: Document identity versus words inside it Tool description Tool selection
Understand Foundations Mock Exam 4 · Q736's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The model chooses tools mainly from their names and descriptions, and these two were nearly identical. Renaming them by purpose and stating each one's input, example and boundary removes the overlap. Prompt notes, silent retries or consolidation either work around the definitions or do more than needed.
Connect the design to the situation
A corpus ID sent to fetch_source and a URL sent to load_corpus_document both fail.
Best answer: D. The two tools have near-identical names and descriptions, so the model cannot tell which input each one expects. Renaming them to reflect their purpose and writing descriptions that state inputs, examples and boundaries removes the overlap where the model actually decides. A system prompt note helps less than fixing the definitions, and silent retries hide the problem.
The decisive evidence in the stem
fetch_source ('Gets document content') and load_corpus_document ('Retrieves document content')
Names and descriptions overlap almost completely, so the model has no basis for choosing between the two tools.
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 section explaining that one tool is for web pages and the other is for corpus files, with a few examples of each call.
Puts the distinction in a separate place while the tool definitions themselves stay ambiguous.
The system prompt now explains the difference, and errors fall. But the tool definitions still say almost the same thing, and the model weighs those strongly when choosing. Some misrouting continues, especially in long subagent runs.
B · Why this does not meet the full requirement
Merge the two tools into a single get_document tool that accepts either a URL or a corpus ID and decides internally which backend it should query.
Consolidation can work, but it is a bigger redesign than this first fix needs and hides the input type.
A single get_document tool could work and is a valid design. But it moves the decision into server code, hides the input type from the model, and needs new testing. As a first step it is more effort than rewriting two definitions.
C · Why this does not meet the full requirement
Catch the failing calls in the MCP server and retry each one automatically with the other tool, so the subagent never sees the misrouted error.
Hides misrouting by retrying, doubling calls and leaving the model's confusion in place.
Every misrouted call now quietly becomes two calls. The subagent never learns, latency rises, and logs no longer show the confusion clearly. If a call fails for a different reason, the retry logic may also hide that.
D · Why this meets the requirement
Rename them fetch_web_page and read_corpus_pdf, and give each description its input format, an example, and when to use the other.
Fixes the names and descriptions the model uses to choose, so each tool's purpose is clear.
fetch_web_page now says 'Input: an https URL to a public web page. Example: https://example.gov/report. For corpus PDFs use read_corpus_pdf.' read_corpus_pdf says 'Input: a corpus ID like corp-2291.' The model picks correctly from the definitions alone.
Check your understanding · explain the design in your own words
Two tools have almost the same name and description, so the agent mixes them up. How 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: Document identity versus words inside it
Study: Document identity versus words inside it Tool description Tool selection
Return to Foundations Mock Exam 4 · Q736's situation and clause-by-clause explanation
Answer
**D.** The two tools have near-identical names and descriptions, so the model cannot tell which input each one expects. Renaming them to reflect their purpose and writing descriptions that state inputs, examples and boundaries removes the overlap where the model actually decides. A system prompt note helps less than fixing the definitions, and silent retries hide the problem.Q737. Each month Halcyon produces a regulatory digest with identical steps: collect new filings from five named agencies, summarize each agency's filings, compare them with last month's digest, then format. The coordinator currently plans each run from scratch, and in two of the last six months it skipped the comparison step. Which design fits this workflow? (Select ONE.) A) Keep dynamic planning, but add a system prompt instruction reminding the coordinator that every digest must include the month-over-month comparison. B) Give the coordinator more agents to choose from, so it can plan a richer digest each month based on what the agencies happened to publish. C) Add a reviewer subagent that reads every finished digest and asks the coordinator to plan again whenever the comparison section is missing. D) Implement the digest as a fixed sequential prompt chain in code: collect, summarize per agency, compare with last month, format, in that order every run.
Understand Foundations Mock Exam 4 · Q737 · the situation and each part of the question
The real situation behind this question
Halcyon's monthly digest is a routine product. Staff rely on it to see what changed since last month, so the comparison section is the part they read first. Yet the coordinator, which plans every run as if it were new research, left that section out twice this year. Nothing about the digest changes from month to month except the filings. The architect must decide whether this job needs an adaptive agent at all.
Read the question in parts
Part 1 · plans each run from scratch
the model decides the steps every time, which introduces variation into a fixed process.
Part 2 · skipped the comparison step
a required step depends on the model's plan, so it can be dropped.
What you are being asked to decide
The monthly digest always has the same steps, yet the coordinator plans it fresh and skips one. What design fits? Tests choosing a fixed prompt chain for predictable multi-step work.
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 | your code runs collect, summarize, compare and format as separate model calls in a fixed order |
| Workflow | a predefined path through steps, controlled by code rather than chosen by the model |
Study: Workflows vs agents — Anthropic's decision rule Prompt chaining Workflow
Understand Foundations Mock Exam 4 · Q737's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The digest's steps are known and never change, so planning them each month only adds ways to fail. A fixed prompt chain in code runs every step in order every time. Reminders, reviewers and more agents all keep an adaptive planner where a predictable chain fits.
Connect the design to the situation
Collect, summarize, compare, format — but the comparison went missing twice in six months.
Best answer: D. When the steps are known and the same every time, a fixed prompt chain is the simpler and more reliable design: code guarantees every step runs in order. Dynamic planning adds variation where none is wanted, which is how the comparison got skipped. A reminder or a reviewer patches the planner instead of removing the need for planning.
The decisive evidence in the stem
with identical steps
The workflow is predictable, so the step order can be fixed in code rather than re-planned by the model each month.
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
Keep dynamic planning, but add a system prompt instruction reminding the coordinator that every digest must include the month-over-month comparison.
Keeps re-planning a fixed process and relies on a reminder that will sometimes be missed.
The reminder makes the comparison more likely but not certain, and the coordinator still re-plans other parts differently each month. The digest stays inconsistent, and the team keeps adding reminders for whatever goes missing next.
B · Why this does not meet the full requirement
Give the coordinator more agents to choose from, so it can plan a richer digest each month based on what the agencies happened to publish.
Adds variety to a process whose value comes from being the same every month.
More agents give the coordinator more options, so digests vary even more. Staff who expect the same sections in the same order find a different structure each month, and required steps are still optional.
C · Why this does not meet the full requirement
Add a reviewer subagent that reads every finished digest and asks the coordinator to plan again whenever the comparison section is missing.
Adds an agent to catch a failure that a fixed design would not produce at all.
The reviewer catches a missing comparison and triggers a new plan, which adds time and cost. The planner may then skip something else. The system gets more complex while the real issue, unnecessary planning, remains.
D · Why this meets the requirement
Implement the digest as a fixed sequential prompt chain in code: collect, summarize per agency, compare with last month, format, in that order every run.
Encodes the known steps in code, so every digest runs every step in the same order.
Code calls the collection step for the five agencies, then a summary call per agency, then a comparison call with last month's digest, then formatting. The comparison runs every month because the code always calls it. Each step can be tested on its own.
Check your understanding · explain the design in your own words
The monthly digest always has the same steps, yet the coordinator plans it fresh and skips one. What design fits?
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
Return to Foundations Mock Exam 4 · Q737's situation and clause-by-clause explanation
Answer
**D.** When the steps are known and the same every time, a fixed prompt chain is the simpler and more reliable design: code guarantees every step runs in order. Dynamic planning adds variation where none is wanted, which is how the comparison got skipped. A reminder or a reviewer patches the planner instead of removing the need for planning.Q738. A ten-trial comparison needs four independent research subtopics. Traces show the coordinator emits one Task call, waits for that subagent to finish, then emits the next in a later turn, so the research phase takes about four times as long as any single subtopic. None of the subtopics depends on another. What change speeds this up within the current architecture? (Select ONE.) A) Have the coordinator emit all four Task tool calls in a single response, so the subagents run in parallel and their results return together. B) Tell each subagent to work faster by limiting itself to three sources per subtopic, so the sequence of four delegations finishes sooner. C) Combine the four subtopics into one long Task prompt for a single search subagent, so that all of the research happens inside one delegation. D) Submit the four subtopic prompts through the Message Batches API, then have the coordinator collect the results once the batch has completed.
Understand Foundations Mock Exam 4 · Q738 · the situation and each part of the question
The real situation behind this question
Halcyon promises a five-business-day turnaround, and large comparisons were using most of it. The traces showed why. The coordinator delegated one subtopic, waited, then delegated the next, even though the four subtopics had nothing to do with each other. The research phase took four times longer than it needed to. The architect wants faster briefs without changing the coordinator and subagent design.
Read the question in parts
Part 1 · emits one Task call, waits for that subagent to finish, then emits the next in a later turn
the delegation pattern forces sequential execution, which is the cause of the delay.
Part 2 · within the current architecture
the fix should change how the coordinator delegates, not replace the subagent system.
What you are being asked to decide
Four independent research tasks run one after another. How do you make them run at once? Tests spawning parallel subagents with multiple Task calls in a single 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 |
|---|---|
| Parallelization | running the four subtopic subagents at the same time because none needs another's result |
| Task tool | the tool the coordinator calls to start a subagent; several calls in one response start several subagents |
Study: Coordinator handoffs: wait, pass context, then continue Parallelization Subagent
Understand Foundations Mock Exam 4 · Q738's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The four subtopics are independent, but the coordinator delegates them one turn at a time. Emitting all four Task calls in a single response lets them run in parallel. Merging them, batching them or making each one thinner either loses quality or keeps the sequential pattern.
Connect the design to the situation
Efficacy, safety, dosing and cost-effectiveness run one by one, quadrupling research time.
Best answer: A. When subtasks are independent, the coordinator can spawn parallel subagents by emitting several Task calls in one response; the runtime runs them concurrently. Spreading the calls across turns forces sequential execution. One combined prompt loses the specialization and isolation of separate subagents, and the Batches API has no latency guarantee and cannot run the subagents' tool loops.
The decisive evidence in the stem
None of the subtopics depends on another
Independent work has no ordering requirement, so it can be delegated at the same time through 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 all four Task tool calls in a single response, so the subagents run in parallel and their results return together.
Starts all independent subagents at once, so the research phase takes about as long as the slowest one.
The coordinator's next response contains four Task tool_use blocks, one per subtopic, each with its own complete prompt. The runtime starts all four subagents together, and the coordinator receives four results in one turn. Research time drops to roughly the longest single subtopic.
B · Why this does not meet the full requirement
Tell each subagent to work faster by limiting itself to three sources per subtopic, so the sequence of four delegations finishes sooner.
Cuts research quality to save time while the four delegations still run one after another.
Three sources per subtopic makes each delegation shorter but thinner. The brief loses evidence, and the subagents still run one after another, so the structural cause of the delay stays.
C · Why this does not meet the full requirement
Combine the four subtopics into one long Task prompt for a single search subagent, so that all of the research happens inside one delegation.
Loses the separate, focused contexts and makes one subagent juggle four topics in sequence.
One subagent now researches four topics in one context. It works through them one by one, its context fills with mixed results, and quality per topic falls. The phase may be no faster, because the work is still sequential inside that one agent.
D · Why this does not meet the full requirement
Submit the four subtopic prompts through the Message Batches API, then have the coordinator collect the results once the batch has completed.
Uses an asynchronous service with no latency guarantee that cannot run the subagents' tool loops.
Batch requests can take up to 24 hours with no guaranteed finish time, and a batch request cannot run the multi-turn tool loop a research subagent needs. The coordinator would wait an unknown time for incomplete work.
Check your understanding · explain the design in your own words
Four independent research tasks run one after another. How do you make them run at once?
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 Parallelization Subagent
Return to Foundations Mock Exam 4 · Q738's situation and clause-by-clause explanation
Answer
**A.** When subtasks are independent, the coordinator can spawn parallel subagents by emitting several Task calls in one response; the runtime runs them concurrently. Spreading the calls across turns forces sequential execution. One combined prompt loses the specialization and isolation of separate subagents, and the Batches API has no latency guarantee and cannot run the subagents' tool loops.Scenario 3 · Claude Code for Continuous Integration
Q739. A developer is redesigning how the review job handles the 300-file payments module. In earlier attempts, the discovery phase of reading files, grepping call sites and listing dependencies filled the session's context, and by the time design work started Claude was repeating itself and missing earlier conclusions. How should the developer structure the next attempt? (Select ONE.) A) Run discovery and design in the same session, and ask Claude at the start to keep only the most important findings in mind as it goes. B) Start the session with a much larger model so that the full discovery output and the design discussion both fit in one context window. C) Delegate the discovery phase to the Explore subagent, which does the verbose searching in its own context and returns a summary for the design work. D) Skip discovery and ask Claude to design the review handling from its general knowledge of how payment modules are usually structured.
Understand Foundations Mock Exam 4 · Q739 · the situation and each part of the question
The real situation behind this question
Quillstack's payments module has 300 files and many hidden dependencies. A developer has tried twice to redesign how CI reviews it. Each time, Claude spent most of the session reading files and listing call sites. When it was time to design, the session was crowded, and Claude repeated itself and forgot what it had found. The developer needs the discovery but not its noise in the design conversation.
Read the question in parts
Part 1 · Claude was repeating itself and missing earlier conclusions
the main context has degraded, a classic symptom of verbose output accumulating.
Part 2 · the 300-file payments module
discovery is large by nature, so its output must be kept away from the main session.
What you are being asked to decide
Discovery output fills the session before design starts. How do you keep room for the design? Tests using the Explore subagent to isolate verbose discovery and return a summary.
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 | Claude Code's built-in read-only subagent that searches the codebase in its own context and reports back |
| Context window | the main session's working space, which discovery output was filling up |
Study: Plan mode vs direct execution — and the Explore subagent Subagent Context window
Understand Foundations Mock Exam 4 · Q739's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Verbose discovery fills the main context and degrades the design work that follows. The Explore subagent does the discovery in its own context and returns a summary. Bigger windows, skipping discovery or asking Claude to remember selectively leave the noise or lose the facts.
Connect the design to the situation
Hundreds of grep hits and file reads crowd out the design conversation for the payments module.
Best answer: C. The Explore subagent isolates verbose discovery in its own context and returns a summary, so the main session keeps room for the design work. A larger model does not change how much the noise dilutes attention. Skipping discovery replaces specific knowledge of this module with 'typical patterns', and an instruction to remember selectively does not stop the context from filling.
The decisive evidence in the stem
filled the session's context
The discovery output itself is what exhausts the main context, so it needs to happen somewhere else and come back as a summary.
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 and design in the same session, and ask Claude at the start to keep only the most important findings in mind as it goes.
Asks for selective memory while the same verbose output still fills the context.
Claude tries to keep important findings in mind, but every file read and grep result still lands in the context. Long before design starts, the same crowding returns and the instruction cannot prevent it.
B · Why this does not meet the full requirement
Start the session with a much larger model so that the full discovery output and the design discussion both fit in one context window.
Adds room without removing the noise, so attention to key findings still degrades.
A bigger context holds more, but the design discussion now sits behind thousands of lines of grep output. Earlier conclusions still get lost in the middle, and the cost of every turn rises.
C · Why this meets the requirement
Delegate the discovery phase to the Explore subagent, which does the verbose searching in its own context and returns a summary for the design work.
Keeps the noisy search in a separate context and brings back only what the design needs.
The developer asks Claude to use the Explore subagent to map the module: entry points, callers of settle(), and the batch boundaries. The subagent reads and greps in its own context and returns a one-page summary. The main session starts design with that summary and plenty of room.
D · Why this does not meet the full requirement
Skip discovery and ask Claude to design the review handling from its general knowledge of how payment modules are usually structured.
Throws away knowledge of this module and invites generic answers about 'typical' code.
Claude proposes a design for a 'typical' payments module. It does not know this module's real call graph or special cases, so the design misses the dependencies that made the work hard in the first place.
Check your understanding · explain the design in your own words
Discovery output fills the session before design starts. How do you keep room for the design?
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 window
Return to Foundations Mock Exam 4 · Q739's situation and clause-by-clause explanation
Answer
**C.** The Explore subagent isolates verbose discovery in its own context and returns a summary, so the main session keeps room for the design work. A larger model does not change how much the noise dilutes attention. Skipping discovery replaces specific knowledge of this module with 'typical patterns', and an instruction to remember selectively does not stop the context from filling.Q740. The team has a project skill, dependency-audit, that walks the whole lockfile and prints about 3,000 lines of package analysis before its short conclusion. Developers run it mid-session, and afterwards Claude's answers about their actual task get vaguer and it forgets earlier decisions. They still want the skill's conclusion in the main session. What change fits best? (Select ONE.) A) Tell developers to run /compact right after each dependency audit, so the 3,000 lines are summarized before they continue working on their task. B) Move the audit instructions from the skill into CLAUDE.md, so Claude already knows the procedure and can run the audit with less output. C) Add allowed-tools to the skill's frontmatter listing only Read and Bash, so the audit uses fewer tools and therefore produces less output. D) Add context: fork to the skill's SKILL.md frontmatter, so it runs in an isolated subagent context and only its result returns to the main session.
Understand Foundations Mock Exam 4 · Q740 · the situation and each part of the question
The real situation behind this question
Quillstack's dependency-audit skill is useful: it finds risky packages before a release. But it prints thousands of lines on the way to a two-paragraph conclusion. Developers often run it in the middle of real work. Afterwards Claude seems to lose the thread, forgetting design choices from earlier in the session. The team wants to keep the skill and its conclusion, without the side effect on the session.
Read the question in parts
Part 1 · Claude's answers about their actual task get vaguer
the main context is crowded by output unrelated to the developer's task, degrading quality.
Part 2 · They still want the skill's conclusion in the main session
the result must come back; only the intermediate detail should stay out.
What you are being asked to decide
A skill dumps 3,000 lines into the session and Claude loses track. How do you keep the output out? 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 | a SKILL.md frontmatter option that runs the skill in a separate subagent context |
| Context isolation | the audit's 3,000 lines stay in the forked context; the main session receives only the conclusion |
Study: Skill frontmatter: the three options the exam names Skill Frontmatter Context isolation
Understand Foundations Mock Exam 4 · Q740's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The skill's verbose output crowds out the developer's own work in the main context. context: fork runs the skill in an isolated subagent context and returns only its result. /compact, CLAUDE.md or tool lists either clean up afterwards, spread the cost, or change something unrelated.
Connect the design to the situation
After a dependency audit, Claude forgets the API design the developer chose an hour earlier.
Best answer: D. context: fork runs the skill in an isolated subagent context, so the verbose analysis stays there and only the conclusion reaches the main conversation. /compact cleans up after the damage and loses detail about the developer's own work. Moving the procedure into CLAUDE.md loads it into every session, and allowed-tools controls which tools are pre-approved, not how much output there is.
The decisive evidence in the stem
prints about 3,000 lines of package analysis before its short conclusion
Most of the output is intermediate detail the main session does not need, which is what forked skill execution keeps out.
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 developers to run /compact right after each dependency audit, so the 3,000 lines are summarized before they continue working on their task.
Repairs the session after it was flooded, losing detail, and must be remembered every time.
/compact summarizes the whole conversation, including the developer's own design discussion, and some of that detail is lost along with the audit noise. Developers also have to remember to run it each time.
B · Why this does not meet the full requirement
Move the audit instructions from the skill into CLAUDE.md, so Claude already knows the procedure and can run the audit with less output.
Loads the audit procedure into every session, even those that never audit dependencies.
Every session, including CI reviews, now loads audit instructions it rarely needs. The audit still prints its analysis into whatever session runs it, so the flooding problem remains while always-on context grows.
C · Why this does not meet the full requirement
Add allowed-tools to the skill's frontmatter listing only Read and Bash, so the audit uses fewer tools and therefore produces less output.
Changes which tools are pre-approved; the audit still prints the same 3,000 lines.
allowed-tools pre-approves the listed tools so they run without prompts. It does not reduce output or isolate context. The skill still prints 3,000 lines into the main conversation.
D · 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 result returns to the main session.
Keeps the verbose analysis in a separate context and returns just the result developers want.
The SKILL.md frontmatter gains context: fork. When a developer runs the audit, a subagent works through the lockfile in its own context, and the main session receives the conclusion: 'two packages with known advisories; upgrade paths below'. Earlier decisions stay in view.
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.
Forked skill frontmatter (illustrative)
---
name: dependency-audit
description: Audit lockfile packages for advisories and risky upgrades; returns a short conclusion.
context: fork
---
Walk package-lock.json, check each package, and end with a conclusion of at most ten lines.context: fork keeps the walk in a subagent context; the conclusion is what returns.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
A skill dumps 3,000 lines into the session and Claude loses track. How do you keep the output out?
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 4 · Q740's situation and clause-by-clause explanation
Answer
**D.** context: fork runs the skill in an isolated subagent context, so the verbose analysis stays there and only the conclusion reaches the main conversation. /compact cleans up after the damage and loses detail about the developer's own work. Moving the procedure into CLAUDE.md loads it into every session, and allowed-tools controls which tools are pre-approved, not how much output there is.Q741. A 400-line release-checklist procedure sits in the root CLAUDE.md. It is used only on release days, about twice a month, but it loads into every CI review and every interactive session. The team wants the procedure available to anyone on demand without paying for it in everyday work. Where should it live? (Select ONE.) A) In each release manager's ~/.claude/CLAUDE.md, since only release managers run the procedure and other developers never need to see it. B) In a project skill at .claude/skills/release-checklist/SKILL.md, committed to the repository and invoked when someone prepares a release. C) In a .claude/rules/ file with paths set to the release workflow files, so it loads only when someone edits the release configuration. D) In a separate file that the root CLAUDE.md pulls in with @import, so the main file stays short while the full procedure is still available.
Understand Foundations Mock Exam 4 · Q741 · the situation and each part of the question
The real situation behind this question
Quillstack's release process has many careful steps, and someone once put all of them into the root CLAUDE.md so Claude would always know them. Now every CI review and every developer session carries 400 lines of release instructions, though releases happen only twice a month. The team wants anyone to be able to run the checklist with Claude, but not to pay for it every day. The architect must choose the right home.
Read the question in parts
Part 1 · loads into every CI review and every interactive session
always-on memory is being used for occasional content, costing context everywhere.
Part 2 · available to anyone on demand
the procedure must stay shared, so a personal location would not satisfy the requirement.
What you are being asked to decide
A procedure used twice a month loads into every session. Where should it go instead? Tests choosing a skill for on-demand workflows versus CLAUDE.md for always-loaded standards.
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 file under .claude/skills/ that Claude loads only when the release task calls for it |
| CLAUDE.md | memory loaded into every session, meant for standards that always apply |
Study: Skills vs slash commands vs subagents — the discriminator Skill CLAUDE.md
Understand Foundations Mock Exam 4 · Q741's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A twice-a-month procedure should not load into every session. A committed project skill loads on demand and is shared through git, while CLAUDE.md keeps only always-applicable standards. Imports still load everything, personal files are not shared, and path rules trigger on edits, not on tasks.
Connect the design to the situation
Every CI review carries 400 lines of release steps it never uses.
Best answer: B. Skills load on demand for task-specific workflows, while CLAUDE.md holds standards that should always apply. A committed project skill makes the checklist available to everyone without loading it in every session. An @import still loads the content every time, user-level files are not shared, and path rules load when files are edited, which a release does not reliably involve.
The decisive evidence in the stem
used only on release days
The procedure is task-specific and occasional, which is the use case for an on-demand skill rather than always-loaded memory.
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
In each release manager's ~/.claude/CLAUDE.md, since only release managers run the procedure and other developers never need to see it.
Hides the procedure from anyone else who must cover a release, and is not versioned with the repo.
Release managers get the procedure, but nobody else can run a release with Claude when they are away. The steps are no longer versioned with the repository, so changes are not reviewed and copies drift.
B · Why this meets the requirement
In a project skill at .claude/skills/release-checklist/SKILL.md, committed to the repository and invoked when someone prepares a release.
Loads the checklist only when a release is prepared, and shares it with everyone through git.
The checklist moves to .claude/skills/release-checklist/SKILL.md with a description like 'Use when preparing a production release'. Daily sessions load only its short description; the full steps load when a developer starts a release or invokes it directly.
C · Why this does not meet the full requirement
In a .claude/rules/ file with paths set to the release workflow files, so it loads only when someone edits the release configuration.
Ties loading to editing certain files, which does not match when someone runs a release.
Path rules load when Claude edits matching files. A release may involve tagging, changelog checks and deploy commands without editing the workflow files, so the checklist might not load when it is needed.
D · Why this does not meet the full requirement
In a separate file that the root CLAUDE.md pulls in with @import, so the main file stays short while the full procedure is still available.
Shortens the visible file, but imported content still loads into every session.
The root file now says @docs/release-checklist.md. That makes CLAUDE.md shorter to read, but imports expand into the session, so every review still carries all 400 lines.
Check your understanding · explain the design in your own words
A procedure used twice a month loads into every session. Where should it go 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: Skills vs slash commands vs subagents — the discriminator
Study: Skills vs slash commands vs subagents — the discriminator Skill CLAUDE.md
Return to Foundations Mock Exam 4 · Q741's situation and clause-by-clause explanation
Answer
**B.** Skills load on demand for task-specific workflows, while CLAUDE.md holds standards that should always apply. A committed project skill makes the checklist available to everyone without loading it in every session. An @import still loads the content every time, user-level files are not shared, and path rules load when files are edited, which a release does not reliably involve.Q742. The nightly test job runs claude -p in the repository. Its tests often check trivial getters and build their own ad-hoc mocks instead of using the shared fixtures in test/fixtures/, which every human-written test uses. The team's testing standards and the fixture catalog currently exist only in a wiki page. What change most improves the generated tests? (Select ONE.) A) Document the testing standards, what makes a test valuable, and the available fixtures in the project CLAUDE.md that the CI run loads. B) Have the posting script drop any generated test shorter than ten lines, since trivial getter tests are usually the shortest ones produced. C) Raise --max-turns so Claude has more time to explore the repository and discover the shared fixtures and the team's conventions by itself. D) Add --bare to the nightly command so every run starts the same way on each runner, without loading any local configuration or project files.
Understand Foundations Mock Exam 4 · Q742 · the situation and each part of the question
The real situation behind this question
Quillstack's nightly job proposes tests for modules with low coverage. Reviewers reject most of them. The tests check simple getters that cannot break, and they build their own fake data instead of using the shared fixtures the team maintains. The team's rules for good tests are written down, but only in a wiki that Claude Code never reads. The architect must decide how to put that knowledge in front of the nightly run.
Read the question in parts
Part 1 · check trivial getters
Claude does not know which tests the team considers valuable, so it writes easy ones.
Part 2 · which every human-written test uses
a clear, documented convention exists; the problem is only that CI Claude cannot see it.
What you are being asked to decide
Generated tests ignore the team's standards and fixtures, which live only in a wiki. How do you give CI Claude that knowledge? Tests using CLAUDE.md to provide testing standards and fixture conventions to CI-invoked Claude Code.
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 | the repository's instruction file that Claude Code loads at the start of the nightly run |
| Headless | the nightly job runs claude -p with nobody present to explain the standards |
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory) CLAUDE.md Headless
Understand Foundations Mock Exam 4 · Q742's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The job ignores standards it was never given; they live in a wiki outside the run. CLAUDE.md is the mechanism CI-invoked Claude Code reads for project context, so the standards and fixture catalog belong there. --bare would drop that file, and filters or extra turns do not teach the conventions.
Connect the design to the situation
A generated test builds a fake ledger by hand instead of importing test/fixtures/ledger.ts.
Best answer: A. CLAUDE.md is how CI-invoked Claude Code receives project context such as testing standards, valuable-test criteria and fixture conventions. Today that knowledge sits in a wiki the job never sees. --bare skips CLAUDE.md entirely, so it would remove the very context the job needs, and length filters or extra turns do not tell Claude what the team values.
The decisive evidence in the stem
exist only in a wiki page
The standards are outside anything the CI run loads, so Claude cannot apply them; they must move into the project context file.
Official objective tested: Task 3.6 · Integrate Claude Code into CI/CD pipelines
What each choice would do here
A · Why this meets the requirement
Document the testing standards, what makes a test valuable, and the available fixtures in the project CLAUDE.md that the CI run loads.
Puts the standards and fixtures where every CI run reads them, so tests follow team conventions.
CLAUDE.md gains a 'Testing' section: test behaviour with money and dates, skip trivial accessors, and import fixtures from test/fixtures/ (ledger.ts, accounts.ts, fx-rates.ts). Every claude -p run loads it, and interactive sessions benefit too.
B · Why this does not meet the full requirement
Have the posting script drop any generated test shorter than ten lines, since trivial getter tests are usually the shortest ones produced.
Filters by length, which drops some useful short tests and keeps long low-value ones.
Ten lines is a rough proxy. Some getter tests are long, and some valuable edge-case tests are short. The job keeps writing ad-hoc mocks, and reviewers still reject much of what survives the filter.
C · Why this does not meet the full requirement
Raise --max-turns so Claude has more time to explore the repository and discover the shared fixtures and the team's conventions by itself.
Hopes Claude infers conventions it was never told, at higher cost and with no guarantee.
Claude may open test/fixtures/ in some runs if it happens to look there, but nothing tells it that fixtures are required or which tests matter. Runs become slower and more costly, and results vary night to night.
D · Why this does not meet the full requirement
Add --bare to the nightly command so every run starts the same way on each runner, without loading any local configuration or project files.
Makes runs consistent but skips CLAUDE.md, removing project context rather than adding standards.
--bare speeds up start-up and makes runs repeatable by skipping auto-discovery, including CLAUDE.md. The nightly job would then have even less project context, and the tests would still ignore fixtures and value criteria.
Check your understanding · explain the design in your own words
Generated tests ignore the team's standards and fixtures, which live only in a wiki. How do you give CI Claude that knowledge?
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 — CI/CD automation — territory)
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory) CLAUDE.md Headless
Return to Foundations Mock Exam 4 · Q742's situation and clause-by-clause explanation
Answer
**A.** CLAUDE.md is how CI-invoked Claude Code receives project context such as testing standards, valuable-test criteria and fixture conventions. Today that knowledge sits in a wiki the job never sees. --bare skips CLAUDE.md entirely, so it would remove the very context the job needs, and length filters or extra turns do not tell Claude what the team values.Q743. A developer asks Claude Code to write formatSuggestion(), which turns a finding into a GitHub suggestion comment. After three attempts with increasingly detailed prose about multi-line ranges, deleted lines and indentation, each version handles a different case wrongly. The developer knows exactly what the output should be for each case. What is the most effective next step? (Select ONE.) A) Give two or three concrete input/output examples: a finding and the exact comment it should produce, tricky cases included. B) Switch to plan mode so Claude can explore how the posting script works before it writes another version of the formatting function. C) Write a longer, more precise prose specification covering every case and send it again, asking Claude to follow the description carefully this time. D) Ask Claude to interview the developer about the requirements, so it can surface considerations the developer may not have thought about yet.
Understand Foundations Mock Exam 4 · Q743 · the situation and each part of the question
The real situation behind this question
A Quillstack developer is building a small but fiddly function. It turns a review finding into a GitHub suggestion comment, which must have exactly the right line range and indentation. Claude has written it three times. Each time the developer explained more in words, and each time a different case came out wrong. The developer can write down exactly what each case should produce. They must decide how to give Claude that knowledge.
Read the question in parts
Part 1 · After three attempts with increasingly detailed prose
more description is not converging, so a different way to communicate the requirement is needed.
Part 2 · each version handles a different case wrongly
the prose is ambiguous in different places, so Claude reads it differently each time.
What you are being asked to decide
Three prose descriptions each produce a different wrong function. How do you show Claude what you want? Tests using concrete input/output examples when prose is 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 example | a finding object paired with the exact suggestion comment text it should produce |
| Iterative refinement | improving Claude's code over several turns by giving it clearer feedback each time |
Study: Iterative refinement: getting Claude from "close" to "right" Few-shot Claude Code
Understand Foundations Mock Exam 4 · Q743's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Prose has been read three different ways, while the developer knows the exact outputs. Two or three concrete input/output examples communicate the transformation without ambiguity. More prose, plan mode or an interview do not address an unclear transformation the developer can already show.
Connect the design to the situation
A three-line suggestion on a hunk with a deleted line comes out with the wrong range each time.
Best answer: A. When prose descriptions are interpreted inconsistently, concrete input/output examples are the most effective way to show the expected transformation. The developer already knows the exact outputs, so examples remove the ambiguity directly. More prose has already failed three times, and the interview pattern suits unknown requirements, not requirements the developer can state precisely.
The decisive evidence in the stem
The developer knows exactly what the output should be for each case
The expected results are known and concrete, so showing them as examples communicates the transformation better than describing it.
Official objective tested: Task 3.5 · Apply iterative refinement techniques for progressive improvement
What each choice would do here
A · Why this meets the requirement
Give two or three concrete input/output examples: a finding and the exact comment it should produce, tricky cases included.
Shows the exact expected results, which removes the ambiguity prose keeps creating.
The developer pastes three pairs: a single-line finding and its comment, a three-line range with a deleted line, and an indented block. Claude matches all three, and the developer adds them as unit tests so future edits keep them.
B · Why this does not meet the full requirement
Switch to plan mode so Claude can explore how the posting script works before it writes another version of the formatting function.
Adds exploration when the problem is an unclear transformation, not unknown code.
Plan mode lets Claude read the posting script, which it may already understand. The confusion is about the exact output format for edge cases, and exploring the code does not tell Claude what the developer expects.
C · Why this does not meet the full requirement
Write a longer, more precise prose specification covering every case and send it again, asking Claude to follow the description carefully this time.
Repeats the approach that already failed three times, with more room for misreading.
The fourth description is longer still. Claude follows it closely, but the words 'range' and 'after the deletion' still allow two readings. A different case breaks, and the developer has spent more time writing than coding.
D · Why this does not meet the full requirement
Ask Claude to interview the developer about the requirements, so it can surface considerations the developer may not have thought about yet.
Suits unclear requirements; here the developer can already state every expected output.
Claude asks about edge cases the developer already knows. The interview takes time and ends with the developer describing outputs in words again, which is the step that keeps failing.
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.
One input/output pair (illustrative)
Input:
{"file": "ledger.ts", "start_line": 40, "end_line": 42, "fix": " return round(total, 2);"}
Expected comment body:
```suggestion
return round(total, 2);
```
(posted with start_line 40, line 42, side RIGHT)Two or three pairs like this, including the deleted-line case, define the transformation exactly.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Three prose descriptions each produce a different wrong function. How do you show Claude 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 Claude Code
Return to Foundations Mock Exam 4 · Q743's situation and clause-by-clause explanation
Answer
**A.** When prose descriptions are interpreted inconsistently, concrete input/output examples are the most effective way to show the expected transformation. The developer already knows the exact outputs, so examples remove the ambiguity directly. More prose has already failed three times, and the interview pattern suits unknown requirements, not requirements the developer can state precisely.D3 · Prompting & Structured Output
Q744. Analysis of the 38% dismissed comments shows most are suggestions like 'consider adding a comment here', naming preferences, and flags on patterns used consistently across the codebase. The review prompt already says 'be conservative and only report high-confidence issues'. Comments on real bugs are accurate but get ignored with the rest. What change would most improve precision? (Select ONE.) A) Add more examples of style and naming issues to the prompt, so Claude understands better which of those problems are worth mentioning to developers. B) Have Claude rate its confidence from 1 to 10 for each finding, and post only findings rated 8 or higher as inline comments on the pull request. C) Replace it with explicit criteria: report correctness, security and data-integrity bugs; skip style, naming and patterns used elsewhere. D) Strengthen the instruction to 'be extremely conservative and report only issues you are completely certain about', and lower the temperature for the review.
Understand Foundations Mock Exam 4 · Q744 · the situation and each part of the question
The real situation behind this question
Quillstack's developers dismiss more than a third of Claude's review comments. The team looked at those comments and found a clear pattern: style nags, naming preferences, and complaints about patterns the whole codebase uses on purpose. The real bug reports are good, but they are hidden among the noise, so developers stop reading. The current prompt only asks Claude to be careful. The architect must decide what instruction will actually change the output.
Read the question in parts
Part 1 · flags on patterns used consistently across the codebase
some noise comes from flagging deliberate local conventions, which explicit skip criteria can exclude.
Part 2 · Comments on real bugs are accurate but get ignored with the rest
false positives in some categories destroy trust in the accurate ones.
What you are being asked to decide
'Be conservative' did not cut the noise. What instruction actually improves precision? Tests replacing vague confidence-based instructions with explicit report/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 |
|---|---|
| Precision | the share of posted review comments that developers agree are real problems |
| Review prompt | the instructions the CI job sends to Claude Code with each diff |
Study: Explicit criteria: say what to report and what to skip System prompt Calibration
Understand Foundations Mock Exam 4 · Q744's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Vague instructions like 'be conservative' do not tell Claude which issues the team values. Explicit criteria that name what to report and what to skip remove the noisy categories directly. Confidence thresholds, stronger wording or more style examples do not separate categories.
Connect the design to the situation
'Consider adding a comment here' appears 40 times in a week and drowns out a real rounding bug.
Best answer: C. General instructions like 'be conservative' do not tell Claude which categories to report, so they do not improve precision. Explicit criteria for what to report and what to skip target the categories that create most of the noise. Self-rated confidence is poorly calibrated, so a threshold filters unreliably. More style examples push toward the noisy category, not away from it.
The decisive evidence in the stem
already says 'be conservative and only report high-confidence issues'
A vague, confidence-based instruction is already in place and has not reduced the noisy categories, so the fix must name categories explicitly.
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
Add more examples of style and naming issues to the prompt, so Claude understands better which of those problems are worth mentioning to developers.
Teaches more about the noisy category instead of telling Claude to leave it out.
More style examples tell Claude that style matters and how to describe it. The number of style comments may even rise, which moves precision in the wrong direction.
B · Why this does not meet the full requirement
Have Claude rate its confidence from 1 to 10 for each finding, and post only findings rated 8 or higher as inline comments on the pull request.
Depends on self-reported confidence, which is poorly calibrated and does not track category.
Claude rates many style comments 8 or 9 because it is confident they are style issues. Some real bugs get a 7 and disappear. The threshold filters on a number that does not separate useful categories from noisy ones.
C · Why this meets the requirement
Replace it with explicit criteria: report correctness, security and data-integrity bugs; skip style, naming and patterns used elsewhere.
Names which issues to report and which to skip, targeting the categories that create noise.
The prompt now lists 'Report: wrong results, unsafe input handling, money or data loss. Skip: comments, naming, formatting, and patterns already used elsewhere in this repo.' Style nags stop, and the remaining comments are bugs developers act on.
D · Why this does not meet the full requirement
Strengthen the instruction to 'be extremely conservative and report only issues you are completely certain about', and lower the temperature for the review.
Repeats a vague instruction more strongly, which has already failed to change behaviour.
'Extremely conservative' still does not say what to leave out. Claude may post slightly fewer comments, but the mix stays the same. Lower temperature makes outputs more consistent, not more selective.
Check your understanding · explain the design in your own words
'Be conservative' did not cut the noise. What instruction actually improves precision?
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
Return to Foundations Mock Exam 4 · Q744's situation and clause-by-clause explanation
Answer
**C.** General instructions like 'be conservative' do not tell Claude which categories to report, so they do not improve precision. Explicit criteria for what to report and what to skip target the categories that create most of the noise. Self-rated confidence is poorly calibrated, so a threshold filters unreliably. More style examples push toward the noisy category, not away from it.Q745. Two complaints dominate the team retro. When a developer pushes fixes to an open pull request, the re-run review posts many of the same comments again, including ones already resolved. And the nightly test job keeps proposing tests for cases the existing suite already covers. Which TWO changes to the CI jobs address these complaints? (Select TWO.) A) Give the test-generation job the existing test files for each target module in its context, so it can avoid scenarios the suite already covers. B) On re-runs, include the previous review's findings in the prompt and instruct Claude to report only new issues or ones still unaddressed in the latest commits. C) Raise --max-turns for both jobs so Claude has enough time to work out by itself what was said before and which tests already exist. D) Have the posting script delete every earlier Claude comment on the pull request before it posts the full new set of review comments.
Understand Foundations Mock Exam 4 · Q745 · the situation and each part of the question
The real situation behind this question
Quillstack's developers like the idea of automated review, but the details annoy them. After every fix commit, Claude posts the same comments again, even on lines that were already corrected and discussed. The nightly test generator suggests tests that already exist two files away. Both problems make developers ignore the output. The architect must change what each CI job gives Claude so it stops repeating itself.
Read the question in parts
Part 1 · the re-run review posts many of the same comments again
each review run starts with no memory of earlier runs, so it re-discovers the same issues.
Part 2 · for cases the existing suite already covers
the test job never sees the existing tests, so it cannot know what is covered.
What you are being asked to decide
Re-runs repeat old comments, and test generation repeats existing tests. Which two context changes fix this? Tests giving CI-invoked Claude Code the prior findings and existing tests it needs to avoid duplicates.
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 |
|---|---|
| Headless | Claude Code running in the CI job with claude -p, with no person to give it context interactively |
| Context | everything the CI job puts in front of Claude: the diff, earlier findings, existing tests |
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory) Headless Context window
Understand Foundations Mock Exam 4 · Q745's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Both duplicates come from missing context: the review cannot see what it said before, and test generation cannot see existing tests. So the review gets its prior findings with an instruction to report only new or open issues, and the test job gets the existing test files. Deleting comments or adding turns does not supply the missing information.
Connect the design to the situation
A resolved null-check comment is posted again after a fix commit; a new test duplicates one in ledger.test.ts.
Best answer: AB. Each complaint has its own missing input. The re-run review does not know what it already said, so it must receive the prior findings and be told to report only new or unaddressed issues. Test generation does not see the existing tests, so it must receive them. Deleting old comments erases resolved discussions instead of avoiding repeats, and more turns do not supply missing context.
The decisive evidence in the stem
including ones already resolved
The re-run has no record of earlier findings or their status, so it cannot tell new problems from ones that were already discussed and fixed.
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
Give the test-generation job the existing test files for each target module in its context, so it can avoid scenarios the suite already covers.
Shows the test job what is already tested, so it can target gaps instead of repeating coverage.
Before generating tests for ledger/reconcile.ts, the job adds ledger/reconcile.test.ts to the context. Claude sees the covered branches and proposes tests only for the uncovered currency-rounding path.
B · Why this does not meet the full requirement
On re-runs, include the previous review's findings in the prompt and instruct Claude to report only new issues or ones still unaddressed in the latest commits.
Gives the re-run what it already reported, so it can skip resolved items and post only what is new or still open.
The workflow fetches the previous run's JSON findings and adds them to the prompt: 'These were reported earlier; report only issues that are new or still present.' Fixed issues are not repeated, and an unaddressed one is mentioned once as still open.
C · Why this does not meet the full requirement
Raise --max-turns for both jobs so Claude has enough time to work out by itself what was said before and which tests already exist.
Adds time and cost without adding the missing information, so duplicates continue.
With more turns Claude may read more files, but nothing tells it what the earlier review said, and it is not asked to compare with existing tests. Runs get slower and the blocking check risks its 10-minute limit.
D · Why this does not meet the full requirement
Have the posting script delete every earlier Claude comment on the pull request before it posts the full new set of review comments.
Removes duplicates by destroying earlier threads, including developer replies and resolution history.
The script deletes 30 old comments, including threads where developers explained a design choice. Then it posts a fresh set that repeats the same points. Reviewers lose history, and already-resolved issues come back as new.
Check your understanding · explain the design in your own words
Re-runs repeat old comments, and test generation repeats existing tests. Which two context 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: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory)
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory) Headless Context window
Return to Foundations Mock Exam 4 · Q745's situation and clause-by-clause explanation
Answer
**AB.** Each complaint has its own missing input. The re-run review does not know what it already said, so it must receive the prior findings and be told to report only new or unaddressed issues. Test generation does not see the existing tests, so it must receive them. Deleting old comments erases resolved discussions instead of avoiding repeats, and more turns do not supply missing context.Q746. The tech lead wrote the team's review standards in their own ~/.claude/CLAUDE.md months ago. Reviews in the lead's local sessions follow them closely, but the CI review job and two newly hired developers get generic feedback that ignores the standards. Running /memory in a new hire's session shows only the repository's short root CLAUDE.md. What should the team do? (Select ONE.) A) Move the review standards into the project's root CLAUDE.md or a file it imports, commit it, and confirm with /memory that sessions load it. B) Paste the standards into the CI workflow's prompt string, and ask new developers to paste them into each review request they make locally. C) Put the standards in the lead's .claude/settings.local.json in the repository so they apply to every session that runs inside the project. D) Ask each developer to copy the lead's file into their own ~/.claude/CLAUDE.md, and add the same file to the CI runner's home directory as well.
Understand Foundations Mock Exam 4 · Q746 · the situation and each part of the question
The real situation behind this question
Quillstack's tech lead tuned Claude's reviews carefully and was happy with the results. Then the team noticed that CI reviews and reviews by two new developers were much weaker. A new hire ran /memory and saw that their session loaded only a short project file. The lead's standards had been in the lead's personal Claude Code file all along, so nobody else had ever received them. The architect must put the standards where the whole team and CI get them.
Read the question in parts
Part 1 · in their own ~/.claude/CLAUDE.md
the standards live at user scope, which applies only to the lead's sessions.
Part 2 · the CI review job and two newly hired developers get generic feedback
everyone except the lead lacks the instructions, the signature of a user-versus-project scope problem.
What you are being asked to decide
Only the lead gets the review standards, because they are in the lead's personal file. Where should they go? Tests diagnosing a CLAUDE.md hierarchy issue and fixing it at project scope.
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 |
|---|---|
| User-level CLAUDE.md | ~/.claude/CLAUDE.md, loaded only in the lead's own sessions and never shared through git |
| /memory | the Claude Code command that lists which memory files the current session loaded |
Study: CLAUDE.md — the memory hierarchy CLAUDE.md Claude config files
Understand Foundations Mock Exam 4 · Q746's answer · full reasoning and worked examples
Claude synthesized · the point, straight
/memory shows the standards are not loaded for anyone but the lead, because they sit in a user-level file. Project-level CLAUDE.md is committed and loaded by every session, including CI. Copies, pasted prompts or settings files either drift or are the wrong kind of file.
Connect the design to the situation
The lead's laptop gives strict reviews; CI and new hires get generic ones.
Best answer: A. User-level CLAUDE.md applies only to that user's sessions and is not shared through version control, which is why the lead sees the standards and nobody else does. Project-level CLAUDE.md is committed and loads for everyone, including CI. Copying the file to each home directory creates drifting copies, and settings files hold configuration, not instructions.
The decisive evidence in the stem
Running /memory in a new hire's session shows only the repository's short root CLAUDE.md
The standards are not in any file the new hire's session loads, confirming they live at user level, not project level.
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
Move the review standards into the project's root CLAUDE.md or a file it imports, commit it, and confirm with /memory that sessions load it.
Puts the standards in the shared, versioned project file every session and the CI job loads.
The standards move to CLAUDE.md at the repository root or to docs/review-standards.md imported with @docs/review-standards.md. After a pull, /memory in any session lists the file, and the CI job loads it from the checkout.
B · Why this does not meet the full requirement
Paste the standards into the CI workflow's prompt string, and ask new developers to paste them into each review request they make locally.
Duplicates the standards in many places and relies on people pasting them correctly each time.
The CI prompt grows a long pasted block, and developers paste the same text by hand. Versions drift between the workflow and people's clipboards, and interactive sessions without the paste get generic reviews again.
C · Why this does not meet the full requirement
Put the standards in the lead's .claude/settings.local.json in the repository so they apply to every session that runs inside the project.
Uses a personal, uncommitted settings file for content that belongs in an instruction file.
settings.local.json is a personal file that is normally not committed, and it holds settings such as permissions, not instructions. Claude would not read review standards from it, and CI would never see it.
D · Why this does not meet the full requirement
Ask each developer to copy the lead's file into their own ~/.claude/CLAUDE.md, and add the same file to the CI runner's home directory as well.
Spreads unversioned copies that drift apart and must be updated by hand on every machine.
Every machine now has a private copy. When the lead edits the standards, some copies update and some do not, and the CI runner image needs a rebuild for each change. The team has several versions of the truth and no history of changes.
Check your understanding · explain the design in your own words
Only the lead gets the review standards, because they are in the lead's personal file. Where should they 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: CLAUDE.md — the memory hierarchy
Study: CLAUDE.md — the memory hierarchy CLAUDE.md Claude config files
Return to Foundations Mock Exam 4 · Q746's situation and clause-by-clause explanation
Answer
**A.** User-level CLAUDE.md applies only to that user's sessions and is not shared through version control, which is why the lead sees the standards and nobody else does. Project-level CLAUDE.md is committed and loads for everyone, including CI. Copying the file to each home directory creates drifting copies, and settings files hold configuration, not instructions.D3 · Prompting & Structured Output
Q747. Quillstack services deliberately return Result objects instead of throwing exceptions, and wrap them in several helper styles. The review keeps flagging these as 'unhandled errors', while it sometimes misses a real case where a Result is ignored. A rule saying 'do not flag the Result pattern' cut both kinds of comment. What change best improves the review's judgment? (Select ONE.) A) Remove error handling from the review's scope entirely until the prompt can be redesigned, so developers stop seeing the false 'unhandled error' comments. B) Add two to four examples contrasting an acceptable Result pattern with a genuinely ignored Result, each explaining why one is fine and the other is a bug. C) Expand the rule into a full list naming every helper function and wrapper style the team uses, so Claude knows exactly which ones never to flag. D) Run the review on a larger model, which should understand the Result pattern better without needing any changes to the review prompt.
Understand Foundations Mock Exam 4 · Q747 · the situation and each part of the question
The real situation behind this question
Quillstack's backend uses a deliberate error-handling style: functions return a Result value instead of throwing. Claude's reviews keep calling these 'unhandled errors'. When the team added a rule telling Claude to ignore the pattern, it also stopped catching the real bug, where someone calls a function and silently ignores its Result. The team needs Claude to tell the safe uses from the dangerous one, including in helper styles that will be added later.
Read the question in parts
Part 1 · wrap them in several helper styles
the acceptable pattern appears in many forms, so a list of exact cases will not cover it.
Part 2 · it sometimes misses a real case where a Result is ignored
the review must still catch the genuine issue, so blanket exclusion is not acceptable.
What you are being asked to decide
Claude confuses the team's deliberate Result pattern with a real bug. How do you teach the difference? Tests few-shot examples that distinguish acceptable patterns from genuine issues, enabling generalization.
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 | a small number of worked examples in the review prompt showing the right judgment and why |
| Generalize | apply the shown distinction to new helper styles the examples never mention |
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Prompting technique choice
Understand Foundations Mock Exam 4 · Q747's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Claude needs to judge whether a Result is handled, not to match a fixed pattern. Two to four contrasting examples with reasons teach that distinction, so it generalizes to new helpers. Blanket rules, lists, a bigger model or disabling the category do not teach the judgment.
Connect the design to the situation
A Result returned and checked by a helper is flagged, while a Result silently dropped is missed.
Best answer: B. Targeted few-shot examples that contrast acceptable code with a real issue, and explain the reasoning, teach the distinction itself, so Claude can generalize to wrapper styles not listed anywhere. A blanket rule removed real bugs along with the noise, and an exhaustive list covers only today's helpers. Turning off the category hides the problem instead of fixing the judgment.
The decisive evidence in the stem
A rule saying 'do not flag the Result pattern' cut both kinds of comment
The rule could not separate acceptable uses from real bugs, which shows Claude needs to learn the distinction, not a blanket exclusion.
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
Remove error handling from the review's scope entirely until the prompt can be redesigned, so developers stop seeing the false 'unhandled error' comments.
Hides false positives and real bugs alike, giving up a category the team needs.
Developers stop seeing false error-handling comments, and they also stop getting warnings about ignored Results, a bug class that can lose payment data. The prompt still has not learned the difference, so turning the category back on brings the noise back.
B · Why this meets the requirement
Add two to four examples contrasting an acceptable Result pattern with a genuinely ignored Result, each explaining why one is fine and the other is a bug.
Shows the distinction and its reasoning, so Claude can judge wrapper styles it has not seen.
The prompt gains three short examples: a Result returned through a helper (fine, because the caller handles it), a Result matched with ok/err (fine), and a call whose Result is discarded (bug, because a failed transfer goes unnoticed). Claude applies the reasoning to new helpers.
C · Why this does not meet the full requirement
Expand the rule into a full list naming every helper function and wrapper style the team uses, so Claude knows exactly which ones never to flag.
Covers only the helpers listed today and still teaches nothing about ignored Results.
The list names today's six helpers. Next month someone adds mapResultAsync() and Claude flags it again. The list also says nothing about what an ignored Result looks like, so the missed bugs stay missed.
D · Why this does not meet the full requirement
Run the review on a larger model, which should understand the Result pattern better without needing any changes to the review prompt.
Spends more on a judgment gap that the prompt has never demonstrated to the model.
A larger model may do slightly better, but it has never been shown this team's convention. It still has to guess which uses are deliberate, and it costs more for every review.
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.
Contrasting examples in the review prompt (illustrative)
<example verdict="no finding">
const r = await transfer(a, b);
return r; // caller handles the Result
Why: the Result is propagated, not ignored.
</example>
<example verdict="finding: high">
await transfer(a, b);
log.info('done');
Why: the Result is discarded, so a failed transfer is silent.
</example>The examples teach the rule 'is the Result handled or propagated?', not a list of helpers.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Claude confuses the team's deliberate Result pattern with a real bug. How do you teach the difference?
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 Prompting technique choice
Return to Foundations Mock Exam 4 · Q747's situation and clause-by-clause explanation
Answer
**B.** Targeted few-shot examples that contrast acceptable code with a real issue, and explain the reasoning, teach the distinction itself, so Claude can generalize to wrapper styles not listed anywhere. A blanket rule removed real bugs along with the noise, and an exhaustive list covers only today's helpers. Turning off the category hides the problem instead of fixing the judgment.Q748. Testing the comment-posting script reveals three bugs: comments on renamed files land on the wrong line because the line mapping ignores renames; the duplicate-comment check keys on that same mapped line number; and an unrelated log message misspells 'reconciliation'. How should the developer send these fixes to Claude Code? (Select ONE.) A) Send the three bugs one at a time in separate turns, verifying each fix before moving on, so every change stays small and easy to review. B) Describe the two line-mapping bugs together in one detailed message, since their fixes interact, and handle the typo separately on its own. C) Fix the typo first, then the duplicate check, then the line mapping, so that Claude starts with the simplest change and builds up to the hardest. D) Send all three bugs in a single message, so that Claude fixes everything at once and the developer reviews just one combined change.
Understand Foundations Mock Exam 4 · Q748 · the situation and each part of the question
The real situation behind this question
A Quillstack developer has found three bugs in the script that posts Claude's comments. Two are tangled: the line mapping ignores renamed files, and the duplicate check uses those same mapped lines as its key. The third is just a typo in a log message. If the mapping is fixed alone, the duplicate check may suddenly see every old comment as new. The developer must decide how to hand these to Claude Code.
Read the question in parts
Part 1 · the line mapping ignores renames
this is the root bug that the duplicate check also depends on.
Part 2 · an unrelated log message misspells 'reconciliation'
this fix is independent and does not affect the other two bugs.
What you are being asked to decide
Two bugs are linked and one is unrelated. Should you send them together, one at a time, or mixed? Tests sending interacting problems together and independent problems separately.
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 |
|---|---|
| Interacting issues | the line mapping and the duplicate check, where changing one changes how the other behaves |
| Regression | a working behaviour that breaks because of a later change, such as duplicate detection after a mapping fix |
Study: Iterative refinement: getting Claude from "close" to "right" Claude Code Regression
Understand Foundations Mock Exam 4 · Q748's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The duplicate check depends on the line mapping, so their fixes interact and belong in one detailed message. The typo is independent, so it is fixed on its own. Bundling everything mixes concerns, and splitting the linked bugs invites regressions.
Connect the design to the situation
Fixing the rename mapping silently changes the duplicate-check keys unless both are handled together.
Best answer: B. When fixes interact, they should be described together so Claude can design one consistent change; when problems are independent, fixing them separately keeps changes clean. The duplicate check depends on the line mapping, so fixing one without the other risks breaking it. The typo shares nothing with them, so bundling it adds noise.
The decisive evidence in the stem
keys on that same mapped line number
The duplicate check depends on the mapping, so changing the mapping changes the check, which means the two fixes interact.
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
Send the three bugs one at a time in separate turns, verifying each fix before moving on, so every change stays small and easy to review.
Splits linked bugs, so fixing the mapping alone can break the duplicate check.
Claude fixes the mapping first. The duplicate check now computes different keys for existing comments and reposts them all. The next turn must repair a problem the first fix created, which careful bundling would have avoided.
B · Why this meets the requirement
Describe the two line-mapping bugs together in one detailed message, since their fixes interact, and handle the typo separately on its own.
Lets Claude design one consistent fix for the linked bugs and keeps the typo separate.
The developer writes: 'Line mapping ignores renames; the duplicate check keys on mapped lines, so fix both consistently and keep old comments recognized.' Claude changes both in one coherent diff. The typo is a separate one-line request.
C · Why this does not meet the full requirement
Fix the typo first, then the duplicate check, then the line mapping, so that Claude starts with the simplest change and builds up to the hardest.
Orders by difficulty and still separates the two bugs that depend on each other.
The typo goes first, then the duplicate check is changed against the old mapping, then the mapping changes and invalidates that check. The order by difficulty creates the same interaction problem with an extra round.
D · Why this does not meet the full requirement
Send all three bugs in a single message, so that Claude fixes everything at once and the developer reviews just one combined change.
Bundles an unrelated typo with linked fixes, mixing concerns in one change.
Claude fixes all three in one diff. The linked fix may be right, but the typo change is mixed in, and if something regresses the developer must untangle three changes. It works, but less cleanly than separating the independent fix.
Check your understanding · explain the design in your own words
Two bugs are linked and one is unrelated. Should you send them together, one at a time, or mixed?
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" Claude Code Regression
Return to Foundations Mock Exam 4 · Q748's situation and clause-by-clause explanation
Answer
**B.** When fixes interact, they should be described together so Claude can design one consistent change; when problems are independent, fixing them separately keeps changes clean. The duplicate check depends on the line mapping, so fixing one without the other risks breaking it. The typo shares nothing with them, so bundling it adds noise.Q749. The root CLAUDE.md has grown to 1,900 lines mixing TypeScript service conventions, Python data-job conventions, and payment-specific rules. Reviews of Python-only pull requests sometimes apply TypeScript rules, and maintainers of each package want to choose which standards apply to their code. What organization fits best? (Select ONE.) A) Copy the full set of standards into every package's own CLAUDE.md, so each package has everything it needs locally without any imports. B) Split the standards into focused files, and in each package's CLAUDE.md use @import to pull in the standards files its maintainers choose. C) Move the standards into a skill that reviewers must invoke at the start of each review, so Claude loads the right conventions on demand. D) Keep one root CLAUDE.md but add a clear heading for each language and trust Claude to work out which section applies to each file it reviews.
Understand Foundations Mock Exam 4 · Q749 · the situation and each part of the question
The real situation behind this question
Quillstack's root CLAUDE.md started small and grew with every incident. Now it is 1,900 lines covering two languages and many payment rules. Claude sometimes applies a TypeScript rule to a Python job, and developers complain. The maintainers of each package know which standards their code needs and want to decide that themselves. The architect must reorganize the instructions without losing anything.
Read the question in parts
Part 1 · has grown to 1,900 lines
the file is monolithic, so every session loads everything, relevant or not.
Part 2 · Reviews of Python-only pull requests sometimes apply TypeScript rules
mixing all standards in one place leads to wrong rules being applied.
What you are being asked to decide
One huge CLAUDE.md mixes languages, and reviews apply the wrong rules. How should it be organized? Tests using @import in package-level CLAUDE.md files to include only relevant standards.
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 | a line such as @../../docs/standards/python.md inside a CLAUDE.md that pulls that file in |
| Modular prompt | instructions kept in small focused files and combined where needed, instead of one large block |
Study: CLAUDE.md — the memory hierarchy CLAUDE.md Modular prompt
Understand Foundations Mock Exam 4 · Q749's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A monolithic file loads everything everywhere and leaves Claude to guess what applies. Focused standards files imported by each package's CLAUDE.md let maintainers choose and keep one source per rule. Headings, skills or full copies keep the mixing, make standards optional, or cause drift.
Connect the design to the situation
A Python data-job PR is told to use TypeScript's readonly modifiers.
Best answer: B. Focused standards files with @import in each package's CLAUDE.md keep the configuration modular, let maintainers pick what applies, and avoid loading Python rules for TypeScript code. A single file with headings relies on inference, which is already failing. Full copies in every package drift, and a skill that someone must remember to invoke does not suit always-on standards.
The decisive evidence in the stem
maintainers of each package want to choose which standards apply to their code
Selection per package is required, which @import in package-level CLAUDE.md files provides from shared, focused standards files.
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
Copy the full set of standards into every package's own CLAUDE.md, so each package has everything it needs locally without any imports.
Creates many full copies that drift apart and still mixes irrelevant rules into each package.
Each package now carries 1,900 lines. A payment rule fixed in one copy stays wrong in the others, and Python packages still load TypeScript rules, so both drift and irrelevant context get worse.
B · Why this meets the requirement
Split the standards into focused files, and in each package's CLAUDE.md use @import to pull in the standards files its maintainers choose.
Lets each package load exactly the standards its maintainers selected, from shared source files.
Standards move into docs/standards/typescript.md, python.md and payments.md. data-jobs/CLAUDE.md imports python.md and payments.md; services/ledger/CLAUDE.md imports typescript.md and payments.md. Each file has one owner and is updated in one place.
C · Why this does not meet the full requirement
Move the standards into a skill that reviewers must invoke at the start of each review, so Claude loads the right conventions on demand.
Makes always-needed standards depend on someone invoking a skill in each review.
A skill loads only when invoked. Reviewers forget, and the CI job would need extra prompting to invoke it every time. Standards that should always apply become optional, which is the wrong trade for core conventions.
D · Why this does not meet the full requirement
Keep one root CLAUDE.md but add a clear heading for each language and trust Claude to work out which section applies to each file it reviews.
Keeps the mix that already causes wrong rules and relies on Claude to infer relevance.
Headings help a human reader, but Claude still receives all 1,900 lines in every session and must decide which parts apply. That is the inference that already fails on Python PRs, so the mistakes continue.
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.
Package CLAUDE.md with imports (illustrative)
# data-jobs/CLAUDE.md
Python batch jobs for reconciliation.
@../docs/standards/python.md
@../docs/standards/payments.md
# services/ledger/CLAUDE.md
@../../docs/standards/typescript.md
@../../docs/standards/payments.mdEach package pulls in only the standards its maintainers chose; each standards file exists once.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
One huge CLAUDE.md mixes languages, and reviews apply the wrong rules. How should it be organized?
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
Return to Foundations Mock Exam 4 · Q749's situation and clause-by-clause explanation
Answer
**B.** Focused standards files with @import in each package's CLAUDE.md keep the configuration modular, let maintainers pick what applies, and avoid loading Python rules for TypeScript code. A single file with headings relies on inference, which is already failing. Full copies in every package drift, and a skill that someone must remember to invoke does not suit always-on standards.D3 · Prompting & Structured Output
Q750. The nightly job asks Claude Code to generate tests for a module and then, in the same session, to 'review the tests you just wrote and fix any problems'. The review step rarely changes anything, yet humans later find tests that assert the current buggy behaviour as correct. What change would most improve how often these problems are caught? (Select ONE.) A) Keep the same session, but enable extended thinking for the review step so Claude reasons more carefully about each test it wrote earlier. B) Run the same-session review step three times in a row, and keep only the changes that at least two of the three review passes agree on. C) Strengthen the review instruction to 'review critically, as if a different engineer wrote these tests', while keeping the review in the same session. D) Run the review as a separate claude -p call that sees only the module code and the generated tests, not the generator's reasoning.
Understand Foundations Mock Exam 4 · Q750 · the situation and each part of the question
The real situation behind this question
Quillstack's nightly job writes tests and then asks Claude to check its own work before opening a pull request. The check almost never finds anything. Later, human reviewers find tests that lock in existing bugs, such as an assertion that a wrongly rounded total is correct. The model wrote those tests believing the current code was right, and the same session still believes it. The architect must design a review step that can actually disagree.
Read the question in parts
Part 1 · The review step rarely changes anything
self-review is confirming rather than questioning, a known limitation of same-session review.
Part 2 · tests that assert the current buggy behaviour as correct
the errors come from an assumption made during generation, which the same context will not challenge.
What you are being asked to decide
The session that wrote the tests reviews them and finds nothing. How do you get a review that catches mistakes? 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 new claude -p run that sees the code and tests but not how the tests were reasoned out |
| Extended thinking | extra reasoning the model does before answering, which still starts from its own earlier assumptions |
Study: Independent review and multi-pass review Context isolation Extended thinking
Understand Foundations Mock Exam 4 · Q750's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The same session keeps the reasoning that produced the faulty tests, so it tends to confirm them. An independent claude -p run without that context can question the assumptions. Extended thinking, role-play instructions or repeated self-review all stay inside the original context.
Connect the design to the situation
A test asserts that a rounding bug's wrong output is the expected value, and self-review approves it.
Best answer: D. A model reviewing its own work in the same session keeps the reasoning that produced it, so it tends to confirm its decisions. An independent instance without that context is more effective at catching subtle issues than self-review instructions or extended thinking. Repeating the same-session review just repeats the same bias, and consensus filtering removes the rare correct catches.
The decisive evidence in the stem
in the same session
The reviewer shares the generator's reasoning context, which makes it unlikely to question the assumptions that produced the faulty tests.
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
Keep the same session, but enable extended thinking for the review step so Claude reasons more carefully about each test it wrote earlier.
Adds reasoning inside the same biased context, so the generator's assumptions stay unchallenged.
Extended thinking makes the same session reason longer, but it starts from the belief that the current output is correct. It may tidy style or names and still approve the assertion that locks in the rounding bug.
B · Why this does not meet the full requirement
Run the same-session review step three times in a row, and keep only the changes that at least two of the three review passes agree on.
Repeats the same biased review and then discards rare correct findings by requiring agreement.
Three same-session passes share the same bias, so they mostly agree on 'no change'. When one pass does catch the bug, the other two outvote it, and the useful finding is thrown away.
C · Why this does not meet the full requirement
Strengthen the review instruction to 'review critically, as if a different engineer wrote these tests', while keeping the review in the same session.
Asks the model to pretend it lacks context it actually has, which does not remove the bias.
Claude cannot forget the reasoning it already has in context. Pretending to be a different engineer changes the tone of the review, not the assumptions behind it, so the same tests pass.
D · Why this meets the requirement
Run the review as a separate claude -p call that sees only the module code and the generated tests, not the generator's reasoning.
Gives the reviewer a fresh view, free of the reasoning that made the tests look right.
A second job step runs claude -p with the module source, the spec comments and the generated tests only. Without the generator's reasoning, it asks 'should round(2.675) be 2.68?' and flags the test. The pull request then carries independently checked tests.
Check your understanding · explain the design in your own words
The session that wrote the tests reviews them and finds nothing. How do you get a review that catches mistakes?
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 Context isolation Extended thinking
Return to Foundations Mock Exam 4 · Q750's situation and clause-by-clause explanation
Answer
**D.** A model reviewing its own work in the same session keeps the reasoning that produced it, so it tends to confirm its decisions. An independent instance without that context is more effective at catching subtle issues than self-review instructions or extended thinking. Repeating the same-session review just repeats the same bias, and consensus filtering removes the rare correct catches.Q751. Database migration files live in a migrations/ folder inside each of the twelve services and four data-job packages. They need strict conventions (reversible steps, no data deletion without a backfill), which today sit in the root CLAUDE.md and load into every review, including frontend-only pull requests. What is the most maintainable way to apply these conventions only where they are needed? (Select ONE.) A) Create a CLAUDE.md inside each of the sixteen migrations folders containing the migration conventions, so they load when Claude works in those folders. B) Create .claude/rules/migrations.md with paths frontmatter matching '/migrations/', so the conventions load only when Claude works on matching files. C) Keep the conventions in the root CLAUDE.md, but move them under a heading that tells Claude to apply them only when reviewing migration files. D) Package the conventions as a migration-review skill and instruct the CI prompt to invoke it whenever the pull request diff includes a migration file.
Understand Foundations Mock Exam 4 · Q751 · the situation and each part of the question
The real situation behind this question
Quillstack has migration folders in sixteen places, because every service and data job owns its own database changes. The migration rules are strict and important, so someone put them in the root CLAUDE.md. Now every review, even one that only changes a button colour, carries those rules. The team wants the rules applied every time a migration is touched, and nowhere else, without maintaining sixteen copies.
Read the question in parts
Part 1 · including frontend-only pull requests
irrelevant rules load into reviews that cannot use them, wasting context and tokens.
Part 2 · the most maintainable way
the solution should keep one copy of the convention, not many.
What you are being asked to decide
Migration rules load into every review, but migrations are spread across sixteen folders. How do you scope them? Tests path-specific rules with glob patterns 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 .claude/rules/migrations.md listing globs such as '**/migrations/**' |
| Context budget | the room left for the actual diff once always-loaded instructions are counted |
Study: .claude/rules/ — path-scoped conventions with glob frontmatter Frontmatter Context budget
Understand Foundations Mock Exam 4 · Q751's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The rule applies to files in sixteen folders and nowhere else. A .claude/rules/ file with a glob in paths frontmatter loads it only for matching files, from one copy. Per-folder CLAUDE.md files drift, a root heading still loads everywhere, and a skill adds a step.
Connect the design to the situation
A CSS-only pull request carries the full migration rulebook in its review context.
Best answer: B. A path-scoped rule with a glob loads only when Claude works on matching files, wherever they sit in the repository, so frontend reviews stop paying for migration rules. Sixteen subdirectory CLAUDE.md files would each need the same text and would drift. A heading in the root file still loads everywhere, and a skill adds an invocation step that the glob handles automatically.
The decisive evidence in the stem
inside each of the twelve services and four data-job packages
The same convention applies to files spread across many directories, which a single glob-scoped rule covers better than 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 does not meet the full requirement
Create a CLAUDE.md inside each of the sixteen migrations folders containing the migration conventions, so they load when Claude works in those folders.
Duplicates one convention into sixteen files that must be kept identical by hand.
Sixteen files each hold the same rules. When the team adds 'index changes need a concurrency note', someone must edit sixteen files, and a new service's migrations folder starts with none until someone remembers to copy one in.
B · Why this meets the requirement
Create .claude/rules/migrations.md with paths frontmatter matching '/migrations/', so the conventions load only when Claude works on matching files.
Defines the convention once and loads it automatically for matching files anywhere.
The file begins with paths: ['**/migrations/**'] and then lists the conventions. When Claude reads or edits services/ledger/migrations/0042_add_index.sql, the rule loads; a frontend pull request never loads it. New services inherit it automatically.
C · Why this does not meet the full requirement
Keep the conventions in the root CLAUDE.md, but move them under a heading that tells Claude to apply them only when reviewing migration files.
Still loads the rules in every review and relies on Claude choosing to apply them.
Every review still loads the full rules, so the token cost stays. Claude must decide when the heading applies, and in long reviews it may apply migration rules loosely or skip them on an actual migration.
D · Why this does not meet the full requirement
Package the conventions as a migration-review skill and instruct the CI prompt to invoke it whenever the pull request diff includes a migration file.
Adds an invocation step and CI logic for something a path glob does automatically.
The CI prompt needs logic to detect migration files and invoke the skill, and interactive sessions must remember to invoke it. The glob rule gives the same result with no extra step.
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)
---
paths:
- "**/migrations/**"
---
# Migration conventions
- Every step must be reversible; include the down migration.
- Never delete data without a backfill step and a ticket reference.One file, one glob, every migrations folder in the monorepo.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Migration rules load into every review, but migrations are spread across sixteen folders. How do you scope 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: .claude/rules/ — path-scoped conventions with glob frontmatter
Study: .claude/rules/ — path-scoped conventions with glob frontmatter Frontmatter Context budget
Return to Foundations Mock Exam 4 · Q751's situation and clause-by-clause explanation
Answer
**B.** A path-scoped rule with a glob loads only when Claude works on matching files, wherever they sit in the repository, so frontend reviews stop paying for migration rules. Sixteen subdirectory CLAUDE.md files would each need the same text and would drift. A heading in the root file still loads everywhere, and a skill adds an invocation step that the glob handles automatically.Q752. A developer must replace the team's homegrown review script with the official Claude Code GitHub Action. The change touches 14 workflow files and the shared findings schema, and there are two credible designs: one reusable workflow called by all jobs, or a composite action per job type. Each affects how secrets and permissions are scoped. How should they use Claude Code? (Select ONE.) A) Use plan mode to explore the workflows, compare both designs and their permission implications, agree on a plan, then execute it directly. B) Begin in direct execution, and switch to plan mode only if unexpected complexity appears partway through converting the workflow files. C) Start in direct execution and convert one workflow file at a time, letting the first few conversions show which of the two designs works better. D) Write a detailed prompt specifying exactly how each of the 14 files should change, then run it in direct execution so the change happens in one pass.
Understand Foundations Mock Exam 4 · Q752 · the situation and each part of the question
The real situation behind this question
Quillstack wants to retire its custom review script and use the official GitHub Action. A developer is assigned the migration. It touches many workflow files and the shared schema, and there are two reasonable ways to structure it. The choice affects which jobs can see which secrets, so getting it wrong has security consequences. The developer must decide how to work with Claude Code on a change like this.
Read the question in parts
Part 1 · touches 14 workflow files and the shared findings schema
the change is large and multi-file, so mistakes multiply across many places.
Part 2 · Each affects how secrets and permissions are scoped
the design decision has security impact, which makes deciding before editing important.
What you are being asked to decide
A 14-file change with two possible designs and security impact: plan first or start editing? Tests choosing plan mode for multi-file work with several valid approaches, then executing the plan.
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 proposes a plan but makes no edits until you approve |
| Permission scope | which workflow jobs can read which secrets and tokens, a key difference between the two designs |
Study: Plan mode vs direct execution — and the Explore subagent Interaction modes Permission mode
Understand Foundations Mock Exam 4 · Q752's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Fourteen files, two valid designs and security impact are exactly the conditions for plan mode. Plan first to explore and decide, then execute the agreed plan directly. Starting with edits or a fixed upfront prompt makes the architectural choice before the evidence is in.
Connect the design to the situation
Reusable workflow or composite actions — each scopes secrets differently.
Best answer: A. The task is multi-file, has two valid approaches, and carries security implications, which are the conditions plan mode is designed for. Exploring and choosing before editing avoids converting files one way and then redoing them. Starting directly lets early edits decide an architectural question by accident, and a detailed upfront prompt assumes the answer before anyone has looked at the workflows.
The decisive evidence in the stem
there are two credible designs
Several valid approaches with different trade-offs call for exploration and a decision before changes, the purpose of plan mode.
Official objective tested: Task 3.4 · Determine when to use plan mode vs direct execution
What each choice would do here
A · Why this meets the requirement
Use plan mode to explore the workflows, compare both designs and their permission implications, agree on a plan, then execute it directly.
Explores and decides first, then implements the agreed plan without costly rework.
In plan mode Claude reads the 14 workflows and the schema, lists which jobs need which secrets, and compares both designs. The team chooses the reusable workflow with narrowed permissions. The developer then leaves plan mode and Claude implements the plan.
B · Why this does not meet the full requirement
Begin in direct execution, and switch to plan mode only if unexpected complexity appears partway through converting the workflow files.
Ignores that the complexity is already known at the start, not something that might appear later.
The developer already knows the change is large, multi-file and has two designs. Waiting for complexity to 'appear' means the first conversions are made without a plan, and the switch to planning comes after rework has started.
C · Why this does not meet the full requirement
Start in direct execution and convert one workflow file at a time, letting the first few conversions show which of the two designs works better.
Lets the first edits settle an architectural choice, risking rework across the remaining files.
Claude converts three files to composite actions. The fourth reveals that a shared secret would then be exposed to jobs that should not see it, which favours the reusable workflow. Three files must be redone, and the history shows a design flip mid-change.
D · Why this does not meet the full requirement
Write a detailed prompt specifying exactly how each of the 14 files should change, then run it in direct execution so the change happens in one pass.
Assumes the right design is already known and skips exploring how the workflows interact.
The developer writes rules for each file before anyone has compared the two designs in this codebase. If the prompt picked the wrong structure, Claude implements the mistake consistently across all 14 files in one pass.
Check your understanding · explain the design in your own words
A 14-file change with two possible designs and security impact: plan first or start editing?
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 Interaction modes Permission mode
Return to Foundations Mock Exam 4 · Q752's situation and clause-by-clause explanation
Answer
**A.** The task is multi-file, has two valid approaches, and carries security implications, which are the conditions plan mode is designed for. Exploring and choosing before editing avoids converting files one way and then redoing them. Starting directly lets early edits decide an architectural question by accident, and a detailed upfront prompt assumes the answer before anyone has looked at the workflows.Q753. The review step runs claude -p with a prompt asking for findings 'as a list with file, line, severity and message'. A posting script then parses that prose with regular expressions to create inline comments, and about 15% of runs produce findings the script cannot parse, so those comments are silently lost. What change makes the output reliably machine-readable? (Select ONE.) A) Add a second claude -p call that converts the first call's prose findings into JSON before the posting script reads the converted result. B) Strengthen the prompt to say 'respond only with valid JSON and no other text', and keep the posting script's regular expressions as a fallback. C) Switch to --output-format stream-json so the posting script receives each finding as a separate event while the review is still running. D) Run claude -p with --output-format json and a --json-schema for the findings, and have the script read the validated structured_output field.
Understand Foundations Mock Exam 4 · Q753 · the situation and each part of the question
The real situation behind this question
Quillstack's review job asks Claude for a list of findings and a script turns them into inline comments on GitHub. The script uses patterns to find the file, line and severity in Claude's text. Claude usually writes the list the same way, but not always. In about one run in seven, a finding is phrased a little differently, the script skips it, and nobody notices that a comment is missing. The architect wants findings the script can read without guessing.
Read the question in parts
Part 1 · about 15% of runs
the failure is frequent and comes from format variation, not from wrong review content.
Part 2 · those comments are silently lost
real findings disappear without errors, so the fix must make the format guaranteed, not just more likely.
What you are being asked to decide
A script parses Claude's prose and loses 15% of findings. How do you get output a script can trust? Tests --output-format json with --json-schema for machine-parseable CI findings.
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 |
|---|---|
| --json-schema | the claude -p flag that makes Claude Code return a final answer matching your findings schema |
| structured_output | the field in the JSON result where the schema-matching findings object appears |
Study: What actually happens after @claude, step by step, and who reads the result Structured outputs JSON Schema Headless
Understand Foundations Mock Exam 4 · Q753's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Parsing prose fails whenever Claude words a finding differently. With --output-format json and --json-schema, Claude Code returns schema-valid findings in structured_output. Instructions, conversion calls or streaming leave the script dependent on free-form text.
Connect the design to the situation
A finding written as 'ledger.ts (around line 88) – high' does not match the script's pattern.
Best answer: D. With --json-schema in print mode, Claude Code validates the final answer against the schema and returns it in structured_output, so the script reads fields instead of parsing prose. A 'JSON only' instruction is still a request the model can miss, and a second conversion call adds cost and a new failure point. stream-json changes delivery, not whether findings match a schema.
The decisive evidence in the stem
parses that prose with regular expressions
The integration depends on free-form text matching a pattern, which breaks whenever the wording or layout varies.
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
Add a second claude -p call that converts the first call's prose findings into JSON before the posting script reads the converted result.
Adds a second model call that can also produce malformed text, plus extra time and cost.
The second call usually produces JSON, but it is another model output without schema validation, and it can drop or merge findings while converting. The job now has two model calls and two places to fail.
B · Why this does not meet the full requirement
Strengthen the prompt to say 'respond only with valid JSON and no other text', and keep the posting script's regular expressions as a fallback.
Still depends on the model obeying an instruction, and keeps the fragile parser for when it does not.
Most runs now return JSON, but some include a short preface or a trailing note, and the occasional malformed object still slips through. The regular expressions remain for those cases, so the silent loss continues at a lower rate.
C · Why this does not meet the full requirement
Switch to --output-format stream-json so the posting script receives each finding as a separate event while the review is still running.
Changes how output is delivered without making the findings follow a defined schema.
stream-json delivers events as they happen, which suits live progress displays. Each event still contains Claude's text, so the script must still parse findings out of prose, and the parse failures stay.
D · Why this meets the requirement
Run claude -p with --output-format json and a --json-schema for the findings, and have the script read the validated structured_output field.
Has Claude Code validate the findings against a schema, so the script reads fields, not prose.
The step runs claude -p --output-format json --json-schema "$(cat .github/review-schema.json)". The script reads .structured_output.findings[] and maps each object's file, line, severity and message to an inline comment. No pattern matching is left.
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 a findings schema (illustrative)
out=$(gh pr diff "$PR" | claude -p \
--output-format json \
--json-schema "$(cat .github/review-schema.json)" \
"Review this diff against the standards in CLAUDE.md.")
echo "$out" | jq -c '.structured_output.findings[]' | ./post-inline-comments.shThe script reads fields from structured_output; it never parses Claude's prose.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
A script parses Claude's prose and loses 15% of findings. How do you get output a script can trust?
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: What actually happens after @claude, step by step, and who reads the result
Study: What actually happens after @claude, step by step, and who reads the result Structured outputs JSON Schema Headless
Return to Foundations Mock Exam 4 · Q753's situation and clause-by-clause explanation
Answer
**D.** With --json-schema in print mode, Claude Code validates the final answer against the schema and returns it in structured_output, so the script reads fields instead of parsing prose. A 'JSON only' instruction is still a request the model can miss, and a second conversion call adds cost and a new failure point. stream-json changes delivery, not whether findings match a schema.Scenario 4 · Structured Data Extraction
D3 · Prompting & Structured Output
Q754. Two error patterns dominate the ERP rejection log. When an invoice has no purchase-order number, the extraction contains a plausible but invented one, because po_number is a required string. And pro forma invoices and debit memos are being labelled 'invoice', because doc_type is an enum of only invoice, credit_note and purchase_order. Which TWO schema changes address these patterns? (Select TWO.) A) Add an instruction to the prompt telling the model never to invent values, while keeping po_number as a required string in the schema. B) Add 'other' to the doc_type enum together with a doc_type_detail string, so unlisted document types are recorded instead of forced into a listed one. C) Make po_number optional and nullable, so the model can return null when the document contains no purchase-order number instead of inventing one. D) Turn on strict mode for the extraction tool, so every output is guaranteed to match the schema exactly and invalid values are rejected.
Understand Foundations Mock Exam 4 · Q754 · the situation and each part of the question
The real situation behind this question
Ledgerline's ERP customers keep rejecting records for two reasons. Some invoices arrive without a purchase-order number, yet the extracted record always has one, because the schema demands it, and the model obliges with a number that looks real. And vendors send document types the schema never listed, such as pro forma invoices, which get filed as normal invoices. Both errors pass schema validation. The architect must fix the schema design itself.
Read the question in parts
Part 1 · a plausible but invented one
the value is fabricated to satisfy the schema, a hallucination caused by field design.
Part 2 · an enum of only invoice, credit_note and purchase_order
the category list is closed, so any unlisted type must be forced into a wrong value.
What you are being asked to decide
A required field causes invented PO numbers, and a short enum mislabels document types. Which two schema changes help? Tests nullable fields for absent data and 'other' + detail enums for extensible categories.
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 may hold null, so 'no PO number on this document' can be recorded honestly |
| Enum | the fixed list of allowed doc_type values in the extraction tool's input_schema |
Study: Schema design details that prevent hallucination (tested by name) Missing values in schemas JSON Schema strict
Understand Foundations Mock Exam 4 · Q754's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Both errors come from schema design, not from syntax. A nullable po_number removes the pressure to invent a value, and 'other' plus a detail field lets unlisted types be named honestly. Strict mode and prompt rules cannot fix values that are already schema-valid.
Connect the design to the situation
An invoice without a PO gets 'PO-44817', and a debit memo is filed as an invoice.
Best answer: BC. A required field pushes the model to produce a value even when the source has none, so making po_number nullable removes the pressure to fabricate. A closed enum forces every document into a listed type; 'other' plus a detail string lets unlisted types be recorded honestly. Strict mode guarantees schema conformance, but these wrong values already conform, and a prompt rule fights the schema rather than fixing it.
The decisive evidence in the stem
because po_number is a required string
The schema demands a value that some documents do not contain, so the model fills the gap with a fabricated one.
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 an instruction to the prompt telling the model never to invent values, while keeping po_number as a required string in the schema.
Asks the model to resist a schema that still requires a value, so fabrication continues sometimes.
The model now sees 'never invent values' and a schema that still requires po_number. On most documents it follows the schema, so it still produces something. Fabrication drops a little but continues, and the conflict confuses other fields.
B · Why this does not meet the full requirement
Add 'other' to the doc_type enum together with a doc_type_detail string, so unlisted document types are recorded instead of forced into a listed one.
Lets unlisted document types be captured with their real name instead of a wrong listed one.
doc_type gains 'other', with doc_type_detail holding 'pro forma invoice' or 'debit memo'. The ERP stops posting pro formas as payables, and the team can see which new types are common enough to add to the enum later.
C · Why this does not meet the full requirement
Make po_number optional and nullable, so the model can return null when the document contains no purchase-order number instead of inventing one.
Removes the schema pressure that makes the model invent a PO number when none exists.
The schema now allows po_number to be a string or null. For an invoice with no PO the model returns null, the ERP routes it to a matching queue, and invented numbers stop appearing in the rejection log.
D · Why this does not meet the full requirement
Turn on strict mode for the extraction tool, so every output is guaranteed to match the schema exactly and invalid values are rejected.
Guarantees structure, but invented PO numbers and mislabelled types are already structurally valid.
Strict mode makes sure each output matches the schema. An invented 'PO-44817' is a valid string and 'invoice' is a valid enum value, so strict mode accepts both. Structure is guaranteed; correct meaning is not.
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 after the change (illustrative)
{"type": "object", "properties": {"po_number": {"type": ["string", "null"], "description": "Purchase-order number printed on the document, or null if none appears"}, "doc_type": {"type": "string", "enum": ["invoice", "credit_note", "purchase_order", "other"]}, "doc_type_detail": {"type": ["string", "null"], "description": "The document's own type name when doc_type is other"}}, "required": ["po_number", "doc_type", "doc_type_detail"]}Fields stay present (required) but may be null, so absence is explicit rather than invented.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
A required field causes invented PO numbers, and a short enum mislabels document types. Which two schema changes 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: Schema design details that prevent hallucination (tested by name)
Study: Schema design details that prevent hallucination (tested by name) Missing values in schemas JSON Schema strict
Return to Foundations Mock Exam 4 · Q754's situation and clause-by-clause explanation
Answer
**BC.** A required field pushes the model to produce a value even when the source has none, so making po_number nullable removes the pressure to fabricate. A closed enum forces every document into a listed type; 'other' plus a detail string lets unlisted types be recorded honestly. Strict mode guarantees schema conformance, but these wrong values already conform, and a prompt rule fights the schema rather than fixing it.D3 · Prompting & Structured Output
Q755. Each request offers three extraction tools, extract_invoice, extract_credit_note and extract_purchase_order, because the document type is unknown until the model reads it. With tool_choice 'auto', about 2% of responses are plain text such as 'This appears to be a credit note from Halvorsen Steel', and the pipeline has no record to import. Which setting fixes this? (Select ONE.) A) Set tool_choice to 'any', so the model must call one of the three extraction tools but can still choose which one fits the document. B) Keep tool_choice 'auto' and parse plain-text replies with a regular expression to detect the document type, then re-run with that tool forced. C) Keep tool_choice 'auto' and add a system prompt instruction that the model must always respond by calling one of the three extraction tools. D) Force extract_invoice with tool_choice naming that tool, since invoices are the most common document type in the monthly volume.
Understand Foundations Mock Exam 4 · Q755 · the situation and each part of the question
The real situation behind this question
Ledgerline's pipeline does not know whether a scanned page is an invoice, a credit note or a purchase order until Claude reads it. So it offers three extraction tools and lets the model choose. Most of the time this works. But about one response in fifty is a friendly sentence describing the document instead of a tool call. At 40,000 documents a month, that is hundreds of records the ERP never receives. The architect must close that gap.
Read the question in parts
Part 1 · With tool_choice 'auto'
the current setting lets the model reply in text, which is the cause of the missing records.
Part 2 · the pipeline has no record to import
a text reply is a total failure for this pipeline, so the setting must make a tool call guaranteed.
What you are being asked to decide
Sometimes the model writes text instead of calling any extraction tool. Which tool_choice fixes that? Tests tool_choice 'any' to guarantee a tool call when several extraction schemas exist.
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_choice 'any' | the model must call one of the offered extraction tools, but it picks which |
| Forced tool | tool_choice naming one tool, which would make every document an invoice |
Study: Structured output — the engineering ladder tool_choice Forced tool extraction
Understand Foundations Mock Exam 4 · Q755's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The model must choose among three schemas but must not answer in text. tool_choice 'any' requires a tool call and leaves the choice of tool to the model. Forcing one tool picks the wrong schema, and 'auto' with instructions or parsing still allows text.
Connect the design to the situation
'This appears to be a credit note from Halvorsen Steel' arrives as text, with no JSON to import.
Best answer: A. 'any' guarantees the model calls some tool while leaving the choice of tool to the model, which is exactly what an unknown document type needs. Forcing one tool would push credit notes and purchase orders into the invoice schema. 'auto' always allows a text reply, so a prompt rule only lowers the rate, and parsing text adds a fragile second path.
The decisive evidence in the stem
because the document type is unknown until the model reads it
The model must choose the tool, but must not skip calling one, which is the exact meaning of tool_choice 'any'.
Official objective tested: Task 4.3 · Enforce structured output using tool use and JSON schemas
What each choice would do here
A · Why this meets the requirement
Set tool_choice to 'any', so the model must call one of the three extraction tools but can still choose which one fits the document.
Requires a tool call and leaves the model free to pick the schema that matches the document.
With 'any', each response is one of the three tool calls. The model reads the scan, sees 'Credit Note CN-2209', and calls extract_credit_note. Every document produces a structured record of the right type.
B · Why this does not meet the full requirement
Keep tool_choice 'auto' and parse plain-text replies with a regular expression to detect the document type, then re-run with that tool forced.
Adds a second request and a fragile parser for a gap one setting closes.
The pipeline now parses English sentences to detect the type, then makes a second, forced call. It works for common wordings, fails on others, doubles cost for those documents, and adds a code path that must be maintained.
C · Why this does not meet the full requirement
Keep tool_choice 'auto' and add a system prompt instruction that the model must always respond by calling one of the three extraction tools.
Keeps the setting that permits text replies, so some documents still produce no record.
Text replies drop below 2% but do not disappear, because 'auto' still allows them. At 40,000 documents a month, even 0.5% means two hundred records needing manual handling.
D · Why this does not meet the full requirement
Force extract_invoice with tool_choice naming that tool, since invoices are the most common document type in the monthly volume.
Guarantees a call but forces every document into the invoice schema, whatever it really is.
Every response is now an extract_invoice call. A credit note's negative amounts and reference to the original invoice are squeezed into invoice fields, and purchase orders get invoice numbers. The ERP posts them as payables, a worse error than a missing record.
Check your understanding · explain the design in your own words
Sometimes the model writes text instead of calling any extraction tool. Which tool_choice fixes that?
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 tool_choice Forced tool extraction
Return to Foundations Mock Exam 4 · Q755's situation and clause-by-clause explanation
Answer
**A.** 'any' guarantees the model calls some tool while leaving the choice of tool to the model, which is exactly what an unknown document type needs. Forcing one tool would push credit notes and purchase orders into the invoice schema. 'auto' always allows a text reply, so a prompt rule only lowers the rate, and parsing text adds a fragile second path.Q756. A price-check step compares unit prices on each invoice with the vendor's contract. For one vendor it raised 340 'price mismatch' alerts last month. Investigation shows two valid contracts, one at 14.20 per unit effective until 31 March and a renewal at 15.10 effective from 1 April, and the extraction records the price but not each contract's effective dates. What change fixes this? (Select ONE.) A) Capture each contract's effective dates and each invoice's date, so the check compares an invoice only with the contract in force. B) Keep only the most recent contract for each vendor, so the price check always compares invoices against a single, current price. C) Raise the mismatch tolerance from 1% to 7%, so that small price differences between the two contracts no longer produce mismatch alerts. D) Have the model decide which contract price is more plausible for each invoice, based on the overall pattern of that vendor's recent invoices.
Understand Foundations Mock Exam 4 · Q756 · the situation and each part of the question
The real situation behind this question
Ledgerline checks invoice prices against vendor contracts to catch overcharges. One vendor produced hundreds of alerts in a month. The vendor was not overcharging. It had renewed its contract on 1 April with a new price, and the pipeline knew both prices but not when each applied. So every invoice looked wrong against one contract or the other. Reviewers wasted days. The architect must stop valid price changes from looking like disputes.
Read the question in parts
Part 1 · raised 340 'price mismatch' alerts last month
a systematic false-alert pattern points to missing information, not to many real overcharges.
Part 2 · one at 14.20 per unit effective until 31 March and a renewal at 15.10 effective from 1 April
both prices are correct for their own period, so the difference is temporal, not contradictory.
What you are being asked to decide
Two contracts with different prices for different periods trigger false mismatch alerts. What is missing? Tests requiring dates in structured outputs so temporal differences are not read as contradictions.
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 |
|---|---|
| Effective date | the period a contract price applies to, here until 31 March or from 1 April |
| Provenance | keeping each price tied to its contract and that contract's dates |
Study: Provenance — claim-source mappings through synthesis Provenance Field metadata
Understand Foundations Mock Exam 4 · Q756's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The prices differ because they apply to different periods, not because a source is wrong. Capturing effective dates and invoice dates lets the check compare with the contract in force. Tolerances, dropping old contracts or model guesses hide real issues or create new false alerts.
Connect the design to the situation
A March invoice at 14.20 is flagged against the April renewal price of 15.10.
Best answer: A. The two prices are not a contradiction; they apply to different periods. Recording effective dates and invoice dates lets the comparison use the contract in force, so temporal differences stop looking like conflicts. A wider tolerance hides real overcharges, keeping only the newest contract makes March invoices look wrong, and letting the model guess replaces a date rule with a judgment call.
The decisive evidence in the stem
the extraction records the price but not each contract's effective dates
Without dates, two valid prices from different periods look like a contradiction, which is what produces the false alerts.
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 meets the requirement
Capture each contract's effective dates and each invoice's date, so the check compares an invoice only with the contract in force.
Adds the dates that tell which price applied when, so valid differences stop raising alerts.
Contract records now include effective_from and effective_to, and invoices keep invoice_date. The check compares a 12 March invoice with the 14.20 contract and a 9 April invoice with the 15.10 contract. Alerts for this vendor drop to the two real overcharges.
B · Why this does not meet the full requirement
Keep only the most recent contract for each vendor, so the price check always compares invoices against a single, current price.
Compares older invoices with a price that did not apply to them, creating new false alerts.
Only the 15.10 contract remains, so March invoices at 14.20 now look like undercharges, and any invoice before a renewal triggers alerts. The false alerts move to a different month instead of disappearing.
C · Why this does not meet the full requirement
Raise the mismatch tolerance from 1% to 7%, so that small price differences between the two contracts no longer produce mismatch alerts.
Silences alerts by tolerance, which also lets real overcharges up to 7% pass unnoticed.
A 7% tolerance covers the 6.3% gap, so the alerts stop. But it also hides a vendor that adds 5% to every invoice. Real overcharges now pass the check, which defeats its purpose.
D · Why this does not meet the full requirement
Have the model decide which contract price is more plausible for each invoice, based on the overall pattern of that vendor's recent invoices.
Replaces a simple date rule with a model guess that can still pick the wrong contract.
The model guesses which price looks right from recent patterns. Around the renewal date it is often unsure, and its guesses are hard to audit. A deterministic date comparison is simpler and correct.
Check your understanding · explain the design in your own words
Two contracts with different prices for different periods trigger false mismatch alerts. 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: Provenance — claim-source mappings through synthesis
Study: Provenance — claim-source mappings through synthesis Provenance Field metadata
Return to Foundations Mock Exam 4 · Q756's situation and clause-by-clause explanation
Answer
**A.** The two prices are not a contradiction; they apply to different periods. Recording effective dates and invoice dates lets the comparison use the contract in force, so temporal differences stop looking like conflicts. A wider tolerance hides real overcharges, keeping only the newest contract makes March invoices look wrong, and letting the model guess replaces a date rule with a judgment call.D3 · Prompting & Structured Output
Q757. About 3% of extracted invoices fail the arithmetic validator: the line items sum to a different amount than the extracted total, usually because a discount line or a shipping charge was missed. On failure the pipeline currently resends the identical original request, which succeeds on fewer than a third of retries. How should the retry be redesigned? (Select ONE.) A) Send a follow-up with the original document, the failed extraction, and the specific error, such as 'line items sum 1,240.00 but total is 1,420.00'. B) Retry the identical request up to five times instead of once, keeping the first extraction whose line items sum exactly to the stated invoice total. C) Raise the temperature on retries so the model produces a noticeably different extraction each time, making it more likely that one attempt adds up. D) Send every invoice that fails the arithmetic check straight to the finance review team, without trying any automated retry at all.
Understand Foundations Mock Exam 4 · Q757 · the situation and each part of the question
The real situation behind this question
Ledgerline's validator checks that each invoice's line items add up to its total. A few percent do not, usually because the model skipped a discount or a shipping line. When that happens, the pipeline simply sends the same request again. The model, seeing exactly the same input, mostly makes the same mistake. The finance team of four ends up with the leftovers. The architect must make retries actually fix these errors.
Read the question in parts
Part 1 · usually because a discount line or a shipping charge was missed
the information is in the document, so a correction is possible if the model knows where to look.
Part 2 · succeeds on fewer than a third of retries
the current retry has low value because it gives the model nothing new.
What you are being asked to decide
Retries resend the same request and rarely fix the totals. What should a retry include? Tests retry-with-error-feedback that includes the document, the failed output and the specific error.
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 |
|---|---|
| Validation repair | a follow-up request that shows the model its failed extraction and the validator's error so it can correct it |
| Temperature | a sampling setting that changes randomness, not the model's knowledge of what went wrong |
Study: Validation, retry, and feedback loops: when a retry can fix it Validation repair Temperature
Understand Foundations Mock Exam 4 · Q757's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A blind resend gives the model no reason to do anything differently. Including the document, the failed extraction and the specific validation error lets it locate the missed line. More blind retries, higher temperature or sending all failures to humans skip the information that makes correction possible.
Connect the design to the situation
The model missed a 180.00 shipping line; the retry should say exactly which numbers disagree.
Best answer: A. Retry with error feedback gives the model what it needs to correct itself: the source, its own failed output, and exactly what is wrong. A blind resend repeats the same reasoning, which is why it rarely helps, and more blind retries or higher temperature only add randomness. Sending everything to humans wastes a fixable case on a four-person team.
The decisive evidence in the stem
resends the identical original request
The model receives no information about what went wrong, so it tends to repeat the same omission.
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 error, such as 'line items sum 1,240.00 but total is 1,420.00'.
Gives the model the source, its mistake and the exact discrepancy, so it can find the missed line.
The follow-up contains the PDF, the extracted JSON and: 'Validation error: line items sum 1,240.00; stated total 1,420.00; difference 180.00. Check for missed charges.' The model finds the shipping line it skipped and returns a corrected record that passes.
B · Why this does not meet the full requirement
Retry the identical request up to five times instead of once, keeping the first extraction whose line items sum exactly to the stated invoice total.
Repeats an uninformed request more times, adding cost while the cause stays hidden from the model.
Five identical requests produce five similar extractions. Some may differ by chance, but most repeat the same omission. Cost rises fivefold for these invoices, and many still end up with the review team.
C · Why this does not meet the full requirement
Raise the temperature on retries so the model produces a noticeably different extraction each time, making it more likely that one attempt adds up.
Adds randomness instead of information, so a correct sum becomes a matter of luck.
Higher temperature makes outputs vary more, which can add new mistakes in other fields. The model still does not know a shipping line was missed, so success depends on random variation.
D · Why this does not meet the full requirement
Send every invoice that fails the arithmetic check straight to the finance review team, without trying any automated retry at all.
Spends scarce reviewer time on errors the model can usually correct when shown the problem.
All 3% go to four reviewers, about 1,200 documents a month. Most have a simple, fixable omission, so staff spend their time on work the model could do, and real problem cases wait longer.
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.
Follow-up request with error feedback (illustrative)
<document>…original invoice…</document>
<previous_extraction>{"total": 1420.00, "line_items": [ … 4 items summing to 1240.00 … ]}</previous_extraction>
<validation_errors>
- Line items sum to 1240.00 but total is 1420.00 (difference 180.00).
</validation_errors>
Correct the extraction. Check for missed shipping, discount or tax lines.The retry carries new information: what failed and by how much.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Retries resend the same request and rarely fix the totals. What should a 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 Temperature
Return to Foundations Mock Exam 4 · Q757's situation and clause-by-clause explanation
Answer
**A.** Retry with error feedback gives the model what it needs to correct itself: the source, its own failed output, and exactly what is wrong. A blind resend repeats the same reasoning, which is why it rarely helps, and more blind retries or higher temperature only add randomness. Sending everything to humans wastes a fixable case on a four-person team.Q758. Some vendors send an invoice together with its delivery note in one PDF. In one bundle the invoice states 120 units and a total of 12,400.00, while the signed delivery note shows 115 units received. The pipeline currently keeps the invoice figures and ignores the delivery note, so the ERP pays for goods never received. How should the extraction handle this? (Select ONE.) A) Always trust the delivery note over the invoice, because it is signed at receipt, and adjust the extracted quantity and total to match the note. B) Average the two quantities and recompute the total from that average, so that the record reflects both documents in the bundle equally. C) Extract both values with their source and set conflict_detected true, so the record carries the disagreement to review instead of choosing one. D) Keep the invoice figures as today, but lower the confidence score on quantity fields whenever a delivery note is attached to an invoice.
Understand Foundations Mock Exam 4 · Q758 · the situation and each part of the question
The real situation behind this question
Some of Ledgerline's vendors attach the delivery note to the invoice. Usually they match. In this bundle they do not: the invoice bills for 120 units, but the warehouse signed for 115. The pipeline takes the invoice figures and ignores the note, so the customer pays for five units it never received. Sometimes, though, it is the delivery note that has a mistake. The architect must decide what the extracted record should say when its sources disagree.
Read the question in parts
Part 1 · the invoice states 120 units and a total of 12,400.00
one credible source gives one quantity and total, which a second document in the same bundle contradicts.
Part 2 · keeps the invoice figures and ignores the delivery note
the current design silently chooses one source, losing the evidence of a discrepancy.
What you are being asked to decide
The invoice says 120 units, the delivery note says 115. What should the extraction record? Tests annotating conflicting values with their sources instead of arbitrarily selecting one.
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 |
|---|---|
| Provenance | which document each value came from: quantity 120 from the invoice, 115 from the delivery note |
| conflict_detected | a boolean in the record that tells downstream steps the sources disagree |
Study: Provenance — claim-source mappings through synthesis Provenance HITL
Understand Foundations Mock Exam 4 · Q758's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Two credible documents disagree, and the current pipeline hides that by picking one. Extracting both values with their sources and flagging the conflict lets an informed decision resolve it. Trusting one source always, averaging or lowering confidence all lose or distort the evidence.
Connect the design to the situation
Paying for 120 units when only 115 arrived is a direct financial loss.
Best answer: C. When credible sources disagree, the extraction should keep both values with their attribution and flag the conflict, rather than silently choosing one. A human or a matching rule can then decide, for example by paying for 115 units and disputing 5. Always trusting one document is still an arbitrary pick, and averaging produces a number that no source supports.
The decisive evidence in the stem
the signed delivery note shows 115 units received
Two credible documents in the same bundle disagree, so the record must preserve both values and their sources instead of picking one.
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
Always trust the delivery note over the invoice, because it is signed at receipt, and adjust the extracted quantity and total to match the note.
Replaces one arbitrary choice with another, and hides cases where the note itself is wrong.
Most mismatches now resolve in favour of the delivery note. But when a warehouse clerk miscounts, the vendor is underpaid and disputes it. The rule is still a silent choice, and nobody sees that the documents disagreed.
B · Why this does not meet the full requirement
Average the two quantities and recompute the total from that average, so that the record reflects both documents in the bundle equally.
Invents a quantity that neither document states, which is worse than either source.
The record now says 117.5 units with a recomputed total. Neither document says that, the ERP cannot match it to any receipt, and both the vendor and the customer dispute it.
C · Why this meets the requirement
Extract both values with their source and set conflict_detected true, so the record carries the disagreement to review instead of choosing one.
Preserves both values and their sources, so the disagreement is resolved by an informed decision.
The record contains quantity_invoiced: 120 (invoice p.1), quantity_received: 115 (delivery note p.2), conflict_detected: true. The ERP's matching rule holds payment for the difference, and a reviewer sees both values and their pages.
D · Why this does not meet the full requirement
Keep the invoice figures as today, but lower the confidence score on quantity fields whenever a delivery note is attached to an invoice.
Keeps paying from the invoice figures and only hints that something might be off.
The ERP still pays for 120 units. A lower confidence might route some cases to review, but only if thresholds catch it, and the reviewer does not see that the note says 115.
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.
Conflict preserved in the record (illustrative)
{"quantity": {"values": [{"value": 120, "source": "invoice", "page": 1}, {"value": 115, "source": "delivery_note", "page": 2}], "conflict_detected": true}, "invoice_total": {"value": 12400.00, "source": "invoice", "page": 1}}Both values keep their source; the conflict flag drives routing.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The invoice says 120 units, the delivery note says 115. What should the extraction record?
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 HITL
Return to Foundations Mock Exam 4 · Q758's situation and clause-by-clause explanation
Answer
**C.** When credible sources disagree, the extraction should keep both values with their attribution and flag the conflict, rather than silently choosing one. A human or a matching rule can then decide, for example by paying for 115 units and disputing 5. Always trusting one document is still an arbitrary pick, and averaging produces a number that no source supports.D3 · Prompting & Structured Output
Q759. A new customer's contract requires every document to be posted to its ERP within 36 hours of receipt. Ledgerline wants to use the Message Batches API for this customer, whose batches can take up to 24 hours to complete, and validation plus ERP import takes up to 4 hours after results return. How often must the pipeline submit batches to meet the contract? (Select ONE.) A) Every 12 hours, which halves the waiting time compared with a daily batch while keeping the number of submissions low for the operations team. B) Submit each document as its own batch immediately on arrival, so the waiting time before submission is zero for every document received. C) At least every 8 hours, so a document waits at most 8 hours to be submitted, plus up to 24 hours of processing and 4 hours of import. D) Once a day at midnight, because a single daily batch is the simplest schedule and most batches finish well within their 24-hour processing window.
Understand Foundations Mock Exam 4 · Q759 · the situation and each part of the question
The real situation behind this question
Ledgerline signed a new customer that cares more about cost than speed, so batch processing makes sense. But the contract still promises posting within 36 hours of receipt. Batches can take up to a day, and the validator and import step can take four more hours. The operations team wants as few submissions as possible. The architect must find the longest safe interval between batch submissions, based on the worst case rather than a typical day.
Read the question in parts
Part 1 · can take up to 24 hours to complete
processing time has no guarantee below 24 hours, so the plan must assume the full window.
Part 2 · validation plus ERP import takes up to 4 hours
post-processing also uses part of the 36 hours and must be counted in the worst case.
What you are being asked to decide
With 24-hour batches and 4 hours of import, how often must you submit to post everything within 36 hours? 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 API | the Message Batches API, which processes requests asynchronously within up to 24 hours |
| SLA | the contract's promise that documents are posted within 36 hours of receipt |
Study: Message Batches API — the cost/latency lever (tested by contract) Batch API SLA design
Understand Foundations Mock Exam 4 · Q759's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The contract is a worst-case promise, so the plan must assume the full 24-hour batch window. Waiting time plus 24 hours of processing plus 4 hours of import must stay within 36 hours, which allows an interval of at most 8 hours. Longer intervals pass on typical days but break the guarantee.
Connect the design to the situation
A document arriving one minute after a submission must still be posted within 36 hours.
Best answer: C. The worst case is a document that arrives just after a submission: it waits one full interval, then up to 24 hours of batch processing, then up to 4 hours of import. That must fit in 36 hours, so the interval can be at most 8 hours. A 12-hour or daily schedule exceeds the limit in the worst case, and relying on typical completion times is not a guarantee.
The decisive evidence in the stem
within 36 hours of receipt
The contract is a worst-case limit, so the interval plus 24 hours of processing plus 4 hours of import must not exceed 36 hours.
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
Every 12 hours, which halves the waiting time compared with a daily batch while keeping the number of submissions low for the operations team.
Worst case is 12 + 24 + 4 = 40 hours, which still breaks the 36-hour contract.
A document just missing the noon submission waits 12 hours, then up to 24 hours of processing and 4 of import: 40 hours. Typical days pass, but the worst case breaks the contract by 4 hours.
B · Why this does not meet the full requirement
Submit each document as its own batch immediately on arrival, so the waiting time before submission is zero for every document received.
Meets the deadline, but tiny one-document batches add overhead without improving on an 8-hour schedule's guarantee.
Every document meets the deadline, but the pipeline now creates hundreds of single-request batches a day. That adds tracking and polling overhead, while an 8-hour schedule already guarantees the contract.
C · Why this meets the requirement
At least every 8 hours, so a document waits at most 8 hours to be submitted, plus up to 24 hours of processing and 4 hours of import.
Worst case is 8 + 24 + 4 = 36 hours, which meets the contract exactly.
Submitting at 00:00, 08:00 and 16:00 means no document waits more than 8 hours. Add the full 24-hour window and 4 hours of import, and the worst case is exactly 36 hours. Submitting more often adds margin.
D · Why this does not meet the full requirement
Once a day at midnight, because a single daily batch is the simplest schedule and most batches finish well within their 24-hour processing window.
Worst case is 24 + 24 + 4 = 52 hours, far beyond the 36-hour contract.
A document arriving at 00:01 waits until the next midnight, almost 24 hours. Then the batch may take 24 hours and import 4 more: about 52 hours. Most days may be faster, but the contract is broken whenever a batch runs long.
Check your understanding · explain the design in your own words
With 24-hour batches and 4 hours of import, how often must you submit to post everything within 36 hours?
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 (tested by contract)
Study: Message Batches API — the cost/latency lever (tested by contract) Batch API SLA design
Return to Foundations Mock Exam 4 · Q759's situation and clause-by-clause explanation
Answer
**C.** The worst case is a document that arrives just after a submission: it waits one full interval, then up to 24 hours of batch processing, then up to 4 hours of import. That must fit in 36 hours, so the interval can be at most 8 hours. A 12-hour or daily schedule exceeds the limit in the worst case, and relying on typical completion times is not a guarantee.Q760. To reconcile a vendor's monthly statement, one request combines 60 per-invoice extraction summaries in date order and asks Claude to list every discrepancy. QA finds that discrepancies in invoices near the middle of the list are often left out of the answer, while those in the first and last invoices are almost always reported. What change most directly addresses this? (Select ONE.) A) Ask Claude at the end of the prompt to read every invoice summary carefully, especially the ones in the middle of the provided list. B) Send the 60 summaries in random order each time, so that no invoice stays in the middle position across repeated reconciliation runs. C) Move the reconciliation to a model with a larger context window so that all 60 summaries fit comfortably with plenty of room to spare. D) Put a short list of all detected discrepancies at the start of the input, and give each invoice summary its own explicit section header.
Understand Foundations Mock Exam 4 · Q760 · the situation and each part of the question
The real situation behind this question
At month end, Ledgerline reconciles each vendor's statement against the invoices it extracted. For a big vendor that means sixty invoice summaries in one request. QA noticed a pattern: problems in the first and last few invoices are always reported, but problems in the middle often vanish. A missed discrepancy can mean overpaying a vendor. The architect must restructure the input so that position in the list no longer decides what gets noticed.
Read the question in parts
Part 1 · combines 60 per-invoice extraction summaries in date order
the input is long and uniform, so items in the middle have no structure that makes them stand out.
Part 2 · those in the first and last invoices are almost always reported
the omissions depend on position, pointing to a position effect rather than missing data.
What you are being asked to decide
Discrepancies in the middle of 60 summaries get missed. How do you structure the input? Tests mitigating position effects with key findings first and explicit 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 miss details from the middle of a long input such as these 60 summaries |
| Section header | a clear label such as <invoice id='INV-55120'> around each summary so it stands as its own unit |
Study: Lost in the middle — position effects Long-context placement XML tags
Understand Foundations Mock Exam 4 · Q760's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The misses follow position, which is the lost-in-the-middle effect. Putting a list of key findings at the start and giving each invoice its own header makes every item visible regardless of position. Shuffling, a larger window or a reminder leave the long, flat structure in place.
Connect the design to the situation
Invoice 31 of 60 has a wrong tax amount that never appears in the reconciliation result.
Best answer: D. Models attend most reliably to the beginning and end of long inputs and may miss material in the middle. Placing a summary of key findings at the start, and organizing the details under explicit section headers, counters this position effect directly. A larger window does not change attention patterns, random order only moves which items are missed, and a reminder does not change how the input is structured.
The decisive evidence in the stem
discrepancies in invoices near the middle of the list are often left out
The omissions follow position in the input, the signature of the lost-in-the-middle effect, which input structure 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 Claude at the end of the prompt to read every invoice summary carefully, especially the ones in the middle of the provided list.
Adds a reminder but leaves the input's structure, and its position effect, unchanged.
The reminder helps a little, but the sixty summaries still form one long undifferentiated block. Claude still struggles to give middle items equal attention, and the QA pattern continues.
B · Why this does not meet the full requirement
Send the 60 summaries in random order each time, so that no invoice stays in the middle position across repeated reconciliation runs.
Changes which invoices are in the middle each run, so different discrepancies are missed instead.
Each run now misses a different set of middle invoices. Over several months the losses spread out, but every single reconciliation still drops some discrepancies, and results become harder to reproduce.
C · Why this does not meet the full requirement
Move the reconciliation to a model with a larger context window so that all 60 summaries fit comfortably with plenty of room to spare.
Adds unused space without changing how attention spreads across a long input.
Sixty summaries already fit, so a larger window only adds empty space. The attention pattern over a long input stays the same, and middle discrepancies are still dropped.
D · Why this meets the requirement
Put a short list of all detected discrepancies at the start of the input, and give each invoice summary its own explicit section header.
Puts the key findings where attention is strongest and makes every invoice easy to locate.
The request starts with 'Detected discrepancies: INV-55120 tax 18.00 vs 21.60; INV-55188 missing credit…' and then lists each invoice under its own <invoice> header. The model confirms each listed item and checks the rest by section, so middle invoices are no longer lost.
Check your understanding · explain the design in your own words
Discrepancies in the middle of 60 summaries get missed. How do you structure 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
Return to Foundations Mock Exam 4 · Q760's situation and clause-by-clause explanation
Answer
**D.** Models attend most reliably to the beginning and end of long inputs and may miss material in the middle. Placing a summary of key findings at the start, and organizing the details under explicit section headers, counters this position effect directly. A larger window does not change attention patterns, random order only moves which items are missed, and a reminder does not change how the input is structured.D3 · Prompting & Structured Output
Q761. A month-end batch of 50,000 extraction requests completes with 48,900 successes and 1,100 errors. All 1,100 failed requests are long multi-page vendor statements that exceeded the context limit. Each request has a custom_id built from the document ID. What is the most efficient way to finish the job? (Select ONE.) A) Resubmit the entire 50,000-request batch with a larger max_tokens setting, so the failed statements get another chance with more room. B) Use custom_id to find the 1,100 failed statements, split each into page-range chunks, and resubmit only those chunks. C) Move the whole month-end job to synchronous API calls next month, so failures are detected immediately and retried one document at a time. D) Resubmit the 1,100 failed requests unchanged in a new batch, since batch errors are often temporary and may succeed on a second attempt.
Understand Foundations Mock Exam 4 · Q761 · the situation and each part of the question
The real situation behind this question
Ledgerline's month-end batch finished overnight. Almost everything succeeded, but 1,100 requests failed, all of them very long vendor statements that did not fit in the model's context. The close deadline is two days away. The team wants those documents processed without paying again for the ones that already worked, and without failing again for the same reason. The architect must plan the recovery.
Read the question in parts
Part 1 · All 1,100 failed requests are long multi-page vendor statements
the failures share one structural cause, so one targeted change can fix all of them.
Part 2 · Each request has a custom_id built from the document ID
failed results can be mapped back to their documents, so only those need resubmitting.
What you are being asked to decide
1,100 of 50,000 batch requests failed because the documents were too long. How do you finish efficiently? Tests resubmitting only failed batch items by custom_id, with the modification their failure requires.
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 ID on each batch request, here the document ID, used to match results to documents |
| Chunking | splitting a long statement into page ranges that each fit within the context limit |
Study: Message Batches API — the cost/latency lever (tested by contract) Batch API Chunking strategy max_tokens
Understand Foundations Mock Exam 4 · Q761's answer · full reasoning and worked examples
Claude synthesized · the point, straight
custom_id lets you resubmit only the failed requests, and their shared cause, oversized inputs, tells you what to change. Chunking those statements and resubmitting just them finishes the job at minimum cost. Full resubmission, unchanged retries or switching APIs either waste work or repeat the error.
Connect the design to the situation
A 90-page vendor statement fails; it must be split before it is sent again.
Best answer: B. custom_id lets you match each result to its request, so you can resubmit exactly the failed items. Because these failed for a structural reason (too long for the context), they must be changed, here by chunking, before resubmission. Resubmitting everything wastes 48,900 good results, resending unchanged repeats the same error, and max_tokens limits output length, not input size.
The decisive evidence in the stem
exceeded the context limit
The failure cause is input size, so the same requests will fail again unless they are modified, for example by chunking.
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 entire 50,000-request batch with a larger max_tokens setting, so the failed statements get another chance with more room.
Repeats 48,900 successful requests, and max_tokens does not raise the input limit that caused the errors.
50,000 requests run again, including 48,900 that already have good results. max_tokens controls how long the output may be, not how much input fits, so the 1,100 statements fail again, and the month's cost nearly doubles.
B · Why this meets the requirement
Use custom_id to find the 1,100 failed statements, split each into page-range chunks, and resubmit only those chunks.
Targets only the failures and changes them so they fit, which fixes the cause at minimum cost.
The pipeline reads the error results, collects their custom_id values, splits each statement into 20-page chunks with IDs like doc-77120-p1-20, and submits only those. Results are merged per document afterwards. The good 48,900 are untouched.
C · Why this does not meet the full requirement
Move the whole month-end job to synchronous API calls next month, so failures are detected immediately and retried one document at a time.
Changes the whole job's API for a problem that affects 2% of documents and is about size, not timing.
Synchronous calls would find the size error at once, but the documents are still too long and still fail. The rest of the job loses the batch discount for no gain, and this month's 1,100 still need chunking.
D · Why this does not meet the full requirement
Resubmit the 1,100 failed requests unchanged in a new batch, since batch errors are often temporary and may succeed on a second attempt.
Sends the same oversized inputs again, so the same 1,100 requests fail the same way.
The new batch contains the same 1,100 oversized statements and returns 1,100 errors for the same reason. A day is lost against the close deadline, and the team is back where it started.
Check your understanding · explain the design in your own words
1,100 of 50,000 batch requests failed because the documents were too long. How do you finish efficiently?
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 (tested by contract)
Study: Message Batches API — the cost/latency lever (tested by contract) Batch API Chunking strategy max_tokens
Return to Foundations Mock Exam 4 · Q761's situation and clause-by-clause explanation
Answer
**B.** custom_id lets you match each result to its request, so you can resubmit exactly the failed items. Because these failed for a structural reason (too long for the context), they must be changed, here by chunking, before resubmission. Resubmitting everything wastes 48,900 good results, resending unchanged repeats the same error, and max_tokens limits output length, not input size.D3 · Prompting & Structured Output
Q762. invoice_total is null in 9% of extractions from Nordic and German vendors. Their layouts put the total in a boxed summary labelled 'Zu zahlen', 'Att betala' or 'Amount due' in the footer, while the instructions describe 'the line labelled Total'. The values are clearly present on the page. What change would most reduce these empty totals? (Select ONE.) A) Route every Nordic and German invoice to the finance review team, since their layouts are too different for the model to handle automatically. B) Make invoice_total a required, non-nullable number, so the model must always provide a value for the total and can no longer return null. C) Add a few examples showing correct extraction from varied layouts, including a footer summary box with a non-English label mapped to invoice_total. D) Retry every null-total extraction with the instruction 'look harder for the total' appended to the end of the original extraction request.
Understand Foundations Mock Exam 4 · Q762 · the situation and each part of the question
The real situation behind this question
Ledgerline's instructions were written with American invoices in mind: find the line labelled Total. Many German and Nordic vendors design invoices differently. They put the amount to pay in a box in the footer, labelled in their own language. The model, looking for 'Total', often returns nothing, even though the number is right there. The architect must help the model recognize these layouts without encouraging it to guess.
Read the question in parts
Part 1 · while the instructions describe 'the line labelled Total'
the prompt describes one layout, so documents with another layout fall outside it.
Part 2 · in 9% of extractions from Nordic and German vendors
the failures cluster in a recognizable family of layouts that examples can represent.
What you are being asked to decide
Totals in a footer box with a foreign label come back empty. How do you teach the model to find them? Tests few-shot examples of varied document formats to fix empty extraction of present fields.
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 | a few example documents and their correct extractions placed in the extraction prompt |
| Null | the model's honest 'not found' for invoice_total, which here hides a value that is present |
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Missing values in schemas
Understand Foundations Mock Exam 4 · Q762's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The totals are present but presented in a layout the instructions never describe. Few-shot examples of varied layouts teach the model where such values appear, so it extracts them. A non-nullable field invites fabrication, and vague retries or routing do not teach recognition.
Connect the design to the situation
'Att betala: 48 250,00 SEK' in a footer box is not read as the invoice total.
Best answer: C. The totals are present, but the model does not recognize them because they do not match the described layout. Few-shot examples of varied document structures show it where and how such values appear, which reduces empty extractions of required information. Making the field non-nullable would push the model to fabricate when it is unsure, and a vague retry or blanket routing does not teach the pattern.
The decisive evidence in the stem
The values are clearly present on the page
The information exists, so the problem is recognition of an unfamiliar layout, which examples can teach, not absence of data.
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
Route every Nordic and German invoice to the finance review team, since their layouts are too different for the model to handle automatically.
Sends thousands of solvable documents to four reviewers instead of fixing recognition.
Thousands of invoices a month go to four reviewers, who type in totals the model could have read. The team's capacity disappears into a recognition problem that a prompt change could solve.
B · Why this does not meet the full requirement
Make invoice_total a required, non-nullable number, so the model must always provide a value for the total and can no longer return null.
Forces a value when the model is unsure, inviting fabricated totals instead of teaching recognition.
The model can no longer return null. For layouts it does not understand, it now picks some number on the page, perhaps a subtotal or a VAT amount. Empty totals become wrong totals, which are harder to catch than nulls.
C · Why this meets the requirement
Add a few examples showing correct extraction from varied layouts, including a footer summary box with a non-English label mapped to invoice_total.
Shows the model how totals appear in these layouts, so it recognizes them in new documents.
The prompt gains three short examples: a German invoice with 'Zu zahlen' in a footer box, a Swedish one with 'Att betala', and a US invoice with 'Total'. Each shows the extracted invoice_total. The model learns the pattern 'amount payable in a summary box' and generalizes.
D · Why this does not meet the full requirement
Retry every null-total extraction with the instruction 'look harder for the total' appended to the end of the original extraction request.
Repeats the same instructions with vague pressure, without showing what to look for.
'Look harder' adds no information about where the total is. Some retries succeed by chance, but many return null again, and each costs a request. The model still has no picture of the layout.
Check your understanding · explain the design in your own words
Totals in a footer box with a foreign label come back empty. How do you teach the model to find 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: Few-shot examples for ambiguous cases and varied documents
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Missing values in schemas
Return to Foundations Mock Exam 4 · Q762's situation and clause-by-clause explanation
Answer
**C.** The totals are present, but the model does not recognize them because they do not match the described layout. Few-shot examples of varied document structures show it where and how such values appear, which reduces empty extractions of required information. Making the field non-nullable would push the model to fabricate when it is unsure, and a vague retry or blanket routing does not teach the pattern.Q763. The extraction tool now returns a confidence value from 0 to 1 for each field. The team proposes posting any field with confidence of 0.9 or more directly to the ERP. A spot check finds that IBAN fields reported at 0.95 are wrong about one time in twelve, while date fields at 0.9 are almost always right. How should the review threshold be set? (Select ONE.) A) Ignore the confidence values and send every field of every document to human review until the model's confidence scores improve over time. B) Ask the model to be more careful and more conservative when it reports confidence, then keep the single 0.9 threshold for all fields. C) Calibrate a threshold per field against a labeled validation set, choosing for each field the confidence level that meets its accuracy target. D) Use 0.9 for every field as proposed, since the model reports high confidence for most fields and a single threshold is easier to operate.
Understand Foundations Mock Exam 4 · Q763 · the situation and each part of the question
The real situation behind this question
Ledgerline's extraction now includes a confidence number for every field. The team wants a simple rule: above 0.9, post automatically. A quick check shows a problem. Bank account numbers reported at 0.95 are wrong about one time in twelve, which could send payments to the wrong account. Dates at 0.9 are nearly perfect. The same number means different things for different fields. The architect must turn these numbers into safe routing rules.
Read the question in parts
Part 1 · posting any field with confidence of 0.9 or more directly to the ERP
the proposal treats raw model confidence as calibrated, which the spot check disproves.
Part 2 · date fields at 0.9 are almost always right
different fields have different confidence-to-accuracy relations, so one threshold cannot fit all.
What you are being asked to decide
Confidence 0.95 means different things for different fields. How do you set review thresholds? Tests calibrating field-level confidence thresholds with a labeled validation set.
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 |
|---|---|
| Calibration | checking how often fields at each confidence level are actually right, and setting thresholds from that |
| Labeled validation set | documents with human-verified field values used to measure real accuracy at each confidence |
Study: Confidence calibration & stratified sampling (human-review routing) Calibration Golden set
Understand Foundations Mock Exam 4 · Q763's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Raw confidence numbers mean different real accuracy for different fields. Calibrating each field's threshold against a labeled validation set turns confidence into a reliable routing signal. A single threshold, a prompt request or reviewing everything all skip that measurement.
Connect the design to the situation
An IBAN at 0.95 is wrong 1 in 12 times; a date at 0.9 is almost never wrong.
Best answer: C. Raw model confidence is not automatically calibrated: here 0.95 means different accuracy for IBANs than 0.9 does for dates. Calibrating thresholds per field against labeled data turns confidence into a reliable routing signal. One shared threshold treats unequal fields as equal, asking the model to be careful does not calibrate anything, and reviewing everything ignores a signal that can be made useful.
The decisive evidence in the stem
IBAN fields reported at 0.95 are wrong about one time in twelve
The same confidence number corresponds to different real accuracy per field, so thresholds must be set from labeled data, field by field.
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
Ignore the confidence values and send every field of every document to human review until the model's confidence scores improve over time.
Keeps the workload at maximum and wastes a signal that calibration can make useful.
Every field of all 40,000 documents goes to four reviewers. That is impossible to sustain, and the confidence values, which could safely remove most date and vendor-name reviews, are thrown away.
B · Why this does not meet the full requirement
Ask the model to be more careful and more conservative when it reports confidence, then keep the single 0.9 threshold for all fields.
Asks for different wording of a number that still has not been checked against real outcomes.
The model may lower some scores after the instruction, but nobody has measured whether the new numbers match reality. A prompt cannot calibrate confidence; only comparison with known correct answers can.
C · Why this meets the requirement
Calibrate a threshold per field against a labeled validation set, choosing for each field the confidence level that meets its accuracy target.
Sets each field's threshold from measured accuracy, so confidence becomes a trustworthy signal.
The team labels 1,500 documents and plots accuracy against confidence per field. IBANs need 0.99 to reach the 99.5% target; dates reach it at 0.85. Each field gets its own threshold, and the calibration is rechecked monthly with stratified sampling.
D · Why this does not meet the full requirement
Use 0.9 for every field as proposed, since the model reports high confidence for most fields and a single threshold is easier to operate.
Posts many wrong IBANs automatically, because 0.9 does not mean the same accuracy for every field.
Most IBANs score above 0.9 and post directly. About 8% of them are wrong, so a share of payments a month go to incorrect accounts. Dates would have been safe at an even lower threshold, so review effort is also spent in the wrong places.
Check your understanding · explain the design in your own words
Confidence 0.95 means different things for different fields. How do you set review thresholds?
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) Calibration Golden set
Return to Foundations Mock Exam 4 · Q763's situation and clause-by-clause explanation
Answer
**C.** Raw model confidence is not automatically calibrated: here 0.95 means different accuracy for IBANs than 0.9 does for dates. Calibrating thresholds per field against labeled data turns confidence into a reliable routing signal. One shared threshold treats unequal fields as equal, asking the model to be careful does not calibrate anything, and reviewing everything ignores a signal that can be made useful.Q764. Leadership cites 97% field accuracy, measured on a random sample of 2,000 documents, and proposes ending human review for all high-confidence extractions. Phone-scanned credit notes are 4% of volume. Nobody has broken the accuracy figure down by document type or by field. What should happen before human review is reduced? (Select ONE.) A) End review for high-confidence extractions now, since 97% on a 2,000-document random sample is strong evidence that the system is reliable everywhere. B) Repeat the same random sample with 4,000 documents instead of 2,000, so the overall accuracy figure becomes more precise before deciding. C) Raise the confidence threshold for automatic posting from 0.90 to 0.97, so that only the extractions the model is most certain about skip human review. D) Measure accuracy by document type and field on a labeled sample large enough per segment, and reduce review only where each segment meets the target.
Understand Foundations Mock Exam 4 · Q764 · the situation and each part of the question
The real situation behind this question
Ledgerline's leadership sees a 97% accuracy figure and wants to cut costs by trusting confident extractions. The figure came from a random sample, so most of it reflects ordinary PDF invoices, which are the bulk of the volume. Phone photos of credit notes are rare, only one document in 25, and no one knows how well the model handles them. A mistake on a credit note means paying a vendor twice. The architect must decide what evidence is needed first.
Read the question in parts
Part 1 · measured on a random sample of 2,000 documents
a simple random sample contains only about 80 credit notes, too few to measure that segment well.
Part 2 · Phone-scanned credit notes are 4% of volume
a small but risky segment exists whose accuracy the aggregate figure barely reflects.
What you are being asked to decide
Overall accuracy is 97%, but nobody checked per document type. What do you do before cutting review? Tests validating accuracy by document type and field before reducing human 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 |
|---|---|
| Stratified sampling | sampling enough documents from each segment, such as phone-scanned credit notes, to measure each one |
| Aggregate metric | the single 97% figure across all documents and fields, dominated by the largest segments |
Study: Confidence calibration & stratified sampling (human-review routing) Stratified sampling Evaluation metrics
Understand Foundations Mock Exam 4 · Q764's answer · full reasoning and worked examples
Claude synthesized · the point, straight
An overall 97% is dominated by the largest document types and can hide weak small segments. Accuracy must be measured per document type and field, with enough samples in each, before review is reduced. A bigger random sample or a higher threshold does not show how the weak segments perform.
Connect the design to the situation
Credit-note tax fields could be at 80% while the overall figure stays at 97%.
Best answer: D. An aggregate accuracy figure can hide poor performance on small segments, such as phone-scanned credit notes at 4% of volume, or on specific fields. Accuracy must be validated per document type and field before automating. A bigger overall sample still mostly measures the large segments, and a higher threshold relies on model confidence that has not been checked by segment.
The decisive evidence in the stem
Nobody has broken the accuracy figure down by document type or by field
The 97% is an aggregate that could mask a weak segment, so per-segment validation must come before any automation decision.
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
End review for high-confidence extractions now, since 97% on a 2,000-document random sample is strong evidence that the system is reliable everywhere.
Trusts an aggregate that may hide a weak segment, and removes the review that would catch it.
Review stops for most documents. If phone-scanned credit notes are at 80% on the tax field, hundreds of wrong credits a month reach the ERP with nobody checking. The 97% stays true and the losses still happen.
B · Why this does not meet the full requirement
Repeat the same random sample with 4,000 documents instead of 2,000, so the overall accuracy figure becomes more precise before deciding.
Makes the overall number more precise while still saying little about small segments.
4,000 random documents still include only about 160 credit notes, mostly not phone scans. The overall figure moves from 97% to perhaps 96.8%, and the weak segment is still invisible.
C · Why this does not meet the full requirement
Raise the confidence threshold for automatic posting from 0.90 to 0.97, so that only the extractions the model is most certain about skip human review.
Moves a threshold on confidence that has not been validated for each segment.
Only extractions with confidence above 0.97 skip review. But the model may be confident and wrong on credit-note scans, and nobody has measured that. The threshold changes the volume without proving safety for any segment.
D · Why this meets the requirement
Measure accuracy by document type and field on a labeled sample large enough per segment, and reduce review only where each segment meets the target.
Checks each document type and field, so automation happens only where it is proven safe.
The team labels a sample with at least a few hundred documents per type, including phone-scanned credit notes, and measures each field. Invoices meet the target and their review is reduced; credit-note tax fields at 86% keep human review.
Check your understanding · explain the design in your own words
Overall accuracy is 97%, but nobody checked per document type. What do you do before cutting 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: Confidence calibration & stratified sampling (human-review routing)
Study: Confidence calibration & stratified sampling (human-review routing) Stratified sampling Evaluation metrics
Return to Foundations Mock Exam 4 · Q764's situation and clause-by-clause explanation
Answer
**D.** An aggregate accuracy figure can hide poor performance on small segments, such as phone-scanned credit notes at 4% of volume, or on specific fields. Accuracy must be validated per document type and field before automating. A bigger overall sample still mostly measures the large segments, and a higher threshold relies on model confidence that has not been checked by segment.D3 · Prompting & Structured Output
Q765. Records from one large vendor keep failing validation on payment_terms. The invoices say only 'Terms per Master Supply Agreement MSA-2291', and that agreement is never sent to the pipeline. Each failure is retried three times with the validation error included, and all three retries fail. What should the pipeline do for these documents? (Select ONE.) A) Let the model infer the most likely payment terms from the vendor's industry and the invoice amount, and mark the field as estimated. B) Increase the retries to six and add a stronger instruction to read the invoice more carefully for the payment terms on each new attempt. C) Remove payment_terms from the schema for this vendor only, so that its records stop failing validation on that field altogether. D) Stop retrying for this cause: return payment_terms as null with a reason, and route it for lookup or add MSA-2291 as input.
Understand Foundations Mock Exam 4 · Q765 · the situation and each part of the question
The real situation behind this question
One of Ledgerline's biggest vendors never prints payment terms on its invoices. It writes only that terms follow a master agreement, and that agreement lives in the customer's contract system, not in the extraction pipeline. Every one of these invoices fails validation, gets retried three times, and fails again. The cost adds up, and the records still need a person. The architect must decide how the pipeline should handle information that simply is not there.
Read the question in parts
Part 1 · 'Terms per Master Supply Agreement MSA-2291'
the invoice points to an external document, so the value genuinely lives elsewhere.
Part 2 · all three retries fail
even feedback-guided retries cannot help, which is the signal that the problem is absent information.
What you are being asked to decide
The payment terms are in another document the pipeline never gets. Should it keep retrying? Tests recognizing when retries cannot succeed because the 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 |
|---|---|
| Missing value | payment_terms recorded as null with a reason, because no input contains the terms |
| Retrieval | supplying MSA-2291 itself as an additional input so the terms can actually be read |
Study: Validation, retry, and feedback loops: when a retry can fix it Missing values in schemas Hallucination vs retrieval
Understand Foundations Mock Exam 4 · Q765's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Retries can fix format and structure, but they cannot supply information that no input contains. When the terms live only in an agreement the pipeline never receives, the record should carry an honest null and be routed, or the agreement should be added as input. More retries, guessing or deleting the field all avoid the real gap.
Connect the design to the situation
'Terms per MSA-2291' and no MSA anywhere in the request — three retries all fail.
Best answer: D. Retries help with format and structural errors, but they cannot create information that is not in the input. The terms exist only in an agreement the pipeline never receives, so every retry is wasted. The right design records the absence honestly and either routes for lookup or adds the missing source. Inferring terms invents financial data.
The decisive evidence in the stem
that agreement is never sent to the pipeline
The required value is absent from every input the model sees, so no amount of retrying or feedback can produce it.
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
Let the model infer the most likely payment terms from the vendor's industry and the invoice amount, and mark the field as estimated.
Invents financial terms, which could make the ERP schedule payments on wrong dates.
The model guesses 'Net 30' because that is common. If the real terms are Net 60 with an early-payment discount, the ERP pays early or misses the discount. Marking it 'estimated' does not stop a downstream system from acting on it.
B · Why this does not meet the full requirement
Increase the retries to six and add a stronger instruction to read the invoice more carefully for the payment terms on each new attempt.
Spends more on retries that cannot succeed, because the terms are not in anything the model sees.
Six retries with stronger wording cost twice as much and fail the same way, because the invoice really contains no terms. The model may eventually invent something just to satisfy the instruction, which is worse than failing.
C · Why this does not meet the full requirement
Remove payment_terms from the schema for this vendor only, so that its records stop failing validation on that field altogether.
Hides a real data gap by deleting the field, so the ERP gets records with no terms at all.
The validator stops failing, but the ERP now imports this vendor's invoices without payment terms. Someone must still find the terms later, and the gap is now hidden instead of flagged.
D · Why this meets the requirement
Stop retrying for this cause: return payment_terms as null with a reason, and route it for lookup or add MSA-2291 as input.
Recognizes the absence, records it honestly, and fixes it by lookup or by providing the source.
The pipeline detects a reference to an external agreement and returns payment_terms: null with terms_source: 'MSA-2291 (not provided)'. It routes the record for a terms lookup, or the team adds the MSA to the request as a second document so the terms can be read.
Check your understanding · explain the design in your own words
The payment terms are in another document the pipeline never gets. Should it keep retrying?
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 Missing values in schemas Hallucination vs retrieval
Return to Foundations Mock Exam 4 · Q765's situation and clause-by-clause explanation
Answer
**D.** Retries help with format and structural errors, but they cannot create information that is not in the input. The terms exist only in an agreement the pipeline never receives, so every retry is wasted. The right design records the absence honestly and either routes for lookup or adds the missing source. Inferring terms invents financial data.D3 · Prompting & Structured Output
Q766. The invoice_date field is a string in the extraction schema. Vendors print dates as '03/04/26', '4 Mar 2026', '2026.03.04' and 'March 4th', and the model usually copies the source format, so the ERP's date parser rejects about 6% of records. US vendors write month first; most EU vendors write day first. What change addresses this most directly? (Select ONE.) A) Ask vendors to print ISO 8601 dates on their invoices from next quarter, and send nonconforming documents back to them for correction. B) Change invoice_date to an object with separate day, month and year integer fields, so the model can no longer copy the source date format. C) Add prompt rules: output YYYY-MM-DD, and read ambiguous numeric dates by the vendor's country, alongside the schema's date format. D) Add a regular-expression check after extraction that rejects any non-ISO date and retries the request until the model returns an ISO 8601 date.
Understand Foundations Mock Exam 4 · Q766 · the situation and each part of the question
The real situation behind this question
Ledgerline's vendors print dates in every style imaginable. The extraction schema just says invoice_date is a string, so the model copies what it sees. The ERP expects one format and rejects the rest. Worse, a date like 03/04/26 means 3 April to a German vendor and 4 March to an American one, so even a correct-looking format can be wrong. The architect must make dates consistent and correctly interpreted.
Read the question in parts
Part 1 · The invoice_date field is a string in the extraction schema
the schema accepts any text, so it does not by itself guide the output format.
Part 2 · US vendors write month first; most EU vendors write day first
some dates are ambiguous without a rule, so the fix must include how to resolve them.
What you are being asked to decide
Dates come out in each vendor's format and the ERP rejects them. How do you get one consistent format? Tests adding format normalization rules in the prompt alongside a strict output schema.
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 |
|---|---|
| Normalization rule | an instruction such as 'output dates as YYYY-MM-DD; read 03/04/26 by the vendor's country' |
| JSON Schema | the extraction tool's input_schema, which can describe the field's format but not how to convert sources |
Study: Structured output — the engineering ladder JSON Schema Prompt versus schema
Understand Foundations Mock Exam 4 · Q766's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The schema says what shape the output should have, but not how to convert messy source formats. Normalization rules in the prompt, alongside the schema, tell the model how to convert and how to resolve ambiguous dates. Retries, vendor requests or a reshaped field leave the conversion rule missing.
Connect the design to the situation
'03/04/26' from a German vendor must become 2026-04-03, not 2026-03-04.
Best answer: C. A schema can say a field is a string or even a date, but the model still needs rules for converting messy source formats, including how to read ambiguous day-month order. Normalization rules in the prompt alongside the strict schema handle that directly. Validate-and-retry catches the failures afterwards at extra cost, and splitting the field still leaves the day-month ambiguity unresolved.
The decisive evidence in the stem
the model usually copies the source format
Nothing tells the model how to convert dates, so it reproduces whatever each vendor printed; it needs explicit normalization rules.
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
Ask vendors to print ISO 8601 dates on their invoices from next quarter, and send nonconforming documents back to them for correction.
Depends on dozens of outside vendors changing their documents, which Ledgerline cannot control.
A few large vendors might comply, but most will not change their invoice software for one customer. Returning their documents delays payment and annoys suppliers, while the pipeline still faces the same formats.
B · Why this does not meet the full requirement
Change invoice_date to an object with separate day, month and year integer fields, so the model can no longer copy the source date format.
Changes the shape of the field but leaves the model guessing which number is the day.
Separate integers stop format copying, but '03/04/26' still needs a rule for which number is the day. The model guesses, and dates become structurally clean but sometimes wrong, which is harder to detect.
C · Why this meets the requirement
Add prompt rules: output YYYY-MM-DD, and read ambiguous numeric dates by the vendor's country, alongside the schema's date format.
Tells the model exactly how to convert each format, including ambiguous ones, at extraction time.
The prompt says: 'Write all dates as YYYY-MM-DD. For numeric dates, use the vendor's country: day-first for EU, month-first for US. If still unclear, return null and set date_ambiguous true.' The schema describes the field as an ISO date. Rejections drop sharply.
D · Why this does not meet the full requirement
Add a regular-expression check after extraction that rejects any non-ISO date and retries the request until the model returns an ISO 8601 date.
Catches wrong formats after the fact and pays for retries, without telling the model the conversion rule.
The check rejects '4 Mar 2026' and the pipeline retries. Many retries succeed, but each costs a request, and '03/04/26' may come back as a confident but wrongly ordered ISO date that passes the check.
Check your understanding · explain the design in your own words
Dates come out in each vendor's format and the ERP rejects them. How do you get one consistent format?
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 JSON Schema Prompt versus schema
Return to Foundations Mock Exam 4 · Q766's situation and clause-by-clause explanation
Answer
**C.** A schema can say a field is a string or even a date, but the model still needs rules for converting messy source formats, including how to read ambiguous day-month order. Normalization rules in the prompt alongside the strict schema handle that directly. Validate-and-retry catches the failures afterwards at extra cost, and splitting the field still leaves the day-month ambiguity unresolved.Q767. The month-end reconciliation runs as an Agent SDK coordinator with eight worker subagents, each assigned a set of vendors. On day 4 the host crashed after about 7,400 of 12,000 documents were reconciled. The coordinator had no record of which vendors were done, so the whole run restarted and nearly missed the day-5 posting deadline. What design prevents this? (Select ONE.) A) Run the reconciliation on a more reliable host with more memory, so that crashes during the month-end run become much less likely in future months. B) Have each worker export its state (vendors done, partial results, open issues) to a known location, and the coordinator load that manifest on resume. C) Keep all progress in the coordinator's conversation context, and resume the coordinator's session after a crash so it remembers which vendors were finished. D) Split the month-end run into eight separate pipelines, one per worker, so a crash affects only the vendors assigned to the pipeline that failed.
Understand Foundations Mock Exam 4 · Q767 · the situation and each part of the question
The real situation behind this question
Ledgerline's month-end reconciliation is a long multi-agent run. Eight workers each reconcile a set of vendors, and the coordinator combines the results. This month the host crashed after more than half the documents were done. Nothing on disk recorded which vendors were finished, so everything had to run again. The team posted on time, but only just. The architect must make sure a crash costs minutes, not a day.
Read the question in parts
Part 1 · after about 7,400 of 12,000 documents were reconciled
most of the work was done, so losing it was costly and avoidable.
Part 2 · nearly missed the day-5 posting deadline
recovery time matters, so the design must let the run continue rather than restart.
What you are being asked to decide
A crash at 7,400 of 12,000 documents forced a full restart. How do you make the run resumable? Tests crash recovery using structured state exports that the coordinator loads as a manifest on resume.
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 |
|---|---|
| Checkpoint | a saved record of each worker's progress, written while the run is going |
| Manifest | the file the coordinator reads on resume listing each worker's finished vendors and open items |
Study: Scratchpads & crash-recovery manifests Checkpoint Idempotency
Understand Foundations Mock Exam 4 · Q767's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The run lost its progress because nothing durable recorded it. Each worker exporting structured state to a known location, and the coordinator loading those files as a manifest on resume, lets the run continue where it stopped. Better hardware, context-only memory or splitting the run do not provide recovery.
Connect the design to the situation
Eight workers had finished most vendors, but nothing on disk said which ones.
Best answer: B. Structured state exports to a known location, loaded by the coordinator as a manifest on resume, let the run continue from where it stopped and inject the right state into each worker's prompt. Better hardware lowers the chance of a crash but does not handle one. Conversation context is the wrong place for durable progress, and splitting the run still restarts each failed part from scratch.
The decisive evidence in the stem
The coordinator had no record of which vendors were done
Progress existed only in volatile memory, so a crash erased it; durable, structured state is what makes resumption possible.
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
Run the reconciliation on a more reliable host with more memory, so that crashes during the month-end run become much less likely in future months.
Makes crashes rarer but leaves the run unable to recover when one still happens.
A bigger host crashes less often, which helps. But networks drop, deployments restart machines, and processes are killed. The first time any of that happens, the whole run restarts again, because nothing records progress.
B · Why this meets the requirement
Have each worker export its state (vendors done, partial results, open issues) to a known location, and the coordinator load that manifest on resume.
Saves progress durably and lets the coordinator restart each worker from its own last state.
After each vendor, a worker writes state/worker-3.json with vendors_done, partial totals and open discrepancies. On resume the coordinator reads the manifest of all eight files and starts each worker with 'continue from vendor 214; these items are open'. A crash costs only in-flight work.
C · Why this does not meet the full requirement
Keep all progress in the coordinator's conversation context, and resume the coordinator's session after a crash so it remembers which vendors were finished.
Keeps progress in model context, which is not a durable record and is hard to read reliably after a crash.
Progress written only into the coordinator's conversation is mixed with reasoning and may be summarized or lost. After a crash, the resumed coordinator must re-read long context to guess what was done, which is slower and less reliable than reading a file.
D · Why this does not meet the full requirement
Split the month-end run into eight separate pipelines, one per worker, so a crash affects only the vendors assigned to the pipeline that failed.
Limits the damage of a crash to one part, but that part still restarts from the beginning.
A crash now affects one pipeline instead of all eight, so less work is lost. But that pipeline still starts its vendors from scratch, and the eight pipelines lose the coordinator's combined view and cross-vendor checks.
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.
Worker state export (illustrative)
{"worker": 3, "assigned_vendors": 310, "vendors_done": ["V-0102", "V-0107", "V-0213"], "last_completed": "V-0213", "partial_totals": {"matched": 1820, "discrepancies": 14}, "open_items": [{"vendor": "V-0107", "doc": "INV-55120", "issue": "credit note unmatched"}], "updated_at": "2026-10-04T13:22:05Z"}The coordinator loads all eight files as its manifest and injects each one into the matching worker's prompt on resume.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
A crash at 7,400 of 12,000 documents forced a full restart. How do you make the run resumable?
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 & crash-recovery manifests
Study: Scratchpads & crash-recovery manifests Checkpoint Idempotency
Return to Foundations Mock Exam 4 · Q767's situation and clause-by-clause explanation
Answer
**B.** Structured state exports to a known location, loaded by the coordinator as a manifest on resume, let the run continue from where it stopped and inject the right state into each worker's prompt. Better hardware lowers the chance of a crash but does not handle one. Conversation context is the wrong place for durable progress, and splitting the run still restarts each failed part from scratch.D3 · Prompting & Structured Output
Q768. The extraction schema has a needs_review boolean, and the prompt says 'flag anything unusual about the document'. The model flags 41% of documents, mostly for handwritten notes, stamps and unusual logos, so the four reviewers cannot keep up. Finance cares about bank-detail changes, totals above the purchase order, and missing tax IDs. What change best fixes the flagging? (Select ONE.) A) Change the instruction to 'flag only documents you are highly confident are problematic', so the model flags fewer documents overall. B) Ask the model for a confidence score with each flag, and route a document to review only when its confidence is above 0.8. C) Keep the instruction and route only the first 10% of flagged documents each day to reviewers, sending the rest straight to the ERP. D) Define explicit flag criteria, such as bank details differing from the vendor record, and list what not to flag, such as stamps.
Understand Foundations Mock Exam 4 · Q768 · the situation and each part of the question
The real situation behind this question
Ledgerline wanted the model to warn reviewers about risky documents, so it added a review flag and a simple instruction. The model takes 'unusual' literally and flags stamps, handwritten notes and colourful logos, almost half of all documents. The four reviewers drown. Meanwhile, finance has very specific concerns, such as a vendor whose bank account suddenly changed, a classic fraud signal. The architect must make the flag mean something.
Read the question in parts
Part 1 · mostly for handwritten notes, stamps and unusual logos
the flags come from harmless visual features, not from the risks finance cares about.
Part 2 · Finance cares about bank-detail changes, totals above the purchase order, and missing tax IDs
the real criteria are known and concrete, so they can be written into the prompt.
What you are being asked to decide
'Flag anything unusual' flags 41% of documents for harmless reasons. What instruction works? Tests replacing vague flagging instructions with explicit categorical 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 conditions such as 'IBAN differs from the vendor master' that decide needs_review |
| Precision | the share of flagged documents that actually needed a reviewer's attention |
Study: Explicit criteria: say what to report and what to skip HITL Calibration
Understand Foundations Mock Exam 4 · Q768's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A vague criterion lets the model decide what 'unusual' means, so it flags harmless features. Naming the conditions finance cares about, and the ones to skip, makes the flag precise. Confidence wording, self-rated scores or caps do not change what gets flagged for the right reasons.
Connect the design to the situation
A coffee-stained invoice is flagged, while an invoice with changed bank details is not.
Best answer: D. 'Anything unusual' leaves the model to decide what matters, so it flags harmless oddities. Explicit criteria that name the conditions finance cares about, and the ones to ignore, make flags precise. Confidence-based wording or self-rated confidence does not change what the model considers unusual, and a daily cap discards flags at random.
The decisive evidence in the stem
'flag anything unusual about the document'
The criterion is vague, so the model's idea of 'unusual' replaces the business rules finance actually needs.
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
Change the instruction to 'flag only documents you are highly confident are problematic', so the model flags fewer documents overall.
Keeps the vague notion of 'problematic', so the model still decides what matters by its own standard.
The model now flags only documents it is very sure are 'problematic', still by its own idea of what that means. Stamps may drop out, but some real bank-detail changes are also left unflagged because nothing told the model they matter.
B · Why this does not meet the full requirement
Ask the model for a confidence score with each flag, and route a document to review only when its confidence is above 0.8.
Relies on self-rated confidence, which does not tell business-relevant issues from harmless ones.
The model gives high confidence to 'this has a handwritten note', which is easy to be sure about. Real risks may get lower scores. The threshold filters on how certain the model feels, not on whether the issue matters to finance.
C · Why this does not meet the full requirement
Keep the instruction and route only the first 10% of flagged documents each day to reviewers, sending the rest straight to the ERP.
Drops most flags at random, including real fraud risks, while the instruction stays vague.
Reviewers see 10% of today's flags, chosen by arrival time. The other 90%, including any bank-detail fraud, go straight into the ERP. The cap controls workload by ignoring risk.
D · Why this meets the requirement
Define explicit flag criteria, such as bank details differing from the vendor record, and list what not to flag, such as stamps.
Tells the model exactly which conditions matter and which to ignore, so flags match finance's needs.
The prompt says: 'Set needs_review true only if bank details differ from vendor_master, total exceeds the PO by more than 2%, or the tax ID is missing. Do not flag stamps, notes, logos or scan quality.' Flags fall to a few percent and are almost all relevant.
Check your understanding · explain the design in your own words
'Flag anything unusual' flags 41% of documents for harmless reasons. What instruction works?
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 HITL Calibration
Return to Foundations Mock Exam 4 · Q768's situation and clause-by-clause explanation