Last Step/Context Management and Reliability15%
Domain 56 task statements15% of the exam

Context Management and Reliability

How to keep Claude accurate when context grows, history compresses, and multiple agents must share state without losing provenance or calibration.

Context management is the discipline of deciding what occupies Claude's finite token budget on every request and ensuring that critical facts survive the compression, truncation, and positional degradation that long sessions impose. Everything in the request counts against that budget: system prompt, tool definitions, every message including tool results, images and documents, and the output including extended thinking. A prompt can fit and still perform worse, because accuracy and recall degrade as the token count grows, a documented effect named context rot, so passive filling reliably degrades output quality long before any limit is hit.

This domain's six tasks map to six places where reliability fails when context grows. Task 5.1 makes context window allocation explicit through the persistent case facts block that survives summarisation and the positional rules that defeat the lost-in-the-middle effect, plus prompt caching that saves money without saving attention. Task 5.2 calibrates escalation with three valid triggers and two unreliable anti-patterns so first-contact resolution depends on case difficulty not on sentiment. Task 5.3 replaces silent suppression and workflow termination with structured error propagation that preserves partial results and distinguishes access failures from valid empty results. Task 5.4 contains context degradation during extended codebase exploration through scratchpad files, subagent delegation for isolation, and summary injection between phases. Task 5.5 replaces aggregate metrics and raw confidence with stratified calibration and dynamic review routing that allocates limited human capacity where uncertainty is highest. Task 5.6 makes provenance survive synthesis through five-field claim-source mappings, conflict preservation, and content-appropriate rendering.

Two principles cut across every task. First, structure at the source beats instruction after the fact. Extracting critical facts into a protected block before summarisation survives compression, while telling the model to pay attention to everything does not defeat a positional effect. Returning structured error objects with failure type, attempted action, partial results, and alternatives enables recovery, while returning empty results marked as success hides the failure. Preserving claim-source mappings through every synthesis step keeps attribution traceable, while assuming the model will preserve it by default loses it on first paraphrase. Second, aggregate signals hide segment failures and raw model signals are poorly calibrated. A 97 percent aggregate can hide 45 percent accuracy on international documents, and 0.95 confidence on a date field can mean 99 percent accuracy while the same score on an amount field means 56 percent. Production therefore measures per-type and per-field accuracy, calibrates per stratum on labelled data, and samples high-confidence automated extractions to catch novel patterns that low-confidence sampling misses.

On this page
  1. 5.1 Context Window Management Protect transactional facts with a persistent block, place critical content at the start and end, and use positional prompt caching to save cost without losing attention.
  2. 5.2 Escalation and Ambiguity Resolution Route by three valid triggers, reject sentiment and raw confidence as signals, and ask for a disambiguating identifier when tool results are ambiguous.
  3. 5.3 Error Propagation in Multi-Agent Systems Propagate structured errors with partial results, distinguish access failures from valid empty results, and make gaps visible with coverage annotations.
  4. 5.4 Codebase Exploration and Context Degradation Treat verbose exploration as a context quality problem and contain it with scratchpads, isolated subagents, and injected summaries.
  5. 5.5 Human Review and Confidence Calibration Measure accuracy by document type and field, calibrate per-stratum confidence, and prioritise limited reviewer time by uncertainty.
  6. 5.6 Information Provenance and Multi-Source Synthesis Carry five-field claim-source mappings through every merge, preserve conflicts with both values, and render by content type so gaps are never mistaken for relevance.
The essentials
Everything below explains why each of these is true.
  1. The Messages API is stateless and every request must include the complete conversation history. The system prompt and tool definitions are re-sent on every request, which is exactly why a persistent facts block and trimmed tool results matter: they keep what is re-sent compact.
  2. A persistent case facts block extracts amounts, dates, order numbers, statuses, deadlines, and session-governing preferences into a structured object that is prepended to every prompt and is never summarised, never FIFO truncated, and never compressed.
  3. A practical allocation for a support agent with five tools is roughly 10 to 15 percent for system prompt, 10 to 15 percent for tool definitions at about 3,500 tokens each, 30 to 40 percent for conversation history, 10 to 20 percent for retrieved documents, and a 5 to 10 percent safety buffer that is non-negotiable.
  4. Escalation has three valid triggers: explicit human request honoured immediately with no investigation, policy gap where documented policy is silent and requires human judgement, and inability to make meaningful progress after a genuine attempt. Sentiment and self-reported confidence are unreliable triggers.
  5. Ambiguous customer matching must ask for an additional identifier via a clarification request. Selecting the most recent or most active record risks privacy violations and incorrect actions.
  6. Structured error context carries failure type from transient, validation, business, and permission, attempted action, partial results, and alternative approaches, and distinguishes access failure where the query did not execute and should retry from valid empty result where the query executed and found no matches and should not retry.
  7. Context degradation is not a token limit problem. Verbose discovery output buries earlier precise findings and the model reverts to typical patterns instead of specific class names and file paths. Mitigations are scratchpad files, subagent delegation for isolation, summary injection between phases, and proactive compaction rather than compaction only at the limit.
  8. Stratified sampling must include high-confidence automated extractions proportionally by document type and confidence band. Raw confidence must be calibrated per field per document type on labelled validation data before any routing threshold is set.
  9. Provenance requires five fields per finding: claim, source URL, document name, relevant excerpt, and publication date. Conflicts between credible sources preserve both values with full attribution and a possible explanation, and financial data renders as tables, news as prose, and technical findings as structured lists.
  10. Cross-cutting patterns include selection, writing, compression, and isolation for context management, coverage annotations that make gaps visible by construction, and per-source attribution for the six context sources of instructions, external knowledge, tools, memory, state, and user prompts.
Task 5.118 min

Context Window Management

Protect transactional facts with a persistent block, place critical content at the start and end, and use positional prompt caching to save cost without losing attention.

What you need to know

Context window management is the daily practice of deciding what occupies the finite token budget that every Claude request draws from. Within the window, the system prompt, tool definitions, MCP server payloads, conversation history, retrieved documents, and the response itself including extended thinking all compete for the same allocation. Accuracy and recall degrade as the token count grows, an effect documented under the name context rot, so passive filling reliably degrades output quality long before any limit is hit.

The single most important pattern is the persistent case facts block, sometimes called the immutable facts block. Its purpose is to defeat the progressive summarisation trap. When a long-running conversation is compressed between turns, abstractive summarisation systematically destroys the most critical information in transactional systems. A refund of 247.83 for order 8891 placed on March 3rd, after two summarisation passes, becomes the customer wants a refund for a recent order. The three facts the agent needs to process the refund are gone, and the model proceeds confidently with the wrong data. The fix is structural rather than prompt-based. Extract transactional facts into a structured block that is included in every prompt and is never summarised, never FIFO truncated, and never compressed. This block sits immediately after the system prompt, before any conversation history, and is updated in place as new critical facts emerge. The protected facts survive every compression cycle because the compression pipeline explicitly excludes them.

A related degradation mode is the lost-in-the-middle effect. Findings buried in the middle of a long context receive less attention than findings at the beginning or end, and this is a positional phenomenon rather than an instruction-following problem. Telling the model to pay attention to everything is unreliable because the attention pattern is shaped by position, not by intent. The structural fix is to place key findings summaries at the top of any aggregated input, organise detailed results with explicit section headers throughout, and use recency at the end of the input for the current user message so it gets strong attention. For a multi-source synthesis the format is always key findings summary first, detailed findings under explicit headers, and the synthesised answer last.

The Claude API is stateless. Every request must include the complete conversation history. Omitting earlier messages does not free context on the server, it just causes the model to lose conversational coherence. This creates the central tension of context management: the history must be present for coherence, but it grows with every turn. The persistent case facts block resolves this tension by separating critical facts from summarisable narrative, letting you compress the conversation flow while preserving every transactional detail verbatim.

The persistent case facts block and the summarisation trap

Abstractive summarisation collapses exact values into vague generalities that look reasonable but cannot drive correct downstream action. Numbers, dates, percentages, and explicit expectations are the most vulnerable fields because they are precise by nature, and a summariser that turns 247.83 on March 3rd into recent order has destroyed the transactional payload while preserving narrative gist. The case facts block is the only structural protection because it is excluded from the summarisation pipeline by construction.

The block is a runtime discipline, not an API feature. The application extracts facts from tool results and conversation turns, stores them in a structured object with fields such as customerId, orderId, refundAmount, orderDate, and status, and prepends the serialised object to every prompt construction. The block is updated in place as new facts emerge and for multi-issue sessions each issue gets its own entry with order IDs, amounts, and statuses so compressing one issue narrative does not bleed into another issue facts.

Lost in the middle, context rot, and token budget shape

Quality does not hold flat across the window. Anthropic documents the degradation directly: as token count grows, accuracy and recall fall, an effect named context rot, which is why curating what is in context matters as much as how much room is left. No official threshold is published, and community study material commonly quotes an effective ceiling somewhere in the high 140,000s, so treat any specific number as an estimate and reason about the direction of the effect rather than a cliff edge. A scenario describing a 180K context where the model misses a policy buried in the centre is testing positional degradation compounded with context rot, not a token limit being exceeded. The fix is to restructure so critical content sits at the start or end rather than buried in the middle, with key findings at the top, headers throughout, and the current question at the end for recency.

A practical allocation for a customer support agent with five tools keeps roughly 10 to 15 percent for system prompt, 10 to 15 percent for tool definitions at about 3,500 tokens each so five tools consume roughly 9 percent of a 200K budget before any conversation, 30 to 40 percent for conversation history, 10 to 20 percent for retrieved documents, and a 5 to 10 percent safety buffer for unexpected payloads. Without the buffer a single long user document can push the session deep into the degraded region mid-turn.

Mechanism and API surface

Persistent case facts block after system prompt
Structured JSON with customerId, orderId, refundAmount, orderDate, and status, prepended to every prompt, never summarised or FIFO truncated, updated in place as new facts emerge, with per-issue entries for multi-issue sessions.
Lost-in-the-middle positional fix
Key findings summary at the very top, detailed findings under explicit section headers throughout, and current user message at the end for recency. Positional effect is not fixable by instruction.
Context rot as the documented degradation
Accuracy and recall fall as token count grows, with no published cliff. Community material quotes an effective ceiling in the high 140,000s; treat that as an estimate. The hard window limit is a separate hard stop where the request errors.
Practical token allocation with safety buffer
System prompt 10 to 15 percent, tool definitions 10 to 15 percent at about 3,500 tokens each, conversation history 30 to 40 percent, retrieved documents 10 to 20 percent, plus a 5 to 10 percent safety buffer that is non-negotiable.
Tool result trimming at the boundary
Strip verbose fields before the result enters messages via a hook or wrapper. Once in history verbose data persists every turn, so trimming after the fact does not recover the cost.
Refund agent that loses amounts to summarisation then recovers them
A production walkthrough with the reasoning chain made explicit.

A tier 1 customer support agent handles refund requests across a multi-issue session. The customer raises three issues in turn: a 247.83 refund for order 8891 placed on March 3rd for defective wireless headphones, a shipping delay on order 8902, and a duplicate charge of 49.95 on the same account. By turn 12 the history has grown past the summarisation threshold and the summariser compresses turns 1 to 8 into the customer raised issues about a refund, a shipping delay, and a billing question.

When turn 13 asks the agent to confirm the refund, the agent responds I can process your refund for the recent defective order, what is the amount. It does not remember the 247.83, the order number, or the date because the summariser destroyed them. The customer is forced to repeat the information and first-contact resolution drops.

The fix has three components. An extraction step at the end of every tool call pulls transactional facts and writes them into a persistent case facts block with customerId C-4421 and per-issue entries carrying orderId, orderDate, refundAmount, status, and item description. The prompt construction function always prepends this block to every message outside any summarisation pipeline. A tool result trimmer reduces each order lookup from 40 fields to the five relevant fields, cutting token cost by 80 to 90 percent.

Distinctions that decide answers

ThisNot thisHow to tell them apart
Persistent case facts blockProgressive summarisationThe case facts block is structured, machine readable, and excluded from all compression. Summarisation produces free-form prose that is included in compression. The block survives cycles because it is structurally separate.
Context rot as a gradientHard token limit 200K or 1MContext rot is a monotonic decline in accuracy and recall as the count grows, with no published cliff. The hard limit is a hard stop where the request errors. A miss on a buried fact at 150K is degradation plus a positional effect, not a limit error.
Conversation history compressionConversation history truncationCompression summarises older turns preserving gist. Truncation deletes older turns preserving nothing. Compression is preferred for customer-facing systems because the agent must remember the topic.
Tool result trimmingTool result summarisationTrimming removes irrelevant fields preserving original structure for relevant fields. Summarisation rewrites the result and is lossy for numbers and identifiers. Trimming is preferred for order lookups where five fields must remain verbatim.

Traps

Summarise the history to manage context in a transactional system without a protected block

The tempting answer. Use progressive summarisation when history grows because compression feels like the obvious budget fix.

Why it fails. Abstractive summarisation systematically destroys exact amounts, dates, and identifiers that a transactional system must get right, collapsing them into vague generalities that look reasonable but cannot drive correct action.

What is correct. Extract those facts into a protected block before summarisation runs and exclude that block from every compression cycle.

Tell the model to pay attention to all parts of the context to defeat lost in the middle

The tempting answer. Add an instruction to pay attention to everything because adding guidance feels like the right intervention.

Why it fails. The attention pattern is shaped by position not by intent. The model does attend more reliably to the beginning and end regardless of instruction, so middle content remains underweighted.

What is correct. Place key findings at the start, detailed content under explicit headers, and the current question at the end, which structurally defeats the positional effect.

Keep full 40 field tool results in context because the model might need them later

The tempting answer. Preserve all fields because discarding information feels less safe than keeping it.

Why it fails. Untrimmed results from verbose lookups persist through every subsequent turn and exhaust the budget across turns even though only five fields were ever relevant.

What is correct. Trim to relevant fields at the tool boundary before the result enters history, never after.

Enable the 1M window to solve degradation

The tempting answer. Move from 200K to 1M to get more room because a larger window sounds like the fix for missed facts.

Why it fails. Degradation tracks how many tokens are actually in the request, and position within it, not how much headroom remains. An 800K prompt on a 1M-window model is deep into the degraded region even though the hard limit is far away.

What is correct. Restructure so critical content sits at the start or end, and reduce what is present at all, regardless of total window size.

Hand-rolling a summarisation loop when the session fills

The tempting answer. Build a client-side summariser because managing history feels like application work and the reference material describes it that way.

Why it fails. A conversation that is summarised without protecting its transactional payload destroys the exact amounts, dates, and identifiers the next turn needs, because abstractive summarisation trades precise figures for narrative gist.

What is correct. Keep the load-bearing facts in a protected block excluded from every compression cycle, then summarise only the narrative around them. The five-part continuation shape to preserve is task overview, current state, important discoveries, next steps, and context to preserve.

Going deeper than the task statement
Adjacent material that shows up in harder scenario questions.
FIFO versus priority based truncation strategies

FIFO drops the oldest turns first when the budget is exceeded, priority based ranking drops lowest priority content first with system prompt highest then immutable facts then recent conversation then oldest summarisable turns lowest.

Token Budgeting
Six context sources and their per-source budget behaviour

Instructions and tools are fixed overhead on every request, external knowledge is variable per query, memory and state grow across turns, and user prompts are one shot per turn, each with its own optimisation guidance.

Context Sources: A Six-Level Taxonomy
Build it
Prove the protected block survives summarisation while caching saves cost
  1. Build a prompt construction function that always prepends a persistent case facts block to every message where the first entry carries both the system prompt and the serialised case facts, followed by history, followed by the current user turn, and where the block is never passed to the summarisation function.
  2. Implement an extraction step that pulls transactional facts from tool results and updates the case facts block in place, overwriting existing entries when a fact is confirmed and appending new entries when a new fact emerges.
  3. Build a tool result trimmer that reduces a 40 field order lookup to exactly five fields of order_id, order_date, total_amount, return_eligible, and item_description and verify the trimmed result is 80 to 90 percent smaller.
  4. Run a 12 turn conversation that triggers summarisation after turn 8 and verify the agent at turn 13 still references the exact 247.83 refund, order 8891, and March 3rd date from the protected block without asking the customer to repeat.

Verify. Transactional facts survive every compression cycle intact, tool payloads stay lean, and the static prefix is reused at about one tenth of standard input price without sacrificing per-call attention discipline.

Answer real questions on this task
8 exam-style questions written against the rules above. You get the reasoning and a note on every wrong option after each answer.
Task 5.214 min

Escalation and Ambiguity Resolution

Route by three valid triggers, reject sentiment and raw confidence as signals, and ask for a disambiguating identifier when tool results are ambiguous.

What you need to know

Escalation calibration determines whether a customer support agent achieves its target first-contact resolution rate or quietly degrades into a system that punts every difficult case to a human while attempting every easy case autonomously. The exam tests the precise boundaries of when to escalate, when to resolve, and which commonly proposed triggers are unreliable in practice. There are exactly three valid escalation triggers, two unreliable triggers that look rigorous but fail, and one absolute rule about explicit human requests.

The first valid trigger is an explicit human request. The moment a customer says I want to speak to a person or transfer me to a human agent, the escalation happens immediately. No investigation, no let me see if I can help you with that first, no diagnostic questions. The customer has made a clear unambiguous request and the agent must honour it without delay. This is an absolute rule with no exceptions. The temptation to try once first wastes the customer's time, frustrates an already frustrated user, and signals that the system does not respect explicit requests.

The second valid trigger is a policy gap, distinct from a policy violation. A violation is a request that documented policy explicitly addresses and the answer is usually no, such as refund outside the return window or discount beyond the authorised limit. A gap is a situation the documented policy is silent on, such as a customer asking for competitor price matching when the policy only covers own-site price adjustments. The policy does not say no and does not say yes, it is silent. The agent cannot make policy on the fly, so the gap requires human judgement about whether to make an exception.

The third valid trigger is inability to make meaningful progress. The agent has attempted resolution and cannot advance because tools returned errors that local retry logic cannot resolve, the situation requires system access the agent does not have, the issue is a technical bug that needs engineering, or the order genuinely does not exist in any system the agent can query. The catch-all is genuine but only after a real attempt. I might not be able to handle this is not sufficient. The agent has to show it tried and failed.

The two unreliable triggers deserve direct attention because they sound rigorous but consistently fail in production. Sentiment-based escalation uses frustration detection or negative sentiment scores to route to a human. Frustration does not correlate with case complexity. A customer furious about a simple late delivery is easy to resolve with an apology, compensation, and reship. A calm polite customer asking about a competitor price match needs human judgement on a policy gap. Sentiment measures emotional state not case difficulty, so routing by sentiment inverts the correct priority. The same applies to politeness and tone classification. Self-reported confidence scoring is the second unreliable trigger. Having the model output a 1 to 10 score and escalating below a threshold sounds engineering grade but LLM self-reported confidence is poorly calibrated. The model is often incorrectly confident on hard cases and unnecessarily uncertain on straightforward cases. This produces the exact failure the exam tests, an agent that escalates simple cases while attempting complex ones. Confidence earns its place only as a routing signal in a calibrated system with external ground truth, not as a primary trigger. Objective signals like self-consistency checks that run the same prompt three times and escalate on disagreement and hedging detection that flags uncertain language are more reliable than self-reported scores.

The three frustration cases and ambiguous matching

If the issue is straightforward and the customer is frustrated, acknowledge the frustration, offer the resolution, and do not escalate. I understand this is frustrating, I can process your replacement right now is the correct pattern. If the customer reiterates a preference for a human after you have offered help, escalate because they have been given an opportunity to accept agent resolution and declined. If the customer explicitly says I want a human from the start, escalate immediately with no investigation step. The distinction is between a frustrated customer with a resolvable issue where you resolve and a customer who explicitly wants a human where you escalate.

Ambiguous customer matching is its own failure mode. When a tool returns multiple matches for a name search such as three John Smith records, the agent must ask for additional identifiers like email address, phone number, or order number. The agent must not select the most recent, most active, or any heuristic-based record. Selecting the wrong customer risks privacy violations by exposing one customer's data to another and incorrect actions such as processing a refund on the wrong account. The only safe response is to ask for clarification.

Calibration in the system prompt and structured handoff

The most effective first fix is to add explicit escalation criteria with few-shot examples to the system prompt. Examples demonstrate when to escalate for explicit request, policy gap, and inability to progress, when to resolve autonomously for straightforward frustrated cases, and the exact format of the escalation. Prompt optimisation should always precede architectural changes such as classifier models. A classifier is an addition only when prompt engineering has plateaued.

Escalation is implemented at the application layer. The system prompt carries the criteria and few-shot examples, the runtime detects triggers and either invokes an escalation tool or routes to a human queue. A common tool definition is escalate_to_human with required fields for customerId, issueSummary, attemptedActions, recommendedAction, and urgency, which makes the handoff machine readable for downstream routing. When the application detects an explicit request or a flagged policy gap it can force the structured handoff with tool_choice type tool and name escalate_to_human rather than relying on free-form text.

Logs, tiebreakers, and what inability really means

Every escalation event should log the trigger that fired, the customer identifier, the issue summary, the attempted actions and their outcomes, the recommended next action, and a timestamp. This structure is what makes the escalation useful to the human reviewer who can pick up without re-asking the customer for context, which reduces average handle time per case.

When two automated components disagree about whether to escalate, one flags a gap while another classifies the same case as a violation, the escalation policy needs a tiebreaker such as priority rules, timestamp ordering, or default to escalate. Without a tiebreaker the disagreement produces inconsistent handling across similar cases.

Inability to progress means concrete failed attempts, such as tool errors that retry cannot resolve, missing system access, or a confirmed technical bug. Subjective difficulty is the agent guessing without trying. Only the first justifies the inability trigger, which is why the exam tests whether escalation is grounded in failed attempts rather than in a feeling of difficulty.

Mechanism and API surface

Explicit human request as an absolute trigger
Phrases like I want to speak to a person or transfer me to a human require immediate escalation with no investigation step and no let me try first.
Policy gap versus policy violation
A gap is a situation the documented policy is silent on and requires human judgement about whether to make an exception. A violation is explicitly addressed with a documented answer and the agent communicates that answer.
Inability to make meaningful progress
Grounded in concrete failed attempts where tools, retries, and accessible systems did not advance the case. Subjective guessing without trying does not qualify.
Sentiment and confidence as unreliable signals
Frustration and negative sentiment measure emotional state not case complexity. Self-reported confidence is poorly calibrated and often confident on hard cases and hesitant on easy ones. Use calibrated external signals if confidence is used at all.
Ambiguous matching via clarification request
On multiple matches ask for an additional identifier such as email, phone, or order number. Never select by recency, activity, or other heuristic.
Structured handoff and forced escalation tool
Tool escalate_to_human with customerId, issueSummary, attemptedActions, recommendedAction, urgency, and timestamp, invocable with tool_choice type tool and name escalate_to_human for a complete machine readable handoff.
Support agent stuck at 55 percent resolution that climbs to 82 percent
A production walkthrough with the reasoning chain made explicit.

A tier 1 customer support agent for an e-commerce platform reports 55 percent first-contact resolution against an 80 percent target. Investigation shows the agent escalates straightforward damage replacement cases while attempting to handle complex policy exception requests autonomously. Three patterns emerge. The agent escalates whenever the customer uses words like frustrated, annoyed, or upset regardless of whether the issue is resolvable. The agent escalates whenever it reports a self-confidence score below 0.7, which fires on most edge cases because the model is poorly calibrated. The agent attempts every policy gap autonomously and produces inconsistent answers across similar cases.

The fix rewrites the system prompt with explicit escalation criteria as a numbered list covering explicit human request, policy gap where documented policy is silent, and inability to make meaningful progress after a genuine attempt. The prompt explicitly names sentiment-based and confidence-based escalation as anti-patterns with reasoning such as frustration does not correlate with case complexity, a furious customer with a simple late delivery is easy to resolve while a calm customer with a policy gap needs human judgement.

Three few-shot examples demonstrate the calibration. A customer writes I am furious about this delivery delay, the third time. The agent acknowledges the frustration, offers a replacement shipment plus a 20 percent credit, and resolves autonomously, reasoning that explicit frustration with a simple resolvable issue does not trigger escalation. A customer asks can you match the price Amazon is offering on the same headphones. The agent detects a policy gap because competitor matching is not in documented policy and invokes the escalation tool with the competitor URL and an assessment that the policy is silent. A customer writes I want to talk to a person now. The agent immediately invokes the escalation tool with no investigation, reasoning that an explicit human request is honoured without delay.

A separate handling path covers ambiguous matching. When a name search returns three John Smith records the agent invokes request_clarification with a structured payload listing the three matches with email and order count and asks for an additional identifier rather than selecting heuristically. Over the next month first-contact resolution rises from 55 percent to 82 percent. Escalation volume drops by 40 percent because simple frustration cases are no longer escalated. Policy gap escalations increase slightly because explicit criteria make genuine gaps easier to identify, and structured handoffs reduce average human handle time.

Distinctions that decide answers

ThisNot thisHow to tell them apart
Explicit human requestFrustrated customer with resolvable issueAn explicit request uses phrases like I want to speak to a person or transfer me to a human. A frustrated customer expresses negative sentiment about a resolvable issue. The first triggers immediate escalation with no investigation, the second triggers acknowledgement plus resolution.
Policy gapPolicy violationA gap is silence in documented policy and requires human judgement. A violation is an explicitly addressed case with a documented answer the agent should communicate.
Inability to make progressPremature escalationInability means the agent attempted resolution and tools, retries, and accessible systems did not advance the case. Premature escalation means the agent gave up before trying or escalated on subjective difficulty without failed attempts.
Self-reported confidenceCalibrated confidenceSelf-reported is the model rating its own certainty on a 1 to 10 scale and is poorly calibrated. Calibrated is derived from external ground truth and maps reported scores to actual accuracy per field type per document type. Self-reported is unreliable for routing, calibrated is reliable.
Heuristic customer selectionClarification requestHeuristic selection picks one of multiple matching records by recency or activity. Clarification asks for an additional identifier. Heuristic risks privacy violations and wrong-account actions, clarification is the only safe response.
Prompt-based escalation criteriaClassifier-based escalationPrompt-based criteria with few-shot examples in the system prompt are the proportionate first response. Classifier-based escalation is an architectural addition only when prompt engineering has plateaued.

Traps

Escalate on frustration or negative sentiment

The tempting answer. Use frustration detection because high frustration intuitively feels correlated with difficulty and sounds rigorous.

Why it fails. Frustration measures emotional state not case complexity. A furious customer with a simple late delivery is easy to resolve, a calm customer with a policy gap is hard. Routing by sentiment inverts the correct priority and produces an agent that escalates easy cases.

What is correct. Acknowledge frustration and resolve the straightforward issue. Escalate only on the three valid triggers, not on how the customer feels.

Use self-reported confidence below 0.7 as an escalation trigger

The tempting answer. Filter by confidence because thresholding feels engineering grade and quantitative.

Why it fails. LLM self-reported confidence is poorly calibrated. The model is often incorrectly confident on hard cases and unnecessarily uncertain on straightforward cases. This is the exact failure where an agent escalates simple cases while attempting complex ones.

What is correct. Reject raw self-report as a primary trigger. Use calibrated signals or objective checks such as self-consistency and hedging detection, and keep confidence as a secondary routing signal only.

Try to help once before honouring an explicit human request

The tempting answer. Offer help first because that feels polite and efficient before handing off.

Why it fails. The customer has made a clear unambiguous request and any investigation step before honouring it wastes time, frustrates the user, and violates the absolute rule. On the exam any investigation before an explicit request is a critical failure.

What is correct. Escalate immediately with no investigation step and a structured handoff.

Select from ambiguous matches using most recent or most active record

The tempting answer. Pick the heuristic winner because that is faster than asking for clarification.

Why it fails. Heuristic selection risks privacy violations by exposing one customer's data to another and incorrect actions such as processing a refund on the wrong account.

What is correct. Invoke a clarification request listing the matches and ask for an additional identifier such as email, phone, or order number, and wait for the response before proceeding.

Deploy a separate classifier before trying prompt-based criteria

The tempting answer. Build a dedicated escalation classifier because a separate model sounds more sophisticated.

Why it fails. Prompt optimisation should always precede architectural changes. Few-shot examples in the system prompt directly address unclear decision boundaries without the operational overhead of a separate model.

What is correct. Add explicit criteria and few-shot examples first and reach for a classifier only after prompt engineering has plateaued.

Resolve autonomously when documented policy is silent

The tempting answer. Avoid escalation overhead by making a judgement call and being helpful when policy does not speak.

Why it fails. Policy gaps require human judgement about whether to make an exception. The agent cannot make policy on the fly and inconsistent answers across similar gaps erode trust.

What is correct. Escalate every policy gap with a structured handoff carrying the gap, customer context, and attempted actions.

Going deeper than the task statement
Adjacent material that shows up in harder scenario questions.
Three frustration cases the exam tests most aggressively

Frustrated but resolvable where you resolve with acknowledgement, reiterated human preference after help is offered where you escalate, and explicit human request from the first turn where you escalate immediately with no investigation.

Escalation Patterns
Self-consistency and hedging signals over self-report

Self-consistency runs the same prompt three times and escalates on disagreement, hedging detection flags uncertain language such as I think or possibly, and log-probability analysis inspects token distributions. Each is more reliable than asking the model to rate itself.

Confidence Scoring and Uncertainty Handling
Tiebreaker for conflicting escalation decisions in multi-agent setups

When two components disagree about whether to escalate, define a tiebreaker such as priority rules, timestamp ordering, or default to escalate so similar cases are handled consistently.

Multi-Agent Context Isolation and Coordination
Build it
Calibrate escalation from misrouted baseline to structured handoff
  1. Write a baseline system prompt with no explicit escalation criteria and run it against ten customer scenarios covering explicit requests, violations, gaps, frustrated but resolvable cases, and ambiguous matches, recording inconsistent decisions where frustration cases escalate and gaps are attempted autonomously.
  2. Rewrite the prompt with three clearly defined triggers with decision rules, a section naming sentiment and confidence as anti-patterns with reasoning, and the exact format of the escalation handoff.
  3. Add three few-shot examples with reasoning for a frustrated resolvable case, a policy gap, and an explicit human request from the first turn, each showing the correct decision.
  4. Add an ambiguous matching handler that detects multiple matches, never selects heuristically, and always returns a clarification request asking for an additional identifier.
  5. Re-run the ten scenarios and verify every explicit request triggers immediate escalation, every gap triggers structured escalation, every frustrated resolvable case triggers acknowledgement plus resolution, and every ambiguous match triggers clarification. Record the measurable rise in first-contact resolution.

Verify. Escalation decisions become consistent across the ten scenarios, frustration no longer inverts priority, ambiguous matches never risk a wrong-customer action, and the structured handoff reduces human handle time.

Answer real questions on this task
8 exam-style questions written against the rules above. You get the reasoning and a note on every wrong option after each answer.
Task 5.316 min

Error Propagation in Multi-Agent Systems

Propagate structured errors with partial results, distinguish access failures from valid empty results, and make gaps visible with coverage annotations.

What you need to know

Error propagation in multi-agent systems determines whether a failure in one component brings down the whole workflow or whether the system recovers gracefully with partial results. The exam tests the structural shape of error context, the two catastrophic anti-patterns that sit on opposite ends of handling, and a critical distinction that most developers get wrong on first reading: access failures versus valid empty results. Getting this pattern right means every failure carries enough context for the coordinator to decide intelligently, and getting it wrong means either silent data loss or disproportionate waste of completed work.

The correct pattern is structured error context. When a subagent fails it returns a structured object that enables the coordinator to make intelligent recovery decisions. The context must include four elements. First, failure type as a categorical label that drives recovery logic: transient failures such as timeouts, rate limits, or network blips that may succeed on retry, validation failures that need the query fixed, business failures such as rule violations that need escalation or alternative action, and permission failures that cannot be retried without authorisation changes. Second, what was attempted: the specific query, parameters, target system, and any identifiers, so searched academic database for renewable energy policy with date range 2022 to 2024 is actionable while search failed is not. Third, partial results gathered before failure: if a subagent retrieved three of five sources before timing out, those three are valuable and discarding them because the overall operation failed is wasteful. Fourth, potential alternative approaches: the subagent knows its domain and can suggest a different database, broader search terms, or cached results that may help the coordinator decide on recovery.

The two anti-patterns are catastrophic in different ways and sit on opposite ends of handling. Silent suppression is the worst: a subagent catches a timeout and returns results empty with status success. The coordinator believes the search ran and found nothing, will not retry, will not try alternatives, and produces a synthesis that silently omits an entire research area. The final output looks complete but is missing critical content. Silent suppression is especially dangerous because it is invisible: the output looks correct and the gap cannot be detected from the output alone. In a customer support context this might mean reporting no orders found when the order lookup system was actually down, leading the agent to tell the customer they have no account. Workflow termination is the other anti-pattern: killing the entire pipeline on a single failure. One subagent times out and the entire research pipeline crashes, throwing away results from four subagents that completed successfully. This is a disproportionate response with no recovery path. The correct middle ground is structured error propagation: the failing subagent reports what happened with partial results preserved, the coordinator assesses the damage, and the system continues with targeted recovery.

The access-failure versus valid-empty-result distinction is critical and the exam tests it directly. An access failure is when the tool could not reach the data source, such as a timeout, connection error, or permission denial. The search did not execute, so retry with the same or modified parameters should be considered. A valid empty result is when the tool reached the source and executed the query but found no matches. This is the answer, no retry is needed because the system worked correctly and there simply are no results for this query. Conflating them produces two opposite failure modes: treating access failures as valid empties means never retrying when you should, treating valid empties as access failures means wasting time retrying a query that will always return nothing. The fix is a structured response with explicit status, failureType, and shouldRetry fields so the coordinator can distinguish the two programmatically.

Coverage annotations are the structural mechanism for handling partial failures in synthesis. When a synthesis agent combines findings from multiple subagents the output should note which topic areas are well supported and which have gaps. If one subagent failed to retrieve sources on geothermal energy the synthesis should explicitly state section on geothermal energy is limited due to unavailable journal access during research. This is far better than silently omitting the topic, because a gap otherwise looks like the topic was not relevant rather than the source being unavailable. Local recovery for transient failures happens before propagation. Subagents implement local retry logic with exponential backoff and jitter, fallback sources, and degraded responses before propagating. Only persistent errors that survive local recovery should propagate, always with attempted action and partial results included, which reduces coordinator complexity because the coordinator does not manage retry for every transient failure across every subagent.

Structured error shape and the shouldRetry signal

The minimum fields for a structured error are status with success or error, failureType from transient, validation, business, and permission, attemptedAction as an object with tool, query, and parameters, partialResults as an array of any retrieved data, alternativeApproaches as an array of suggested recovery strategies, and shouldRetry as a boolean. The failureType enum drives coordinator logic: transient triggers retry with same or modified parameters, validation triggers a query fix attempt, business triggers escalation or alternative, and permission triggers immediate escalation without retry.

In the tool layer this surfaces with isError true, errorCategory from transient, permanent, auth, not-found, and validation, and isRetryable as the actionable boolean. A transient category with isRetryable true means the coordinator should retry, an auth category with isRetryable false means retrying will not help. The shouldRetry and isRetryable fields make the retry decision explicit rather than relying on the model to infer it from an error message, and the exam tests whether you route by those fields rather than by prose interpretation.

Local retry before propagation and exponential backoff

Local retry logic uses exponential backoff with jitter. A typical implementation attempts once immediately, then after 1 second plus jitter, then after 2 seconds plus jitter, then after 4 seconds plus jitter, giving up after three retries. The jitter prevents synchronised retry storms where multiple clients retry the same failing service at the same instant. When a Retry-After header is present the retry logic honours it instead of computing its own backoff.

The discipline is to handle transient failures locally and propagate only persistent ones. Most transient failures resolve on the first or second retry, so propagating immediately floods the coordinator with recoverable errors. Each subagent handles its own transient failures, preserves partial results across retries, and escalates only the persistent error with the full structured context.

Coverage annotations that make gaps visible by construction

Coverage annotations are appended to the synthesis output as a structured section listing each topic area with its data quality status: well supported, limited with reason, or unavailable with reason. Failed subagent topics are explicitly noted with the failure type and any alternative approaches that were attempted. The annotation is what makes a gap visible: without it a missing geothermal section looks like the topic was not relevant, with it the same gap reads as source unavailable and the downstream consumer knows not to trust absence as relevance.

External validation pipelines mirror the same pattern for Claude outputs. When a Claude output fails schema or semantic validation the pipeline returns a structured error with the specific validation message, the failed output, and a recommended fix. Model downgrade from Opus to Sonnet to Haiku and circuit breaker patterns provide the fallback and protection layer that complements propagation: the downgrade chain is invoked when a primary model returns repeated transient failures, and the circuit breaker opens after a threshold of failures, allows test requests after a cooldown, and closes on recovery to protect downstream services from cascading load.

Mechanism and API surface

Four-element structured error context
Failure type, attemptedAction with tool and query and parameters, partialResults array, and alternativeApproaches array, all required alongside status and shouldRetry so the coordinator has actionable context.
Access failure versus valid empty result
Access failure means the tool could not reach the source and the query did not execute, valid empty means the tool executed correctly and found no matches. The first has isError true and shouldRetry true, the second has status success with empty results and shouldRetry false.
isError and isRetryable signals
errorCategory from transient, permanent, auth, not-found, and validation plus isRetryable boolean. Transient with isRetryable true routes to retry, auth with isRetryable false routes to escalation without retry.
Exponential backoff with jitter for local retry
Delay computed as base times two to the power of attempt plus random jitter, typically 1 second base with 1 second, 2 seconds, 4 seconds plus jitter, and Retry-After header honoured when present to avoid synchronised storms.
Partial results preservation across failure boundaries
The partialResults field specifically preserves data retrieved before failure so the coordinator can use it. Discarding treats the operation as all or nothing and wastes completed work.
Coverage annotation on synthesis output
Structured section listing each topic area as well supported, limited with reason, or unavailable with reason. Failed topics are explicitly noted with failure type and attempted alternatives, never silently omitted.
Research pipeline where EU policy is preserved through a transient timeout
A production walkthrough with the reasoning chain made explicit.

A web search subagent in a multi-agent research system is researching renewable energy policy. The subagent attempts to query an academic database for sources on the EU Renewable Energy Directive. The first query succeeds and returns two sources. The second query times out after 30 seconds because the database is overloaded. The third query also times out. Local retry logic with exponential backoff has been exhausted.

The wrong response on one end is silent suppression: catch the timeout and return results empty with status success. The coordinator believes the subagent completed successfully and found nothing on EU policy, so it does not retry, does not try alternative sources, and produces a synthesis that omits EU policy entirely. The final report looks comprehensive but has a gap that nobody catches until the customer asks about EU policy and the agent cannot answer. The wrong response on the other end is workflow termination: propagate the exception to a top-level handler that aborts the entire workflow, throwing away results from three other subagents on US, China, and India policy that completed successfully.

The correct response is structured error propagation. The subagent returns partial_failure with failureType transient, attemptedAction carrying tool search_academic_db and query EU Renewable Energy Directive 2023 with date range 2022 to 2024, partialResults carrying the two successfully retrieved sources from EUR-Lex and a JRC Technical Report, alternativeApproaches listing retry with narrower date range 2023 to 2024 and search alternative database government_publications and use cached results from a previous session, and shouldRetry true.

The coordinator examines the failure type as transient with retry possible, checks partial results as two useful sources already retrieved, evaluates alternatives, and selects retry with the narrower date range. The retry succeeds and returns one more source. The synthesis output includes a coverage annotation stating section on EU renewable energy policy is well supported with three sources from EUR-Lex, JRC, and the academic database and noting that one transient retrieval failure during research was resolved by retrying with a narrower date range. The same failure with silent suppression would have produced a synthesis missing the EU section entirely and a coverage annotation would have exposed the gap by construction.

Distinctions that decide answers

ThisNot thisHow to tell them apart
Access failureValid empty resultAn access failure means the tool could not reach the source, such as timeout or permission denied, and the query did not execute. A valid empty result means the tool reached the source and found no matches. The first has isError true and shouldRetry true, the second has status success with empty results and shouldRetry false.
Silent suppressionWorkflow terminationSilent suppression hides the failure by returning empty results marked as successful. Workflow termination exposes the failure by killing the entire pipeline. Both are anti-patterns, silent suppression is worse because it is invisible. Structured propagation with partial results is the correct middle ground.
Local retry in the subagentCoordinator retryLocal retry is exponential backoff within the subagent handling transient failures before propagation. Coordinator retry is invoked after receiving a structured error and evaluating failure type, partial results, and alternatives. Local handles known transient patterns, coordinator handles novel recovery.
Transient failurePermanent failureTransient failures such as timeouts and rate limits resolve on retry. Permanent failures such as validation errors and permission denials will not resolve on retry and need a different intervention. The errorCategory and isRetryable fields distinguish them.
Coverage annotationSilent omissionA coverage annotation explicitly states which topic areas have gaps and why. Silent omission leaves the gap invisible, looking like the topic was not relevant rather than the source being unavailable.
Exponential backoff with jitterFixed delay retryBackoff with jitter increases wait times across retries and adds randomisation to prevent synchronised storms. Fixed delay uses a constant wait and produces synchronised load spikes on a recovering service.

Traps

Catch a timeout and return empty results marked as successful

The tempting answer. Return success with empty results to keep the workflow moving because that avoids error handling complexity.

Why it fails. Silent suppression prevents all recovery. The coordinator believes the search succeeded and found nothing, so it will never attempt alternatives. This is the worst anti-pattern because the gap is invisible and downstream synthesis silently omits an entire area.

What is correct. Return a structured error with status error, failureType transient, isRetryable true, and the partial results preserved, so the coordinator can retry or try alternatives.

Terminate the entire pipeline when one subagent times out

The tempting answer. Abort the workflow on any failure because that is the simplest failure handler to implement.

Why it fails. Workflow termination wastes partial results from subagents that completed successfully. A single transient timeout should not discard work from four other subagents.

What is correct. Propagate the structured error and let the coordinator make a targeted recovery decision such as retry with modified query or proceed with partial results.

Return a generic search unavailable status after retry exhaustion

The tempting answer. Return a generic failure message because it feels like enough detail for a failure.

Why it fails. Generic errors hide the query, partial results, and alternative approaches from the coordinator. Without structured context the coordinator cannot make an informed recovery decision.

What is correct. Include all four elements: failure type, attempted action, partial results, and alternative approaches, so the coordinator has actionable recovery options.

Retry a valid empty result because empty feels suspicious

The tempting answer. Treat any empty result as a failure that should be retried because empty looks like it might be wrong.

Why it fails. A valid empty result means the query executed successfully and found no matches. This is the answer. Retrying wastes time on a query that will always return nothing.

What is correct. Distinguish access failures where you retry from valid empty results where you do not, using the structured response fields isError and shouldRetry.

Propagate every transient failure immediately without local retry

The tempting answer. Skip local retry and propagate immediately because propagating feels faster than waiting for backoff.

Why it fails. Most transient failures resolve on the first or second retry. Propagating immediately floods the coordinator with recoverable errors that the subagent could have handled itself.

What is correct. Implement local retry with exponential backoff and jitter within the subagent and propagate only persistent errors that survive local recovery.

Assume a complete-looking synthesis means silent suppression is acceptable

The tempting answer. Accept silent suppression when the output looks complete because visible quality feels like enough.

Why it fails. The gap is invisible in the output but downstream consequences are severe, such as a customer asking about EU policy and the agent having no answer because the source was silently dropped.

What is correct. Require coverage annotations on every synthesis output so gaps are visible by construction, and verify that every topic area either has sources or an explicit gap note.

Going deeper than the task statement
Adjacent material that shows up in harder scenario questions.
isError, errorCategory, and isRetryable field conventions

errorCategory includes transient, permanent, auth, not-found, and validation, where not-found can mean genuinely absent or permission-masked absence and needs enough context for the coordinator to distinguish, and isRetryable drives the retry decision explicitly.

Tool Error Handling
Model downgrade and circuit breaker as complementary resilience

Model downgrade falls back from Opus to Sonnet to Haiku when a primary model returns repeated transient failures, and circuit breaker opens after a threshold, allows test requests after a cooldown, and closes on recovery to protect downstream services from cascading failures.

Fallback Patterns
Validation failure as a structured error with the same shape

When Claude output fails schema or semantic validation the pipeline returns a structured error with the validation message, the failed output, and a recommended fix, the same propagation discipline as tool errors.

Validation Pipelines
Build it
Prove structured propagation with partial results beats both anti-patterns
  1. Define a structured error schema with status success or error, failureType from transient, validation, business, and permission, attemptedAction with tool, query, and parameters, partialResults array, alternativeApproaches string array, and isRetryable boolean that rejects malformed errors.
  2. Implement a subagent that distinguishes access failures such as timeouts and connection errors reported with isError true, errorCategory transient, and isRetryable true from valid empty results reported with status success, empty results array, and isRetryable false, tested with the same input shape producing different outputs.
  3. Build local retry with exponential backoff and jitter for three retries at 1 second plus jitter, 2 seconds plus jitter, and 4 seconds plus jitter, preserving partial results across retries and propagating the final structured error with those results after exhaustion.
  4. Create a coordinator that examines failureType, checks partialResults, evaluates alternativeApproaches, and selects recovery: transient to retry with modified query, permission to immediate escalation, validation to query fix, and business to alternative approach, never silently suppressing.
  5. Add coverage annotations to synthesis output listing each topic area as well supported, limited with reason, or unavailable with reason, and simulate a timeout in one subagent to verify the coordinator preserves the partial sources, retries or escalates correctly, and the annotation for that section documents the recovery.

Verify. Transient timeouts are recovered with partial sources preserved, valid empties are respected as answers, and any remaining gap is visible in the coverage annotation rather than silently omitted.

Answer real questions on this task
8 exam-style questions written against the rules above. You get the reasoning and a note on every wrong option after each answer.
Task 5.414 min

Codebase Exploration and Context Degradation

Treat verbose exploration as a context quality problem and contain it with scratchpads, isolated subagents, and injected summaries.

What you need to know

Extended codebase exploration is one of the most context-intensive tasks a Claude-based agent performs, and it produces a specific failure mode that has nothing to do with running out of tokens. Context degradation is the model losing its grip on earlier findings as the conversation fills with verbose discovery output. It manifests as a concrete observable behaviour: the model starts referencing typical patterns instead of the specific classes, methods, and dependency chains it discovered earlier. After investigating several modules an agent might say this follows the typical repository pattern instead of the OrderRepository class at src slash repos slash order dot ts implements the Repository interface with custom caching in the findById method.

Context degradation happens because each exploration step generates verbose output such as file contents, search results, and directory listings that accumulates in the conversation context. Earlier precise discoveries are pushed further into the context while more recent verbose output dominates. The model's attention shifts to recent output and it loses specific references to earlier findings. The critical insight is that increasing the context window does not fix degradation. The model is not running out of space, it is losing track of specific details as they get buried under newer more verbose output. The fix is structural, not capacity based.

The primary mitigation is scratchpad files. The agent writes key findings to a file and references it for subsequent questions. This persists knowledge outside the conversation context and makes it immune to degradation. A scratchpad for codebase exploration typically captures three categories: key classes and their locations with class name, file path, and brief description, dependency chains stating which classes depend on which, and critical findings such as bugs, missing tests, and architectural concerns. The scratchpad is a deliberate strategy from the start of any extended exploration session, not a rescue move once things degrade.

Subagent delegation is the second major mitigation. Instead of the main agent doing all exploration directly and filling its context with verbose output from every file read and search, delegate specific investigation tasks to subagents such as find all test files for the order service and report their coverage status, trace the refund flow from API endpoint to database and list all intermediate services, and identify all external API integrations and their error handling patterns. Each subagent operates with its own isolated context, can explore verbosely without polluting the main agent's context, and returns a structured summary to the coordinator. The obvious reading is parallelisation for speed, the real value is context isolation. The main agent's context stays clean for high-level coordination while subagents handle the verbose exploration.

Summary injection between phases prevents the cold start problem when exploration happens in phases. Phase 1 might be understanding the architecture, phase 2 might be investigating specific components. Summarise key findings from Phase 1 before spawning Phase 2 subagents and inject those summaries into the initial context of Phase 2 subagents. Without injection Phase 2 duplicates Phase 1 exploration because it was not given the previous findings. The injection ensures Phase 2 agents have the architectural understanding needed to ask the right questions without rediscovering the system structure. The compact command in Claude Code provides API-level summarisation during extended sessions, use it proactively during exploration not only when hitting limits, because it protects context quality not only quantity. Crash recovery via structured state manifests is the resilience layer: each agent exports its current state to a known file location with what has been explored, key findings, current phase, next steps, and pending questions, so on resume the coordinator loads the manifest and the agent picks up where it left off.

Scratchpad discipline and what counts as a finding

The scratchpad file is a runtime discipline using ordinary file operations such as create, view, str_replace, and delete exposed through the file system API. A common shape is Markdown with explicit sections for key classes, dependency chains, and critical findings. The agent writes after each discovery and reads at the start of each subsequent step. The discipline fails if the scratchpad tries to hold the entire history verbatim, because that re-introduces the verbose output problem in a different file. Capture only specific findings the agent needs to reference across turns, not every intermediate step.

A scratchpad that captures everything is a history dump, a scratchpad that captures specific findings is a reference. The three categories keep the file lean: class name plus file path plus one-line description, dependency edges such as OrderService orchestrates OrderRepository and PaymentGateway, and critical findings such as RefundProcessor has no retry logic for Stripe failures or RefundProcessor test coverage 12 percent. When the agent at turn 16 reads the scratchpad, the specific identifiers are restored regardless of how much verbose output has accumulated since they were discovered.

Subagent delegation for isolation and summary injection between phases

Subagent delegation in Claude Code uses the Task tool with a focused role description and task prompt. The role should name the investigation target and the expected return format as a structured summary with key findings, file paths, and class names. The coordinator receives the summary without the verbose intermediate file contents and search results that would otherwise pollute its context. The primary benefit for codebase exploration is isolation, parallel execution is secondary and only available when investigations are independent.

Summary injection is the application-side mechanism that places Phase 1 findings into Phase 2 prompts. After Phase 1 the coordinator extracts key findings from the Phase 1 scratchpad and prepends them as a Phase 1 Summary section. The Phase 2 subagent receives both the architectural understanding and the specific investigation target so it does not need to rediscover system structure. Without injection the same files are read again, the same searches are run again, and API cost and time are wasted on duplication that also pollutes the new subagent's context.

Proactive compaction and crash recovery manifests

The compact command is invoked via slash command inside Claude Code and triggers conversation-level summarisation that preserves decisions, findings, and tool calls while discarding verbose intermediate output. Proactive use early and mid-session keeps attention on specific findings throughout, while reactive use only when context is nearly full is a last resort that may already have lost findings because verbose output pushed them into the middle where positional degradation applies.

The crash recovery manifest is a JSON file at a known location with sessionId, phase, exploredPaths as an array of file paths, keyFindings with architecture, criticalIssue, and testCoverage, and nextSteps as an array of pending targets. On resume the coordinator reads the manifest and injects the structured state into the agent's initial prompt. Upstream agents that return verbose reasoning chains rather than structured summaries defeat the same principle downstream: downstream agents with limited budgets cannot use verbose prose, so upstream agents should return key facts, file paths, and relevance scores that downstream agents can process without re-parsing.

Mechanism and API surface

Scratchpad file outside conversation context
Markdown file with sections for key classes, dependency chains, and critical findings, written after each discovery and read before each subsequent step, capturing specific class names and file paths not summaries or full history.
Subagent delegation for context isolation
Spawn focused subagents with a specific investigation task and expected structured summary format. Each runs in its own isolated context and returns findings without verbose intermediate output. Primary benefit is isolation, speed is secondary.
Summary injection between phases
Extract Phase 1 findings from the scratchpad and prepend them as a Phase 1 Summary section in Phase 2 subagent prompts so Phase 2 starts with architectural context and does not re-explore.
Proactive compact command
Slash command that summarises the conversation preserving decisions and findings while discarding verbose output. Use proactively during extended sessions to maintain quality, not only reactively at the limit.
State manifest for crash recovery
JSON manifest at a known location with sessionId, phase, exploredPaths, keyFindings with architecture, criticalIssue, and testCoverage, and nextSteps, loaded on resume and injected into the agent's initial prompt.
Upstream structured summary over verbose reasoning
Upstream agents return key facts, file paths, and relevance scores rather than reasoning chains, because downstream agents with limited budgets cannot apply verbose prose and waste tokens re-parsing it.
Order service exploration that holds precise references across thirty turns
A production walkthrough with the reasoning chain made explicit.

A developer productivity agent is exploring an unfamiliar order service codebase for the first time. The exploration runs across multiple turns reading directory structure, examining main entry points, tracing the refund flow from API endpoint to database, and identifying external integrations. By turn 15 the agent's context contains roughly 80,000 tokens of file contents, search results, and intermediate reasoning.

When the developer asks what is the cache invalidation strategy in OrderRepository, the without-fix agent responds the repository follows typical caching patterns for performance. This is wrong in two ways: it is not the specific answer and it is the observable symptom of degradation where the model has lost the specific class name, file path, and method-level details. The earlier finding that cache invalidation is missing on status change is buried under more recent verbose output.

The fix uses three combined mitigations. The agent writes a scratchpad from the start and updates it after each step with OrderRepository at src slash repos slash order dot ts implementing Repository with custom findById caching and cache invalidation missing on status change, OrderService at src slash services slash order dot ts orchestrating OrderRepository and PaymentGateway, RefundProcessor at src slash services slash refund dot ts depending on OrderService dot getOrderWithItems with no retry logic for Stripe failures, and test coverage with OrderService 87 percent and RefundProcessor 12 percent. The agent also delegates specific investigations to subagents for external API integrations and refund flow tracing, each returning a structured summary with integration name, error handling pattern, and retry presence without verbose file contents. After Phase 1 the coordinator injects the high-level architecture summary of layered architecture from controllers to services to repositories to database into Phase 2 subagent prompts.

By turn 16 the agent reads the scratchpad and the specific class names and findings are restored. A comparison run shows the without-scratchpad agent degrades to generic references by turn 15 such as the typical repository pattern and external services usually use retries, while the with-scratchpad agent maintains specific identifiers throughout the session. A crash at turn 22 tests recovery: on resume the coordinator loads a manifest with phase 2, exploredPaths for three service files, keyFindings with layered architecture, critical issue of missing retry logic, and test coverage, plus nextSteps for PaymentGateway error handling and cache invalidation logic, and the agent continues from turn 22 without repeating earlier exploration.

Distinctions that decide answers

ThisNot thisHow to tell them apart
Context degradationToken limit exhaustionDegradation is the model losing track of specific findings as verbose output accumulates. Exhaustion is the request failing because it exceeds the window. Increasing the window does not fix degradation, restructuring context with scratchpads and isolation does.
Scratchpad fileConversation contextA scratchpad is a file on disk that persists across turns and sessions. Conversation context is the messages array that gets compressed and may be lost. The scratchpad is immune to degradation because specific references are stored outside the conversation.
Subagent delegation for isolationParallel execution for speedIsolation keeps the main agent's context clean for coordination and is the primary benefit for exploration. Parallel execution runs investigations concurrently for speed and is secondary, available only when investigations are independent.
Summary injectionCold startInjection places Phase 1 findings into Phase 2 prompts so they start with architectural context. Cold start gives Phase 2 no prior context and forces rediscovery of the system structure, wasting cost and polluting context.
State manifestScratchpad fileA scratchpad captures findings such as what was learned. A manifest captures process state such as what was explored, current phase, and next steps. The manifest answers where am I and what is next, the scratchpad answers what do I know.
Proactive compactReactive compact at the limitProactive compact during the session preserves context quality throughout. Reactive compact only when nearly full is a last resort that may have already pushed specific findings into the degraded middle.

Traps

Treat a scratchpad as a purely local convention with no supported surface

The tempting answer. Write findings to an ad hoc file path because the pattern is about discipline and any file will do.

Why it fails. There is a supported surface for exactly this, the memory tool, and it comes with a security requirement that an ad hoc implementation usually misses. The tool is client-side, so the model only requests operations and your handler executes them, which means your handler is the only thing standing between a requested path and the filesystem. A handler that does not reject paths escaping the memory directory is a traversal bug, not a scratchpad.

What is correct. Use the documented memory tool with a handler that contains every operation inside the memory directory, and treat the pattern as just-in-time retrieval rather than a private file convention.

Increase the context window to solve context degradation

The tempting answer. Use a larger window because more room for verbose output sounds like the direct fix.

Why it fails. Degradation is not about running out of tokens but about losing track of specific details as verbose output accumulates. A larger window still fills with verbose output and the lost-in-the-middle effect still degrades middle findings.

What is correct. Use structural fixes: scratchpad files and subagent delegation for isolation, not a larger window.

Assume subagent delegation is only about parallelisation

The tempting answer. Read delegation as a speed optimisation because parallel execution is the obvious benefit.

Why it fails. The primary benefit for codebase exploration is context isolation keeping the main agent's context clean for coordination. Speed is secondary and only present when investigations are independent.

What is correct. Delegate to keep the main context clean, and treat concurrency as a bonus when the investigations allow it.

Restart the session to fix degradation without saving state

The tempting answer. Restart because a fresh session feels like a clean fix for a degraded context.

Why it fails. Restarting loses all accumulated knowledge including specific class names, file paths, dependency chains, and critical findings the agent has discovered.

What is correct. Persist findings to scratchpad files and state manifests before restarting, then inject them into the new session so the agent picks up where it left off.

Use compact only when hitting context limits

The tempting answer. Treat compaction as a last-resort cleanup because the command feels like it should be saved for when space is tight.

Why it fails. By the time context is nearly full verbose output has already pushed specific findings into the middle where positional degradation applies.

What is correct. Use compact proactively during extended sessions to preserve quality throughout, not only when the window is nearly full.

Skip summary injection because Phase 2 can re-explore

The tempting answer. Skip injection because re-exploration is feasible and avoids wiring an extra step.

Why it fails. Re-exploration duplicates work of reading the same files and running the same searches, wastes API cost and time, and pollutes the Phase 2 subagent's context with output that should already be known.

What is correct. Extract Phase 1 findings and prepend them as a Phase 1 Summary section in Phase 2 subagent prompts.

Have the upstream agent return verbose reasoning chains to preserve context downstream

The tempting answer. Return verbose reasoning because more text feels more informative for the downstream agent.

Why it fails. Downstream agents with limited context budgets cannot use verbose reasoning and waste tokens re-parsing prose that could have been structured findings.

What is correct. Have upstream agents return structured findings with key facts, file paths, and relevance scores that downstream agents can process without re-parsing prose.

Going deeper than the task statement
Adjacent material that shows up in harder scenario questions.
Supervisor and worker with strict context separation and arbitration

Supervisor maintains coordination context of architecture, phase, and next steps while each worker runs isolated on a specific task and returns structured findings. When workers disagree the supervisor arbitrates via priority rules, timestamp ordering, or human escalation.

Multi-Agent Context Isolation and Coordination
Four recurring context management operations

Selection by relevance, recency, importance, or task, writing with structural formatting that survives positional degradation, compression by summarisation or extraction or eviction, and isolation by per-agent windows and role-based access to prevent cross-agent contamination.

Context Management and Orchestration
Coverage annotations as a visible gap pattern for synthesis

Synthesis output includes a structured section listing each topic area with its data quality status, where failed subagent topics are noted with failure type and alternatives, making gaps visible by construction rather than relying on consumers to notice them.

The Context Engineering Stack
Build it
Contain verbose exploration with isolation, persistence, and injected handoffs
  1. Build a coordinator that delegates specific codebase exploration tasks to subagents rather than doing all exploration in the main context, spawning each with a focused prompt such as find test files or trace the refund flow and expecting a structured summary return without verbose file contents.
  2. Implement scratchpad file management where the agent writes structured findings to a Markdown file with sections for Key Classes, Dependency Chains, and Critical Findings after each step and reads the file before each subsequent step, capturing specific class names and file paths not summaries.
  3. Build summary injection logic with a function injectPhase1Summary that prepends Phase 1 findings as a Phase 1 Summary section to Phase 2 subagent prompts so Phase 2 starts with architectural context and avoids rediscovery.
  4. Implement crash recovery via a JSON manifest with sessionId, phase, exploredPaths, keyFindings, and nextSteps, and verify that on simulated crash and resume the coordinator loads the manifest and injects the state into the agent's initial prompt.
  5. Run an extended exploration across ten or more modules twice, once without scratchpads where the agent degrades to generic references by turn 15 and once with scratchpads where it maintains specific identifiers throughout, and use compact proactively at turn 10 and turn 20 to measurably reduce token count while preserving specific findings via the scratchpad.

Verify. The main context stays clean for coordination, precise references survive the full session and a simulated crash, and verbose output is confined to isolated subagent contexts without polluting downstream consumers.

Answer real questions on this task
8 exam-style questions written against the rules above. You get the reasoning and a note on every wrong option after each answer.
Task 5.516 min

Human Review and Confidence Calibration

Measure accuracy by document type and field, calibrate per-stratum confidence, and prioritise limited reviewer time by uncertainty.

What you need to know

Human review is the safety net for automated extraction and classification systems. The exam tests the allocation problem, not whether to use human review but how to allocate limited reviewer capacity to maximise accuracy while minimising cost. This requires understanding confidence calibration, the trap of aggregate metrics, and stratified sampling strategies. The most dangerous misconception is the aggregate metrics trap: a system reports 97 percent overall accuracy, the team celebrates, and management approves full automation for all high-confidence extractions. The problem is that the aggregate hides catastrophic failure rates on specific segments where errors have the highest business impact.

A system that extracts dates from standard invoices at 99.5 percent accuracy might extract dates from handwritten receipts at 60 percent, from scanned PDFs with poor OCR at 72 percent, and from international documents with non-standard formatting at 45 percent. The aggregate looks excellent because standard invoices dominate volume, but three document types have unacceptable accuracy hidden by the volume-weighted average. Automating high-confidence extractions on handwritten receipts at 95 percent confidence would let through errors at 40 to 55 percent rates. The rule is to always validate accuracy by document type and field segment before automating and never make automation decisions based on aggregate metrics alone. International invoices from new suppliers, handwritten receipts from field staff, and scanned historical documents for compliance are the canonical segments where aggregate approval fails.

Stratified random sampling is the ongoing verification mechanism. After validating by document type and field you need continuous verification because accuracy can drift as documents age, schemas change, or new edge cases emerge. Stratified random sampling means selecting a representative sample from each stratum defined by document type, confidence band, and field type and having humans verify it. The critical insight is that you must sample high-confidence extractions, not just low-confidence ones. Low-confidence items are already routed to human review while high-confidence items are automated. If the model develops a novel error pattern that affects high-confidence extractions, only stratified sampling that includes the high-confidence band will catch it. Sampling serves two purposes: ongoing accuracy measurement to confirm each segment maintains its validated rate over time, and novel error pattern detection to discover new failure modes that did not exist in the original validation set.

Field-level confidence calibration is the mechanism for converting raw model confidence into actionable routing decisions. The model can output confidence per field, for example vendorName with value Acme Corp at 0.98 and totalAmount at 0.72, but raw scores are not calibrated. A model that reports 0.95 confidence might actually be correct 88 percent of the time on certain field types or 99 percent on others. The score is relative not absolute. Calibration requires labelled validation sets with ground truth. Take documents with known correct extractions, run the model, compare its confidence scores to actual accuracy, and build a calibration curve by binning predictions by reported confidence and computing actual accuracy in each bin. The curve might show when the model reports 0.90 on date fields it is actually correct 94 percent of the time while 0.90 on amount fields means only 82 percent. Calibrated thresholds then drive routing where fields above the calibrated threshold route to automation with stratified sampling, fields below route to human review, and fields in the ambiguous zone route to prioritised review.

Reviewer capacity prioritisation is where system design matters most. Human reviewers are expensive and limited, so route the highest-uncertainty items first: low model confidence fields, extractions from ambiguous or contradictory sources, document types with historically poor accuracy, and fields where the model expresses multiple possible interpretations. Do not spread reviewer capacity evenly across all extractions, because even distribution wastes time re-verifying high-confidence items that the model handles well while leaving insufficient capacity for the uncertain items that actually need judgement. The queue should be a dynamic priority queue ordered by uncertainty where the next item served is always the highest-uncertainty item remaining, not the next in chronological order, and when new extractions arrive the queue reorders dynamically. The validation sequence before automation is fixed in order: measure accuracy by document type and field segment not aggregate, calibrate confidence scores using labelled sets, set calibrated thresholds for automation versus review, implement stratified sampling for ongoing verification of automated extractions, and only then reduce human review on segments that demonstrate consistent validated accuracy. Skipping to the last step based on aggregate metrics is the trap and every step exists to prevent a specific failure mode.

Per-stratum accuracy, calibration curves, and routing thresholds

Aggregate accuracy is a single number across all documents, per-type and per-field accuracy is a matrix showing accuracy for each document type and each field type separately. The matrix exposes segment failures that the aggregate hides, and validation must use the matrix before any automation decision. Standard invoices at 99.5 percent on dates and handwritten receipts at 60.1 percent on dates can coexist inside a 97 percent aggregate, and the decision to automate must be made per cell not per aggregate.

The calibration module takes a labelled validation set and produces calibrated thresholds per field type per document type as a curve mapping confidence ranges to actual accuracy. For example 0.90 to 0.95 on date fields on invoices at actual accuracy 94 percent versus 0.90 to 0.95 on amount fields on invoices at 82 percent. Raw model confidence is not comparable across field types until it has been calibrated, and a single static threshold across all extractions lets through errors on segments where the same score means lower accuracy. Objective signals that complement calibration include self-consistency that runs the same prompt three times and escalates on disagreement, hedging detection that flags uncertain language such as I think or possibly, log-probability analysis that inspects token distributions, and meta-cognitive prompting that asks the model what it would need to verify before answering.

Stratified sampling that must include the high-confidence band

The stratified sampling function selects a representative sample from each stratum proportionally to its volume in the population, not uniformly. A stratum with 1,000 invoices at high confidence and 50 handwritten receipts at high confidence contributes samples at a 20 to 1 ratio, not 1 to 1. High-confidence sampling includes automated extractions in the verification sample, low-confidence-only sampling verifies only items already routed to human review. High-confidence sampling is what catches novel error patterns in automated extractions, low-confidence-only sampling misses them entirely.

Stratified sampling is a permanent feature, not a temporary verification step that ends after validation. As prompts, schemas, or routing logic change the golden dataset pattern provides regression testing for accuracy on canonical examples, while red-teaming deliberately constructs adversarial inputs that target known failure modes. Validation pipelines with schema, semantic, and business-rule stages produce structured errors that feed into the calibration data, and content filter pipelines handle appropriateness while confidence calibration handles accuracy, the two running in parallel with a structured routing decision.

Dynamic priority queue over even distribution

The review router implements a priority queue ordered by uncertainty. Items enter with their confidence scores and the queue orders them so the next item served is always the highest-uncertainty item remaining. When new extractions arrive the queue dynamically reorders and reviewers consume from the top, never in chronological order. Even distribution spreads reviewer time across all extractions, priority queue concentrates effort where judgement matters, and average handle time drops because reviewers spend time on items that need it rather than re-verifying easy high-confidence items.

The calibration loop is continuous, not a one-time setup activity. Accuracy drifts as documents age, schemas change, or new edge cases emerge, and calibration must be maintained via ongoing stratified sampling that captures novel patterns. Production-traffic calibration uses reviewer decisions on real extractions to adjust thresholds initially set from validation-set calibration. The detected_pattern field on each finding turns dismissal data into systematic improvement: patterns with high dismissal rates become candidates for prompt refinement, closing the extract to validate to refine loop.

Mechanism and API surface

Per-stratum accuracy matrix over aggregate
Accuracy measured by document type and field type as a matrix, not a single aggregate number. The matrix exposes segments such as international documents at 45 percent that a 97 percent aggregate hides, and automation decisions are made per cell.
Field-level confidence with calibration curves
Raw confidence per field from 0.0 to 1.0 is mapped to actual accuracy via binning on a labelled validation set, producing a per-stratum curve where 0.95 on a date field can mean 99 percent while the same score on an amount field means 56 percent.
Stratified sampling proportional to volume including high confidence
Sampling selects from each stratum defined by document type and confidence band proportionally to its volume, and must include the high-confidence automated band to catch novel error patterns there.
Dynamic priority queue ordered by uncertainty
Review backlog ordered so the next item served is always the highest-uncertainty item remaining. The queue dynamically reorders as new extractions arrive and reviewers never consume in chronological order.
Three-tier threshold plus validation sequence
Low confidence escalates immediately, medium routes to prioritised review, and high proceeds with stratified sampling. Sequence gates automation: measure by type and field, calibrate, set per-stratum thresholds, implement sampling, then reduce review only on validated segments.
Calibration maintenance and detected_pattern loop
Calibration is continuous via ongoing stratified sampling and production-traffic adjustment, and the detected_pattern field on findings with high dismissal rates identifies which prompts to refine next.
Extraction system where 97 percent aggregate hides three failing strata
A production walkthrough with the reasoning chain made explicit.

A financial operations team processes 50,000 vendor invoices per month. The report shows 97 percent overall accuracy and the team lead proposes automating all extractions where model confidence exceeds 95 percent to reduce review cost. The compliance officer investigates the per-type breakdown and reveals the aggregate trap: standard invoices at 99.5 percent on dates, 98.2 percent on amounts, and 97.8 percent on names, handwritten receipts at 60.1 percent on dates, 55.3 percent on amounts, and 71.2 percent on names, scanned PDFs at 72.4 percent on dates, 69.8 percent on amounts, and 80.1 percent on names, and international formats at 45.2 percent on dates, 52.1 percent on amounts, and 63.4 percent on names. The aggregate looks excellent because standard invoices dominate volume, but three types have unacceptable accuracy hidden by the weighted average. Automating high-confidence extractions on handwritten receipts at 95 percent confidence would let through errors at 40 to 55 percent rates.

The validation sequence proceeds in order. Per-type and per-field accuracy is measured across a labelled validation set of 5,000 documents covering standard, edge case, and adversarial examples with known correct extractions for date, amount, and name. Confidence scores are calibrated against the labelled set and reveal that 0.95 confidence on a standard invoice date field means 99.2 percent actual accuracy while 0.95 on an international invoice amount field means 56 percent. The same score means different things for different combinations. Calibrated thresholds are set per stratum so standard invoice dates at 0.90 calibrated confidence route to automation with 99 percent or higher accuracy while international amounts at 0.95 still route to human review because 56 percent is unacceptable for financial operations.

A 5 percent stratified sample is drawn from each stratum including high-confidence automated extractions proportional to volume and routed for ongoing verification. The reviewer queue is dynamically ordered by uncertainty so international amounts with 0.95 confidence outrank standard invoice dates with 0.99 confidence because the calibrated uncertainty is higher, and reviewers work top down where the greatest judgement is needed rather than re-verifying easy high-confidence items. Human review is reduced only on segments that demonstrate consistent validated accuracy over multiple sampling rounds, enforced as a workflow gate where a segment cannot be automated until all five steps have been completed and signed off.

Six months later per-type accuracy has improved measurably. International invoice amounts climbed from 56 percent to 71 percent after calibration data showed that amount extraction on international formats needed different few-shot examples. Standard invoice dates remained above 99 percent. Stratified sampling caught two novel error patterns that would have gone unnoticed with low-confidence-only sampling: a date format confusion on a new supplier's invoices and an amount extraction bug on credit memos. Without high-confidence sampling those automated errors would have reached downstream business processes before being caught.

Distinctions that decide answers

ThisNot thisHow to tell them apart
Aggregate accuracyPer-type and per-field accuracyAggregate is a single number across all documents such as 97 percent. Per-type and per-field is a matrix by document type and field type. The aggregate hides segment failures, the matrix exposes them. Validate by matrix before automating.
Stratified sampling proportional to volumeUniform samplingStratified selects proportionally to volume in each stratum, uniform selects the same number from each stratum regardless of volume. Stratified captures the actual error distribution, uniform can miss high-volume strata or over-sample low-volume ones.
High-confidence samplingLow-confidence-only samplingHigh-confidence includes automated extractions in the verification sample. Low-confidence-only verifies only items already routed to human review. High-confidence sampling catches novel patterns in automated extractions, low-confidence misses them entirely.
Raw model confidenceCalibrated confidenceRaw is the model's self-reported 0 to 1 score. Calibrated maps that score to actual accuracy via a per-stratum curve built from labelled data. Raw is unreliable for routing, calibrated is reliable.
Even reviewer distributionDynamic priority queueEven distribution spreads reviewer time across all extractions. Priority queue orders the backlog by uncertainty serving highest-uncertainty first. Even wastes time on easy items, priority concentrates judgement where it matters.
Static single thresholdCalibrated per-stratum thresholdStatic uses one cutoff across all extractions. Calibrated per-stratum uses different cutoffs per field-document combination. Static lets through errors on segments where the same score means lower accuracy.

Traps

Use 97 percent aggregate to automate all high-confidence extractions

The tempting answer. Cite the excellent aggregate and the concrete savings from automating the 95 percent confidence band because the number feels like proof.

Why it fails. Aggregate metrics hide per-type performance. 97 percent overall can mean 40 percent accuracy on specific document types such as handwritten receipts and international invoices, so automating that band lets through errors at very high rates on those segments.

What is correct. Validate by document type and field segment building a per-stratum accuracy matrix and gate automation per cell, never by the aggregate number.

Sample only low-confidence extractions for human review

The tempting answer. Focus sampling on low-confidence items because they carry apparent uncertainty and feel like the risky set.

Why it fails. Low-confidence items are already routed to human review. High-confidence items are automated and not otherwise reviewed. If a novel error pattern affects the automated band, only stratified sampling that includes high confidence will detect it.

What is correct. Sample from all confidence bands proportionally, including the high-confidence automated tier, as a permanent feature.

Use raw model confidence scores without calibration

The tempting answer. Route by raw 0 to 1 scores because they feel quantitative and actionable without extra work.

Why it fails. Raw scores are not calibrated. 0.90 on dates might mean 94 percent actual accuracy while 0.90 on amounts means only 82 percent. Using raw scores treats them as comparable across field types when they are not, so the same threshold means different risk per field.

What is correct. Calibrate using labelled validation sets and build per-stratum confidence curves, then set per-stratum thresholds from those curves.

Spread reviewer capacity evenly across all extractions

The tempting answer. Distribute evenly because equal distribution feels fair and simple to operate.

Why it fails. Even distribution wastes time re-verifying high-confidence items the model handles well while leaving insufficient capacity for uncertain items that actually need human judgement.

What is correct. Use a dynamic priority queue ordered by uncertainty serving highest-uncertainty items first and reordering as new extractions arrive.

Treat calibration as a one-time setup activity

The tempting answer. Calibrate once on the initial labelled set and consider the thresholds settled because the initial validation felt thorough.

Why it fails. Accuracy drifts as documents age, schemas change, or new edge cases emerge. A one-time calibration becomes stale and novel patterns go uncaught.

What is correct. Maintain calibration continuously via ongoing stratified sampling that captures novel error patterns and adjust thresholds from production-traffic outcomes.

Assume automation can fully replace human review on validated segments

The tempting answer. Remove human review entirely on segments that previously validated well because the numbers look excellent and the savings are immediate.

Why it fails. Novel error patterns can emerge even on previously excellent segments, such as a new supplier date format or a credit memo structure the validator has not seen.

What is correct. Keep stratified sampling of automated extractions as a permanent guard, with a gated sequence that requires measurement, calibration, thresholds, and sampling before review is reduced on any segment.

Going deeper than the task statement
Adjacent material that shows up in harder scenario questions.
Objective confidence methods over self-report

Self-consistency checks, hedging detection, log-probability analysis, and meta-cognitive prompting that asks what would need to be verified are each more reliable than asking the model to rate itself.

Confidence Scoring and Uncertainty Handling
Golden dataset, red-teaming, and stratified metrics for evaluation

A golden dataset with expected outputs guards regression across prompt or schema changes, red-teaming deliberately targets known failure modes, and stratified metrics reports expose per-type and per-field results rather than a single aggregate.

Testing AI Systems
Multi-stage validation pipeline that feeds calibration

Schema validation for structure, semantic validation for arithmetic and consistency, and business-rule validation for domain violations produce structured errors that feed into the confidence calibration data.

Validation Pipelines
Build it
Prove per-stratum calibration beats aggregate automation
  1. Create a mock extraction system that outputs field-level confidence per field for four document types of invoices, receipts, scanned PDFs, and international documents, with noticeably different confidence distributions where standard invoices report higher confidence and international and handwritten report lower.
  2. Build a labelled validation set of 200 documents with 50 per type and ground truth for date, amount, and name, covering standard, edge case, and adversarial examples within each type.
  3. Implement a calibration module that bins predictions by reported confidence and computes actual accuracy per bin, producing a per-stratum curve where 0.90 confidence on standard invoice dates means 99 percent or higher while the same score on international amounts means roughly 80 percent.
  4. Build stratified random sampling that selects high-confidence extractions for ongoing verification, sampling proportionally across all document types and confidence bands including the high-confidence automated tier.
  5. Build a dynamic priority review router ordered by uncertainty that reorders as new extractions arrive and serves the next highest-uncertainty item to each available reviewer, never in chronological order, and enforce the five-step validation sequence gate before automating any segment.

Verify. Per-stratum measurement exposes the failing segments an aggregate hides, calibration makes the same confidence score mean different routing per field, and the priority queue concentrates limited reviewers where misrouting would be most expensive.

Answer real questions on this task
8 exam-style questions written against the rules above. You get the reasoning and a note on every wrong option after each answer.
Task 5.616 min

Information Provenance and Multi-Source Synthesis

Carry five-field claim-source mappings through every merge, preserve conflicts with both values, and render by content type so gaps are never mistaken for relevance.

What you need to know

Information provenance, knowing where every claim comes from and how confident you should be in it, distinguishes a research system that produces trustworthy outputs from one that produces plausible-sounding fiction. The exam tests how attribution survives or dies through multi-agent synthesis pipelines, how to handle conflicting sources, and how temporal context prevents false contradictions. Without provenance the final output cannot be verified, cited, or audited, and without deliberate preservation the pipeline destroys it on first paraphrase.

Every finding in a multi-agent research system must carry its provenance as a structural guarantee, not optional metadata. Each finding must include five elements: the claim as the specific assertion, the source URL where the information was found, the document name as the title of the source document, the relevant excerpt as the specific passage that supports the claim, and the publication date when the source was published or the data was collected. Without all five the finding cannot be verified. The application should reject findings with missing fields at the source so discipline holds.

The critical challenge is that attribution dies during summarisation. When a synthesis agent combines findings from multiple subagents it naturally compresses and paraphrases. Without explicit instructions to preserve claim-source mappings the synthesis produces statements such as investment in renewable energy has grown significantly with no amount, no source, and no date. The information was correct but the attribution was destroyed. Downstream agents must explicitly preserve and merge claim-source mappings through synthesis: subagents output findings in the structured claim-source format, the synthesis agent is instructed to maintain those mappings when combining findings, and the final output includes inline citations or a structured reference section that traces each claim to its source.

Conflict handling is the second critical pattern. When two credible sources report different statistics for the same measure the wrong approach is to arbitrarily select one value. Selecting the more recent source, averaging the values, or picking from the more authoritative publisher all destroy information and present false certainty. Source A reporting 12 percent growth and source B reporting 8 percent are both credible and the difference may reflect different reporting periods or methodological approaches. The correct approach is to annotate with both values and full source attribution letting the consumer decide, such as market growth estimates vary by source with 12 percent from the IEA World Energy Report published June 2024 using 2023 calendar year data and 8 percent from the Bloomberg NEF Annual Review published March 2024 using July 2022 to June 2023 data, with a note on the possible explanation.

Temporal awareness explains many apparent conflicts and is the third pattern. Different publication dates explain different numbers without contradiction. Source A published 2023 reporting 8 percent growth and source B published 2024 reporting 12 percent are not contradictory but a trend where growth accelerated. Require publication and data collection dates in all structured outputs, because without temporal context valid trends get misread as data quality issues and the synthesis agent may incorrectly flag or suppress findings that are actually consistent. Content-appropriate rendering completes the discipline: financial data is best as tables where numbers, comparisons, and trends are scannable, news and current events read naturally as prose for narrative and cause and effect, and technical findings are clearest as structured lists for hierarchy. Synthesis should not flatten everything into a uniform format, and attribution preservation through every step from research to analysis to synthesis to report generation must be explicitly required in the synthesis agent's prompt with coverage annotations that mark well supported, limited, conflicting, and unavailable areas.

The five-field mapping and the synthesis merge that preserves it

The structured claim-source mapping is a JSON object with five required fields: claim, sourceUrl, documentName, relevantExcerpt, and publicationDate preserved as an ISO 8601 string. The schema should be enforced at the boundary where subagent findings enter the pipeline, rejecting any finding with a missing field so provenance discipline holds at the source rather than being recovered later.

The synthesis merge takes two arrays of claim-source mappings and returns a unified array where every original mapping is preserved. Related findings are grouped by topic but source attribution is not collapsed, so each merged topic carries the union of its source mappings and every claim remains traceable to its origin. The prompt must contain an explicit instruction that every claim in the output must be traceable to a specific source and that mappings are preserved through the merge process, because summarisation actively destroys attribution unless instructed otherwise.

Conflict preservation with full attribution and temporal grouping

The conflict handling schema extends the mapping with detection and resolution fields. A typical conflict object carries field name, conflictDetected true, a values array with each entry holding value, source, and context such as audited financial statements for fiscal year ending December 2023 versus preliminary unaudited figures for calendar year 2023, and a possibleExplanation field noting likely reasons such as audited versus preliminary or different reporting periods or methodology. Completing analysis with conflicts intact is the rule: the analysis agent returns the structured conflict without resolving it, because the resolution decision belongs to the coordinator or consumer with full information.

Publication dates make correct interpretation possible by distinguishing a trend from a contradiction and by enabling a changelog-aware synthesis pattern where a newer changelog supersedes older documentation. The synthesis merge groups findings by date when temporal context matters, surfacing trends across publication periods rather than treating different dates as conflicting. Coverage annotations close the output with each topic area marked as well supported where multiple sources agree, limited with single source or partial coverage, conflicting where both values are preserved with attribution, or unavailable where no source was retrieved, with failed topics explicitly noting the failure type and attempted alternatives.

Content-appropriate rendering and per-source attribution

Financial data renders as tables with columns for year, value, source, and publication date so comparisons are immediate. News findings render as prose paragraphs for narrative context and chronological development. Technical findings such as architectural patterns, API specifications, and configuration options render as bulleted or numbered lists with clear hierarchy. A rendering function can detect content type by topic label or schema marker and apply the appropriate format, which the exam tests by checking that synthesis does not flatten everything into one format that degrades comprehension.

Per-source attribution extends beyond RAG findings to the six context sources: external knowledge carries source URLs and publication dates, tools carry execution logs and tool identifiers, memory carries storage location and retrieval timestamp, and state carries session identifier and update history. Evaluation adds a provenance check that periodically re-fetches a sample of cited sources and confirms they actually contain the claimed excerpts, catching citation drift where the synthesis agent has paraphrased away from the source, and a streaming protocol that includes citation markers inline so attribution is visible as synthesis arrives rather than only at the end.

Mechanism and API surface

Five-field claim-source mapping
Required fields of claim, sourceUrl, documentName, relevantExcerpt, and publicationDate as ISO 8601 string, enforced at ingestion so any finding with a missing field is rejected.
Synthesis merge that preserves every mapping
Merge function over two arrays of mappings that returns a unified array where the union of source mappings is preserved per topic and no mapping is discarded without explicit handling. Grouping by topic never collapses attribution.
Conflict preservation not resolution by the synthesis agent
When values overlap and disagree return a conflict object with conflictDetected true, values array carrying both entries with full attribution and context, and possibleExplanation, and let the coordinator or consumer decide. Averaging or picking one value destroys information.
Temporal context and changelog-aware grouping
Publication and data collection dates distinguish a trend from a contradiction and allow grouping by date to surface trends. A newer changelog supersedes older documentation and both are presented with dates rather than treating the older as authoritative.
Content-appropriate rendering
Financial data as tables, news as prose, and technical findings as structured lists, selected by content type so comparison, narrative, and hierarchy each use the format that maximises comprehension.
Coverage annotation and inline citation during streaming
Synthesis closes with well supported, limited, conflicting, or unavailable per topic, and streaming includes citation markers inline so attribution is visible as synthesis arrives, not only at the end.
Global investment synthesis where two sources disagree and both values survive
A production walkthrough with the reasoning chain made explicit.

A multi-agent research system produces a synthesis report on global renewable energy investment. Two research subagents operate in parallel. Subagent A investigates IEA and OECD datasets. Subagent B investigates Bloomberg NEF and Wood Mackenzie datasets. Both output findings in the structured claim-source format with all five fields.

Subagent A returns global renewable energy investment reached 495 billion in 2023 from the IEA World Energy Investment Report 2024 published 2024-06-15 with excerpt total investment reached approximately 495 billion in calendar year 2023 representing a 17 percent increase over 2022, and investment growth has averaged 14 percent since 2020 with its excerpt. Subagent B returns 478 billion in 2023 from the Bloomberg NEF Annual Review 2024 published 2024-03-20 and growth averaged 11 percent since 2020 with its excerpt. The values differ slightly and the naive synthesis would pick one, average them, or pick the more recent publication, each of which destroys information.

The correct synthesis preserves both values with full attribution and explains the likely difference as different methodologies or coverage of technology categories. A financial data section renders as a table with columns for source, year, investment in billions, growth rate, and publication date, with one row for 495 at 14 percent from IEA on 2024-06-15 and one row for 478 at 11 percent from Bloomberg NEF on 2024-03-20. The table makes the difference immediately visible and each row carries its source and date.

A prose section follows the table and states investment growth estimates vary by source and restates each figure with its report name, publication month, and methodology note such as using calendar year 2023 data, then notes that both sources agree on the directional trend that investment is growing significantly above historical averages. Coverage annotations close the report with global renewable energy investment as well supported with two credible sources and slight disagreement, regional breakdown as limited with single source coverage from IEA, and technology-specific investment as unavailable where no subagent retrieved data in the session. A verifier walks the synthesis output, extracts every claim, looks up its citation, and confirms the citation contains the original source URL, document name, and publication date, with all claims passing and no claim paraphrased away from its source.

Distinctions that decide answers

ThisNot thisHow to tell them apart
Structured claim-source mappingFree-form prose findingA mapping is a JSON object with five required fields. Free-form prose is unstructured text with no traceable attribution. Structured mappings survive summarisation, free-form prose loses attribution on first paraphrase.
Arbitrary selection of one valueAnnotated both values with preservationArbitrary selection picks the more recent, more authoritative, or averaged value and discards the other. Annotated preservation keeps both values with full attribution. Selection destroys information, preservation lets the consumer decide.
Conflict explained by different datesTrue contradictionA conflict explained by different publication or measurement dates is a temporal trend not a data quality issue. A true contradiction is two sources reporting different values for the same measure and time period. Temporal context prevents false contradictions.
Financial data as a tableFinancial data as proseTables make numbers, comparisons, and trends scannable. Prose paragraphs bury numbers in sentences and make comparison harder. Tables are the appropriate rendering for financial data, prose is not.
Inline citationEnd-of-document referenceInline citations place the source immediately after the claim. End references require the reader to scan back. Inline preserves proximity between claim and source, end references lose proximity during reading.
Synthesis merge with mappings preservedSynthesis merge without mappingsMerge with mappings preserves every claim-source mapping through combination. Merge without mappings collapses findings into summary text and destroys attribution. The prompt must explicitly require mapping preservation.

Traps

Ask the prompt to preserve citations when the API can enforce them

The tempting answer. Instruct the model to cite every claim, because the mapping is application data and prompting is the flexible tool that works everywhere.

Why it fails. For content that enters the request as a document or a search result, the API owns the claim-to-source binding and does it better than an instruction can. Enabling citations makes the API return structured citation objects whose supporting passage is guaranteed to point into the document you supplied, and that passage does not count toward output tokens. A prompt-produced citation is generated text and can be plausible rather than valid.

What is correct. Enable citations on document blocks and use search result blocks with their required source and title for internally retrieved content, then use application-side mappings only for content that arrives some other way. Keep carrying attribution through your own multi-step merge either way, since nothing stops a later synthesis step from paraphrasing a citation away.

Select the most recent source when two credible sources conflict

The tempting answer. Pick the newer publication because recency feels like reliability and produces a single clean answer.

Why it fails. Arbitrarily selecting one value destroys information and presents false certainty. The difference may reflect different reporting periods or methodologies that the consumer needs to see.

What is correct. Annotate both values with source attribution, publication dates, and a possible explanation, letting the consumer decide how to interpret the difference.

Treat different numbers from different sources as contradictions

The tempting answer. Flag conflicting numbers as a data quality issue because they look inconsistent on the surface.

Why it fails. Different publication or data collection dates often explain different numbers as a trend. Without dates a 2023 report at 8 percent growth and a 2024 report at 12 percent look contradictory, with dates they show acceleration.

What is correct. Require dates in structured outputs and group findings by date when temporal context matters so the trend is visible.

Allow the synthesis agent to paraphrase without preserving claim-source mappings

The tempting answer. Let the synthesis agent paraphrase because paraphrasing feels like summarisation and keeps the output concise.

Why it fails. Attribution dies during paraphrasing. The synthesis produces statements like investment has grown significantly with no amount, no source, and no date, even though the subagent had all three. Downstream output becomes untraceable plausible text.

What is correct. Require the synthesis agent to explicitly preserve and merge claim-source mappings through every combination step and verify that every claim in the final output is traceable to a source.

Render all content types in a uniform format

The tempting answer. Use a single format such as all prose or all tables because uniform rendering feels consistent.

Why it fails. Different content types benefit from different formats. Financial data is best as tables for comparison, news reads naturally as prose for narrative, and technical findings are clearest as structured lists. Flattening degrades readability and comprehension.

What is correct. Select table, prose, or list based on content type and detect the type by topic label or schema marker before rendering.

Resolve conflicts during synthesis rather than preserving them

The tempting answer. Resolve the conflict in the synthesis step because producing a definitive answer feels more helpful than preserving ambiguity.

Why it fails. The synthesis agent does not have the context to resolve conflicts such as different methodologies, different reporting periods, or different coverage. Resolution belongs to the coordinator or consumer with full information.

What is correct. Complete analysis with conflicts intact, returning a structured conflict object with both values, both sources, both dates, and a possible explanation, without silently picking one.

Assume the synthesis agent will preserve attribution by default

The tempting answer. Trust that preservation is the natural behaviour because the subagents provided structured mappings.

Why it fails. Summarisation and paraphrasing actively destroy attribution unless explicitly instructed to preserve it. Without an explicit instruction the synthesis output becomes untraceable on first paraphrase.

What is correct. Add an explicit instruction to the synthesis prompt that every claim must be traceable to a specific source and that mappings are preserved through the merge process.

Going deeper than the task statement
Adjacent material that shows up in harder scenario questions.
Verifiability principle and changelog-aware synthesis

Mappings must enable verification that the excerpt actually supports the claim, and when two sources describe the same subject at different times the synthesis presents both with dates and explains how the newer changelog supersedes the older documentation.

Retrieval-Augmented Generation
Per-source attribution for the six context sources

External knowledge carries source URLs and publication dates, tools carry execution logs and tool identifiers, memory carries storage location and retrieval timestamp, and state carries session identifier and update history for end-to-end provenance.

Context Sources: A Six-Level Taxonomy
Evaluation, audit trail, and inline streaming citations

Periodic re-fetch verifies that excerpts still support claims to catch citation drift, an audit trail logs input mappings and merge operations for post-hoc verification, and streaming includes citation markers inline so attribution is visible as synthesis arrives.

Context Evaluation, Observability, and Governance
Build it
Prove provenance survives from subagent to synthesis to rendered output
  1. Define a structured claim-source mapping schema with five required fields of claim, sourceUrl, documentName, relevantExcerpt, and publicationDate and reject any finding with missing fields at the source.
  2. Implement two research subagents that each return arrays of claim-source mapping objects with all fields populated in ISO 8601 date format, each researching a different aspect of the same topic with publication dates included.
  3. Build a synthesis agent that merges findings from both subagents while explicitly preserving all claim-source mappings through the merge, combining related findings under topic headings but maintaining inline citations or a reference section linking each claim to its source URL, document name, and publication date without discarding any mapping.
  4. Handle conflicting sources by annotating both values with full attribution and possible explanations via a conflict object with conflictDetected true, values array, and possibleExplanation, never silently picking one value.
  5. Implement content-appropriate rendering that detects content type and renders financial data as tables with year, value, source, and publication date columns, news as prose paragraphs, and technical findings as bulleted lists, then verify end to end by walking the final output and confirming every claim traces to its original source URL, document name, and publication date.

Verify. Every claim in the final output traces to a source URL, document name, and publication date, conflicts preserve both values with explanation, and each content type renders in the format that maximises comprehension while gaps are marked rather than silently omitted.

Answer real questions on this task
8 exam-style questions written against the rules above. You get the reasoning and a note on every wrong option after each answer.
Context Management and Reliability exam
9 questions, the same number this domain contributes to the real 60-question paper. Drawn fresh from a larger pool each attempt, so a retake is a different paper. You can reveal the answer to any question while taking the exam, which locks that question. Otherwise answers stay hidden until you submit.
Cross-cutting decision table
DecisionChoose thisOver thisWhy
How to shrink a long conversationSummarise only narrative around a protected facts block, or clear old tool results once they have served their purposeCompressing the transactional payload with the narrativeAbstractive summarisation destroys amounts, dates, and identifiers that the block preserves by being excluded from compression.
Where to keep critical facts across long sessionsPersistent case facts block prepended to every promptProgressive summarisation of the history aloneAbstractive summarisation destroys amounts, dates, and identifiers that the block preserves by being excluded from compression.
Where to place critical content in a long inputKey findings at the very top, headers throughout, current question at the endCritical facts buried in the middle with an instruction to pay attention to everythingAttention is positional not instruction-driven, so top and end receive strong attention while middle is degraded.
How to shrink what tool results add to contextTrim each result to the fields the current task needs at the tool boundaryKeep the full result in case it is needed laterUntrimmed results persist through every subsequent turn and exhaust the budget even though only a few fields are ever relevant.
The same trade appears in every task: something that usually works against something that always works.
Why wrong answers keep looking correct
Progressive summarisation alone will manage a transactional history without losing critical facts. Abstractive summarisation systematically collapses amounts, dates, and identifiers into vague generalities that look reasonable but cannot drive correct action. The exam uses a multi-issue session to show the loss and expects the persistent facts block as the structural fix, not a better summariser.
Telling the model to pay attention to all parts of the context defeats the lost-in-the-middle effect. Positional attention is shaped by position not by intent. The model attends more reliably to the beginning and end regardless of instruction, so telling it to pay attention does not change the primacy and recency pattern. Placement at the top and end plus explicit headers is the fix.
Prompt caching eliminates the cost of a large system prompt so size no longer matters. Caching discounts repeat-call price to about 10 percent but does not reduce per-call attention footprint or the degradation that comes with a larger request. A 100K cached prompt still occupies 100K of attention budget every call, so size discipline under 10 percent still applies.
Managing a long conversation means writing your own summarisation loop, because history is application state. Server-side compaction is the documented primary strategy. The API triggers on measured input tokens at a threshold you set, defaulting to 150,000 with a floor of 50,000, generates a five-part continuation summary, and emits a compaction block that it then treats as the truncation boundary on later requests. When the bulk of the window is old tool output rather than dialogue, tool result clearing is the finer instrument. A hand-rolled loop reproduces all of that and typically gets token accounting wrong, because accumulated cache-read counts from server-side tool calls inflate a naive total and fire compaction far too early.
Preserving citations through synthesis is a prompting problem, so instruct the model to cite carefully. For content that enters the request as a document or a search result, the API owns the binding. Enabling citations returns structured citation objects whose supporting passage is guaranteed to point into the document you supplied and does not count toward output tokens, which a generated citation cannot guarantee. Prompt-preserved five-field mappings are the mechanism for content that arrives some other way, and application code still has to carry attribution across a multi-step merge in both cases.
Frustration or a low self-reported confidence score is a reliable signal to escalate to a human. Frustration measures emotional state not case complexity, and self-reported confidence is poorly calibrated and often confident on hard cases and hesitant on easy ones. The exam builds an agent that escalates simple frustrated cases while attempting complex calm ones to show the inversion, and expects explicit gap and inability criteria instead.
A larger context window fixes context degradation during codebase exploration. Degradation is verbose output burying precise class names and file paths under newer output, not exhaustion of capacity. A larger window still fills with verbose output and the same burying recurs. Scratchpad files and isolated subagents are the fixes, not capacity.
Returning empty results marked as success keeps the pipeline moving and is therefore safe. That is silent suppression, the worst anti-pattern, because the coordinator believes the search succeeded and found nothing and will never retry or try alternatives. The synthesis silently omits an entire area and the gap is invisible. Structured error propagation with partial results is the correct middle ground.
A 97 percent aggregate accuracy means the system is ready to automate high-confidence extractions. Aggregate hides per-type and per-field accuracy. Standard invoices at 99.5 percent can coexist with handwritten receipts at 60 percent and international documents at 45 percent inside the same 97 percent aggregate. Decisions must be made from the per-stratum matrix, not the aggregate.
When two sources report 12 percent and 8 percent for the same measure you should pick the more recent value or average them. Both values may be credible with different methodologies or reporting periods and temporal context often explains the difference as a trend. Selecting or averaging destroys information and presents false certainty. Preserve both with full attribution and possible explanation.
Last five minutes
Rules
  • If the history is summarised and the task is transactional, look for a persistent case facts block prepended to every prompt and excluded from compression. Summarisation without it is the trap.
  • If a fact is missed in the middle of a long context, look for positional placement with key findings at the top and current question at the end, not an instruction to pay attention to everything.
  • If a customer is frustrated, acknowledge and resolve when the issue is straightforward. Escalate only on explicit I want a human, a policy silence where the policy does not speak, and genuine inability after failed attempts.
  • If a name search returns multiple records, ask for an additional identifier. Never select by recency or activity regardless of how recent or active the record looks.
  • If a subagent times out, expect a structured error with failureType, attemptedAction, partialResults, and alternativeApproaches with isRetryable. Empty success is silent suppression and killing the pipeline is termination, both are wrong.
  • If a query returns empty, distinguish access failure where the query did not execute and should retry from valid empty where the query executed correctly and found no match and should not be retried.
  • If exploration output accumulates in a long session, isolate it behind a subagent or a scratchpad file so the coordinator keeps a lean context and can still cite specific class names and paths from findings written earlier.
  • If an aggregate accuracy number looks strong, split it by document type and field before trusting it, calibrate confidence thresholds on labelled data, and sample the high-confidence band for novel errors.
  • If two credible sources disagree, keep both values with full attribution and the publication dates instead of selecting one, and let the reviewer reconcile.
Trigger phrases

Look for summarisation versus persistent facts block, lost in the middle versus positional placement, caching at the end versus at the static to volatile boundary, sentiment versus explicit request and gap and inability, heuristic match selection versus clarification, empty success versus structured error with partial results, access failure versus valid empty, larger window versus scratchpad and isolated subagents, aggregate 97 percent versus per-stratum matrix, raw 0 point 95 confidence versus calibrated per field, even review distribution versus priority queue, paraphrased synthesis versus five-field mapping preserved through merge, single value picked versus both values annotated, and uniform prose versus content-appropriate tables and lists.

If you see X, think Y

If you see a multi-issue session where summarisation turns 247.83 on March 3rd into recent order, think protected facts block outside compression. If you see a 180K context where a policy buried in the centre is missed, think lost in the middle plus context rot and move key findings to the top. If you see volatile user message at index 0 and static system at index 1 with a cache marker at the end, think no hit because caching is prefix from index 0. If you see frustrated and confidence below 0 point 7 used to escalate, think inversion trap and choose explicit gap and inability criteria. If you see three John Smith records and most recent selected, think privacy violation and choose clarification. If you see results empty with status success after a timeout, think silent suppression trap and choose structured error with partial results and shouldRetry. If you see larger window proposed to fix typical repository pattern answers after ten files, think isolation and scratchpad not capacity. If you see high-confidence automated extractions excluded from sampling, think novel pattern missed. If you see investment reported as 495 billion with no source URL, document name, excerpt, or date, think attribution died and require the five fields through every merge.