CCA-P
CCA-P Expert Field Manual
Claude Certified Architect – Professional | Complete Concept-to-Expert Guide
One file. Everything. Built to take you from "I've seen the material" to "I can architect this, defend it in an interview, and pass the exam." Exam target: CCAR-P v1.0 (July 2026) · 63 items · 120 minutes · 720/1000 to pass Written for a senior infrastructure/DevOps practitioner — analogies are anchored to AWS, Kubernetes, Terraform, and SRE practice.
How to use this manual
This is not a summary. It is a teaching document. Every concept is presented in four passes:
| Pass | Marker | What it does |
|---|---|---|
| 1. The idea | plain prose | Explains the concept from first principles — why does this thing exist? |
| 2. The infra analogy | 🔧 Analogy | Maps it onto something you already run in production |
| 3. The table | tables | The compressed form you memorise |
| 4. The trap | ⚠️ Exam trap / 💀 Failure story | The way this gets tested and the way it breaks in real life |
Recommended study path:
Week 1 → Parts 0, 1, 2, 3 (foundations + Domains 1 & 2)
Week 2 → Parts 4, 5 (Domain 3 Integration + Domain 4 Eval — 35% of exam)
Week 3 → Parts 6, 7, 8 (Domains 5, 6, 7)
Week 4 → Parts 9, 10, 11, 12 (archetypes, interview drills, rapid revision)
Daily → Part 12 recall sheet — write it from memory, cold
If you only have 48 hours: Part 0 §0.4 (the 12 mental models) → Part 9 (scenario archetypes) → Part 12 (recall sheet). That is roughly 70% of the exam surface.
Table of Contents
- Part 0 — Orientation & The Mental Models
- Part 1 — Foundations: How Claude Actually Behaves
- Part 2 — Domain 1: Solution Design & Architecture (17%)
- Part 3 — Domain 2: Models, Prompting & Context Engineering (13%)
- Part 4 — Domain 3: Integration (19%)
- Part 5 — Domain 4: Evaluation, Testing & Optimization (16%)
- Part 6 — Domain 5: Governance, Safety & Risk (14%)
- Part 7 — Domain 6: Stakeholder Communication & Lifecycle (14%)
- Part 8 — Domain 7: Developer Productivity & Enablement (7%)
- Part 9 — Scenario Archetypes: 24 Pre-Solved Patterns
- Part 10 — Interview Preparation: 60 Architect-Level Q&A
- Part 11 — Glossary
- Part 12 — Rapid Revision & Cold-Recall Sheet
PART 0 — Orientation & The Mental Models
0.1 What this certification actually tests
The CCA-P is not a prompt-engineering exam and it is not an API-trivia exam. It tests one thing repeatedly:
Given a business situation with constraints, can you choose the architecturally correct option and explain the tradeoff you accepted?
Every question is a small consulting engagement compressed into a paragraph. There is always:
- a business context (industry, scale, users),
- a constraint (cost ceiling, latency SLA, regulation, team maturity),
- a symptom or a decision point,
- four options where two or three are defensible and one is best.
🔧 Analogy: It is exactly like an AWS Solutions Architect Professional question. "You have 40 microservices, a 3-second SLA, and a HIPAA obligation. Which design?" You're never picking between right and absurd — you're picking between "works" and "works, is cheapest to reverse, and survives the audit."
The exam facts
| Fact | Value | What it means for you |
|---|---|---|
| Items | 63 | ~1.9 minutes per item |
| Time | 120 minutes | Flag anything over 2.5 min, return at the end |
| Pass | 720 / 1000 scaled | Roughly 72–75% — you can afford ~15 wrong |
| Cost | $175 USD | Reschedule/cancel cutoff: 24h or forfeit |
| Format | Proctored, online or centre | Government photo ID, name must match exactly |
| Retakes | 14 → 30 → 90 day waits, 4 per rolling 12 months | Fee applies each time |
| Validity | 12 months, free on-time renewal (non-proctored) | Lapse = full retake, full fee |
Blueprint weights → item counts
| # | Domain | Weight | ≈ Items | Difficulty for an infra person |
|---|---|---|---|---|
| 1 | Solution Design & Architecture | 17% | 11 | Medium — pattern taxonomy is new, the reasoning is familiar |
| 2 | Claude Models, Prompting & Context Engineering | 13% | 8 | Hard — most Claude-specific, least transferable |
| 3 | Integration | 19% | 12 | Medium — auth/observability are your home turf; RAG & MCP are new |
| 4 | Evaluation, Testing & Optimization | 16% | 10 | Medium — it's SRE thinking applied to non-determinism |
| 5 | Governance, Safety & Risk Management | 14% | 9 | Easy-Medium — security layering you already do |
| 6 | Stakeholder Communication & Lifecycle | 14% | 9 | Easy — you live this as a manager |
| 7 | Developer Productivity & Enablement | 7% | 4 | Easy — platform engineering by another name |
Where your pass margin lives: Domain 2 (8 items) + the RAG/MCP half of Domain 3 (6 items) + Domain 4's eval methodology (6 items). That's ~20 items / 32% that will not come from your existing experience. Parts 3, 4, and 5 of this manual are deliberately the longest.
0.2 Question formats you will meet
Multiple choice (most common). One answer of four. Distractors are plausible. The wrong answers are usually: a real technique applied to the wrong problem, a detective control where a preventive one was needed, or a bigger/more-expensive version of the same thing.
Multiple response. "Select TWO." The question always tells you how many. Select exactly that many — no partial credit for selecting one.
Scenario matching. Several short scenarios, each mapped to the same small option set (e.g. prompt failure / hallucination / model mismatch). Options repeat. Never assume a one-to-one mapping — that assumption is deliberately punished.
0.3 The five elimination heuristics (use these when stuck)
These will win you 4–8 items you'd otherwise guess on.
1. Simplest sufficient pattern wins. If two options both solve it, the one with fewer moving parts is correct. "Multi-agent system" is almost never the answer to a problem with fixed, known steps. The exam rewards restraint.
2. Prevention beats detection beats compensation.
Ranked control quality:
remove the capability > authorize before the action > screen the output > log it for later > add a confirmation prompt
If an option says "log it so we can audit," and another says "remove the tool the role never uses," the removal wins.
3. Measure before you change. Any option starting with "investigate the traces / run the eval suite / analyse the distribution" beats any option starting with "rewrite the prompt / upgrade the model." Diagnose, then treat.
4. Instructions are not enforcement. If the scenario relies on the system prompt to enforce a security or authorization rule, that's the bug. The fix is always a deterministic control in code, never better prompt wording.
5. The business decides, the architect informs. On stakeholder questions, the right answer almost always involves presenting evidence and a tradeoff (including reversal cost) and letting the accountable person decide. Never "comply silently," never "escalate over their head," never "do it secretly."
0.4 The 12 mental models — the spine of the entire syllabus
If you internalise nothing else, internalise these. Every question in every domain is a projection of one of them.
Model 1 — Non-determinism is the root property
Claude predicts the next token. It is a probability distribution, not a function. Same input can produce different output. Everything else in this syllabus is a consequence of this one fact:
Non-determinism
├── you cannot unit-test it → so you build EVAL SUITES
├── you cannot trust it with authority → so you build AUTHORIZATION LAYERS
├── you cannot predict its cost → so you MODEL DISTRIBUTIONS, not averages
├── you cannot rely on its accuracy → so you build HUMAN-IN-THE-LOOP GATES
└── you cannot debug it by reading code→ so you build TRACES and DECISION LOGS
🔧 Analogy: You already manage non-deterministic systems — network latency, spot-instance interruption, eventual consistency. You don't fix these; you design around them with retries, budgets, and SLOs. Claude is the same class of problem, one layer up: the output content is probabilistic, not just the timing.
⚠️ Exam trap: "A demo ran cleanly five times." That is not evidence of determinism. Five clean runs on the happy path tell you nothing about the input population.
Model 2 — Decomposition comes before architecture
Before you pick a pattern, split the work three ways:
| Owner | Gets |
|---|---|
| Claude | Language understanding, summarisation, classification, planning, drafting, tool-mediated action |
| Existing systems | Anything already reliable and deterministic — the rules engine, the pricing service, the DB of record |
| Humans | Judgment calls, exceptions, approvals, anything irreversible and high-stakes |
The question is not "where can Claude help?" It is "where do Claude's four properties beat the system that already does this correctly?"
💀 Failure story — the £5,000 threshold. A team handed a deterministic rule ("escalate claims over £5,000") to the model instead of the rules engine. 41 of 14,000 claims misrouted because the input said "around five thousand". The rule was precise; the input wasn't. The model followed the letter, not the intent. A deterministic rule belongs in deterministic code.
The cheapest-adequate-executor ladder:
deterministic code → small model → large model → human
Assign each step to the leftmost box that can do it.
Model 3 — The three layers you must never conflate
| Layer | What it is | Examples | Chosen by |
|---|---|---|---|
| Entry point | What the human or system interacts with | Claude.ai, Claude Code, Claude Cowork, your custom app | The user and the nature of the work |
| Build-time interface | How the engineer programs against Claude | Direct API, SDKs, MCP, Agent SDK | The engineering team |
| Delivery route | Where the API traffic terminates | Anthropic first-party, AWS Bedrock, GCP Vertex, Microsoft Foundry | Cloud commitments & compliance |
🔧 Analogy: Entry point = the client (kubectl / console / your app). Build-time interface = the SDK or API you code against (boto3 vs raw REST vs Terraform provider). Delivery route = the region and account the call actually lands in. Three independent axes. Getting one right doesn't get the others right.
⚠️ Exam trap: Collapsing them into "it's all Claude." A question that says "the compliance team requires EU data residency" is a delivery route question, not a model question. A question that says "non-technical analysts need this" is an entry point question.
Model 4 — Context is a finite, budgeted resource
Everything Claude "knows" in a request is what is in the context window. Outside it, there is a hard edge — not degraded access, no access.
The window is a ceiling, not a target. Budget:
system prompt + tool definitions + retrieved context + conversation history + user message + output headroom + margin
🔧 Analogy: Think of it as a pod's memory limit. You don't size your workload at 100% of the limit — you size for the realistic peak plus headroom, or you get OOMKilled at the worst possible moment. Context exhaustion is the OOMKill of LLM systems.
The errors at the edge:
| Error | Meaning |
|---|---|
400 invalid_request_error |
Prompt exceeds the token limit |
413 request_too_large |
Request body exceeds the byte limit |
model_context_window_exceeded (stop reason) |
Generation hit the ceiling — output truncated mid-stream |
Lost-in-the-middle: recall is strongest at the beginning and end of context, weakest in the middle. Put critical instructions and top-ranked chunks at the head and tail.
Model 5 — Instructions are guidance; controls are enforcement
A system prompt is a strong suggestion. It is not a security boundary, not an ACL, and not an authorization check.
WEAKEST STRONGEST
system prompt → model-based screen → deterministic rule → capability removed
(steerable) (evadable) (brittle but hard) (not present)
🔧 Analogy: A system prompt is a README that says "please don't delete the prod bucket." A deterministic authorization check is an IAM deny policy. You would never ship the README as your security model. Same rule here.
⚠️ Exam trap: Any scenario where the safety property depends on the model choosing to comply. The answer is always: move it to a layer that doesn't ask the model's opinion.
Model 6 — The guarded request path has three control points
user input ──▶ [1 INPUT SCREENING] ──▶ MODEL ──▶ [3 TOOL-CALL AUTHORIZATION] ──▶ side effect
│
retrieved content ──▶ [1' SCREEN] ───────┤
tool outputs ───────▶ [1' SCREEN] ───────┘
│
└──▶ [2 OUTPUT SCREENING] ──▶ user
Three points, three different jobs, none of them substitutes for another:
| Point | Runs | Catches | Cannot catch |
|---|---|---|---|
| Input screening | Before the model call | Jailbreaks, prohibited requests, oversized input | Instructions arriving via retrieval/tools |
| Output screening | Before the response reaches the user | Toxic text, leaked fields, schema violations | Anything that already happened |
| Tool-call authorization | Before any side-effecting action | Unauthorized actions | Content quality |
💀 Failure story — the refund that already happened. A customer-service agent had an issue_refund tool and only output filtering. The model called the tool → the tool executed → money moved → then the output filter checked the text and passed it. Output screening judges text, not actions. A side-effecting tool needs authorization before it runs.
Model 7 — Fail closed for safety controls
An operator-built guardrail that errors and silently passes traffic is worse than having no guardrail — it provides the reassurance of protection with none of the protection.
| Fail open | Fail closed | |
|---|---|---|
| Behaviour on control failure | Traffic passes unscreened | Traffic blocked until healthy |
| When to choose | Never for safety controls | Always for safety controls — deliberately |
🔧 Analogy: It's a WAF in monitor-only mode that everyone believes is blocking. You'd rather return 503 than serve unscreened traffic.
Note: this applies to operator-built controls. Anthropic's built-in model safety behaviour is not operator-configurable and does not fail open.
Model 8 — Route human review by stakes, not by volume
Three variables set the stakes:
| Variable | Question |
|---|---|
| Reversibility | Can a wrong decision be undone? |
| Cost of wrong decision | What does the mistake cause if it isn't caught? |
| Confidence | The system's self-score — useful only if calibrated |
The rule (memorise verbatim):
Route to a person when low-confidence AND (irreversible OR high-cost). Let confident, reversible, low-cost decisions through.
Stakes (cost + reversibility) decide what needs review. Confidence decides how much volume you can safely let through. Confidence never changes the stakes.
💀 Failure story — consent fatigue. 400 items/day in a review queue, reviewer sees only the output and an Approve button — no inputs, no flag reason. Two independent failures: (1) routing by volume instead of stakes flooded the queue; (2) missing context made review meaningless. Review collapsed into rubber-stamping. Either failure alone is enough.
Reviewers must see three things: the inputs, the output, and why it was flagged.
Model 9 — Evals are your CI gate; without them you are shipping blind
If you cannot write an eval for a behaviour, you have no reliable way to know whether that behaviour is present.
Write the eval suite before the production code. It forces you to (a) state success measurably, (b) surface design assumptions while they're cheap to change, and (c) own a gate for every future change.
🔧 Analogy: This is your regression suite plus your SLO burn-rate alert, merged. You would not let a Terraform change reach prod without a plan and a test. A prompt change is a production change. A model version bump is a production change. Both go through the gate.
⚠️ Highest-risk state: evals that exist but are stale. They stay green while measuring behaviour that no longer exists. That is worse than no evals, because it produces confident false assurance.
Model 10 — Model the distribution, never the average
Token usage is heavy-tailed. Most requests are short; a small tail is enormous and consumes a disproportionate share of spend. Average-based cost models understate real cost by 2–3×.
Same for latency: design and alert on p95, never median. SLA breaches live in the tail.
🔧 Analogy: Identical to capacity planning. You've never sized an ASG on mean CPU. You size on p95/p99 and the burst profile. Apply the same instinct to tokens.
Model 11 — Reversal cost is the element everyone forgets
Every tradeoff presentation has three parts — and the third is the one that changes the meeting:
- What do we gain?
- What do we give up?
- What does it cost to reverse once the system is built around it?
- (regulated only) What does it do to our compliance posture?
💀 Failure story — "I approved a direction, not a number." An architect presented a context-strategy tradeoff accurately. The CTO asked the cost, heard "about four cents per call," and approved. Six weeks later: a five-figure monthly bill. Nobody had said "four cents × production volume" and nobody had priced the unwind. The presentation was accurate and the alignment was false.
Model 12 — A control without an owner and an evidence artifact is a claim, not proof
Choosing a compliant delivery route is a prerequisite, not compliance. Each obligation must become three things you own:
- A specific technical control that achieves the outcome
- A named owner accountable for it
- A living evidence artifact — signed agreement, config screenshot, authorization record, a log query that returns rows
💀 Failure story — residency drift. A team picked the compliant route and wrote the obligation→control map into a design doc. No owner, no wired logging. Months later a logging config change started writing request metadata to a second region. Nobody owned the residency control; no artifact tracked where data landed. It surfaced at audit. The control was real at design time and silently false in production.
🔧 Analogy: This is drift detection. A Terraform state file that says the bucket is private is not evidence the bucket is private. You need terraform plan to come back clean today, and someone whose job it is to look.
0.5 The one-page decision spine
When any scenario lands, walk this in order. It is the syllabus in execution order.
1. DECOMPOSE What does Claude own? What do existing systems own? What do humans own?
↓
2. FEASIBILITY Run it through the 4 properties. Verdict: feasible / feasible-with-constraints / not feasible.
↓
3. GOVERNANCE What regulation applies? Which routes/entry points does it ELIMINATE? (do this early — it removes options)
↓
4. PATTERN Simplest sufficient: augmented call → workflow → agent → multi-agent
↓
5. REFERENCE ARCH Name it: RAG / doc pipeline / triage-routing / coding agent / agent
↓
6. MODEL+CONTEXT Start Sonnet. Context strategy: monolithic / progressive / retrieval / compaction
↓
7. CONTROLS 3 guardrail points + fail-closed + human review by stakes
↓
8. EVALS Golden dataset + grading ladder + thresholds set BEFORE the run
↓
9. OBSERVABILITY Traces + metrics + anomaly detection + change attribution + business translation layer
↓
10. EVIDENCE Control register: obligation → control → owner → artifact
⚠️ Note step 3's position. Governance constraints eliminate options before you weigh preferences. If the workload touches PHI, the set of legal delivery routes shrinks before you've thought about latency at all. Exam questions frequently reward candidates who apply the constraint first.
PART 1 — Foundations: How Claude Actually Behaves
Before any architecture, you need an accurate model of the thing you're architecting around. Four properties. Each has a capability, a limitation, a mitigation, and an architectural consequence. This table is the source of a large fraction of Domain 1 and Domain 2 questions.
1.1 The four properties
Property 1 — Next-token prediction
What it is. Claude generates by predicting the most likely next token given everything before it. Fluency is the native output; factual precision is a side effect that usually holds and sometimes doesn't.
| Aspect | Detail |
|---|---|
| Strong at | Summarising, reformatting, explaining, translating, classifying, drafting |
| Weak at | Precision on specifics — names, dates, figures, identifiers, citations |
| Mitigate with | Citations back to source, uncertainty signalling, generator-verifier loops, structured output schemas, code execution for arithmetic |
| Architectural consequence | Output is non-deterministic → this is why eval frameworks exist |
⚠️ The critical corollary: Confidence is not validity. A hallucinated warranty clause reads exactly as authoritative as a real one. Nothing in the output signal distinguishes them. That is why grounding and verification are architectural, not cosmetic.
Property 2 — Knowledge
What it is. Claude knows what was common, consistent, and well-represented in training. It has a knowledge cutoff and no awareness of your enterprise.
| Aspect | Detail |
|---|---|
| Strong at | Common, well-documented, stable topics |
| Weak at | Rare, niche, contested, fast-changing, or proprietary topics |
| Mitigate with | Web search, RAG, tool calls, MCP — an external source of truth |
| Architectural consequence | Knowledge boundaries → this is why retrieval and tools exist |
The distinction that gets tested constantly:
| Use retrieval (RAG) | Use a tool call | |
|---|---|---|
| For | Stable knowledge — true yesterday, true tomorrow | Live state — the current value, owned by a system |
| Examples | Policy documents, contracts, manuals, standards, past reports | Order status, current inventory, account balance, today's price |
| Symptom of getting it wrong | Stale chunks; answers contradict the database; results shift after an index refresh | — |
⚠️ This is described in the source material as the #1 architectural mistake: using retrieval where a tool call belongs. If the data has an owning system and a current value, call that system.
Property 3 — Working memory
What it is. The context window is the entire working memory. There is no persistence between requests unless you build it.
| Aspect | Detail |
|---|---|
| Strong at | Anything inside the active context window |
| Weak at | Hard edge — outside the window there is no access, not degraded access |
| Mitigate with | Progressive loading, chunking, retrieval, summarising/compaction across turns |
| Architectural consequence | Context is a finite budget → this is why context strategy matters |
Useful conversions to have cold:
- ~1 token ≈ 0.75 English words
- an 80-page document ≈ 29k tokens
- a 300-page document ≈ 100–120k tokens
Property 4 — Steerability
What it is. How reliably Claude follows the instructions you give it.
| Aspect | Detail |
|---|---|
| Strong at | Short, concrete, verifiable instructions |
| Weak at | Abstract instructions, very long reasoning chains, precise computation |
| Mitigate with | Structured system prompts, output schemas, code execution, decomposition into smaller steps |
| Architectural consequence | Instructions can be talked around → this is why human-in-the-loop and runtime controls matter |
⚠️ The meta-lesson on all four: The four properties are present whether or not your architecture acknowledges them. Ignoring one doesn't remove it — it just means the failure arrives unmanaged, in production, at the worst input.
1.2 The seven primitives
These are the building blocks. The discipline: use the fewest primitives necessary. Each heavier primitive costs latency, tokens, and operational surface.
| Primitive | Its job | One-line definition |
|---|---|---|
| Tools | Act | A function the model can call to take an action or fetch a result |
| MCP | Connect | A protocol for exposing tools to many Claude clients in a standard way |
| Subagents | Isolate / parallelise | A scoped sub-task running in its own separate context |
| Hooks | Guarantee | Deterministic code that fires on an event — the model cannot skip it |
| Skills | Package a procedure | A versioned, reusable unit: instructions + optional scripts |
| Agent Teams | Coordinate peers | Multiple agents operating as coordinated peers |
| Dynamic Workflows | Compose at runtime | Assemble the sequence of steps at runtime rather than fixing it in advance |
🔧 Analogy:
- Tools ≈ a Lambda function you can invoke
- MCP ≈ a service mesh / standard API gateway contract — solves the N×M integration problem
- Subagents ≈ a Kubernetes Job with its own namespace and resource limits
- Hooks ≈ an admission controller / OPA Gatekeeper policy — it runs whether the workload likes it or not
- Skills ≈ a versioned Helm chart or Terraform module
- Agent Teams ≈ a set of peer microservices
- Dynamic Workflows ≈ a DAG built at runtime rather than a static pipeline definition
⚠️ Hooks are the one to remember for safety questions. When a scenario needs a guarantee — "this check must always run" — the answer is deterministic code at a hook, not an instruction in the prompt.
1.3 Entry points, build-time interfaces, delivery routes — the full detail
Entry points (chosen by the user and the work)
| Entry point | Audience | Key tradeoff |
|---|---|---|
| Claude.ai (Free / Pro / Max / Team / Enterprise) | Knowledge workers, no code | Zero build cost, but zero integration |
| Claude Code (terminal / IDE / desktop / web) | Engineers | Purpose-built for code; wrong tool for non-engineering work |
| Claude Cowork | Non-developers doing local file & task automation | Real system actions, but supervision overhead |
| Claude in Chrome | Workers anchored in web apps | Browser-scoped |
| Claude for Excel | Analysts, finance | Spreadsheet-scoped |
| Your custom application | Whoever you build for | Full control, full responsibility |
⚠️ Exam trap: Claude Code is for developers working on code. It is not the answer for a multi-user or customer-facing product, no matter how technical the users are.
Build-time interfaces (chosen by the engineering team)
| Interface | Use when | Tradeoff |
|---|---|---|
| Direct API | You need raw HTTP control over requests, retries, streaming, errors | Maximum control, maximum responsibility — you build the orchestration |
| SDKs (Python, TS, Java, Go, …) | Default for embedding Claude in an application | Ergonomics vs control; SDKs can lag new API features |
| MCP | The same tools are needed across multiple clients/hosts | Reusability vs an extra protocol layer to debug. Skip it if there's only one client. |
| Agent SDK | You want an agent loop embedded in your own product | Managed runtime (the same loop Claude Code uses) vs fine-grained loop control |
Three distinctions the exam likes:
- API vs SDK — same entry point, different ergonomics. The SDK is an opinionated wrapper over the API.
- MCP vs API tool use — MCP is a sharing convention across products; API tool use is tools in a single request. They are not alternatives; they solve different problems.
- Anthropic SDK vs Agent SDK — the plain SDK is a wrapper with no agent loop; the Agent SDK gives you a managed agentic runtime.
Delivery routes (chosen by cloud commitments and compliance)
| Route | Pick when |
|---|---|
| Anthropic first-party API | No cloud preference; you want the newest features first; consolidating spend with Anthropic |
| AWS Bedrock | Existing AWS enterprise agreement; stack already on AWS; need in-region execution |
| GCP Vertex AI | Running on GCP; ML stack already in Vertex |
| Microsoft Foundry | Microsoft EA, Entra ID, Azure footprint |
What does NOT change across routes: model behaviour, prompting technique, eval methodology, tool use, context window. What DOES change: model identifier strings, version strings, regional availability, CSP-side features. Timing: CSP-mediated routes typically lag the first-party API by weeks on new features.
⚠️ The residency trap that appears repeatedly: on Bedrock/Vertex, the global endpoint is the default and defaulting to it is the single most common way a data-residency requirement gets silently broken. Region must be configured explicitly.
⚠️ Microsoft Foundry nuance: hosting form matters. Hosted-on-Azure runs in the partner's Azure environment; Hosted-on-Anthropic runs on Anthropic infrastructure. Verify residency per route — do not infer it from the platform name.
1.4 Regulated-industry constraints — apply these FIRST
These rule options out before any performance or cost tradeoff is considered.
| Constraint | Rules out | What survives |
|---|---|---|
| Attorney–client privilege | Consumer Claude.ai for privileged material | API/SDK behind the firm's own gateway, so the firm owns the audit trail end to end |
| HIPAA (PHI) | Any route without a BAA for that specific configuration | API/SDK on a BAA-covered config; Bedrock; Vertex |
| GDPR / data residency | Any route where the region cannot be pinned | CSP route with region pinned + DPA in place |
| FedRAMP / government | Non-authorised cloud environments | Claude for Government, Bedrock GovCloud, Vertex Assured Workloads |
| Internal data-residency policy | Routes outside the approved vendor list | Whatever the CIO has cleared |
Three rules to memorise verbatim:
- BAA coverage is per-configuration, not per-vendor. A BAA covering one configuration does not extend to another. Beta features are generally excluded.
inference_geosupports"us"and"global". There is no EU pinning on the direct API — EU residency requires a cloud route.- "Excluded from training" ≠ "not retained." Data can be excluded from model training while still being retained for logging, abuse prevention, legal compliance, or configured audit. These are two distinct claims and collapsing them is a documented failure mode.
PART 2 — Domain 1: Solution Design & Architecture (17% · ~11 items)
What this domain is really asking: Given a business problem, can you pick the smallest architecture that actually solves it, and can you say why the bigger one is wrong?
2.1 The four decisions, in order
Every design in this syllabus is four decisions made in a fixed sequence. Making them out of order is the source of most bad architectures.
| # | Decision | The question it answers |
|---|---|---|
| 1 | Decomposition | What part of the work should Claude own at all? |
| 2 | Pattern selection | What shape is the work — single call, workflow, or agent? |
| 3 | Reference architecture | Can you name the architecture, or are you inventing one? |
| 4 | Entry point, model, context | Where does the work touch Claude, on which model, with what context strategy? |
⚠️ Governance cuts in before all of them. A compliance constraint can eliminate entry points and delivery routes before you have made a single performance tradeoff. Apply it first; it narrows the board.
2.2 Decomposition in depth
The delegation criteria
For each unit of work, ask three questions:
| Criterion | Question | If the answer is bad… |
|---|---|---|
| Reversibility | Can this be undone if it's wrong? | Irreversible → gate it or don't delegate it |
| Stakes | What does "wrong" cost? | High cost → human gate, or deterministic system |
| Accountability | Who answers for this when it's questioned? | If a person is accountable, they need to see and approve it |
The scoping sequence — four steps
- Business requirement → capability list. Name each capability separately. "Process claims" is not a capability; "extract claimant name," "validate policy number," "compute payout," "draft the letter" are four capabilities with four different feasibility profiles.
- Capability list → architecture sketch. Assign each capability to Claude / existing systems / humans.
- Architecture sketch → boundary conditions. Where does it work? Where does it stop working? (document length threshold, refresh cadence, language coverage, input format)
- Boundary conditions → scope in the SOW. Both parties understand what is in and what is out.
💀 Failure story — the scoping call that answered the wrong question first. An architect confirmed capability ("yes, Claude can analyse these documents") before gathering volume (800/day), input size (300 pages), and latency requirement (30 seconds). All three turned out to be disqualifying. The feasibility verdict is only as sound as the constraints gathered before it. Constraint questions precede the capability answer.
⚠️ Exam signature: any option that says "confirm we can do it, then work out the constraints" is wrong. Any option that says "gather volume, input size, and latency before answering" is right.
2.3 Feasibility: the four properties as a lens, and three verdicts
Run every use case through the four properties before giving any verdict.
| Property | The feasibility question | Where design compensates |
|---|---|---|
| Next-token prediction | Are the instructions specific, concrete, and verifiable? | Explicit schemas, structured outputs, code execution, evaluator-optimizer loops |
| Knowledge | Is the required knowledge in training, or does it live outside? | Retrieval, tool use, MCP |
| Working memory | Does the input fit the window? Is the corpus too large to preload? | Chunking, progressive context, a retrieval layer |
| Steerability | Can this task be precisely instructed? | Structured outputs, decomposition, code execution for precision |
The three verdicts
| Verdict | Meaning | What you must document |
|---|---|---|
| Feasible as scoped | All properties favour Claude; cost within ceiling; latency within SLA; no compensating control required | State the assumptions clearly |
| Feasible with constraints | Works under specific conditions — a document-length threshold, a refresh schedule, a human review gate | Document each constraint and its failure mode. The constraints are part of the architecture, not caveats |
| Not feasible | A property limitation cannot be compensated within scope or budget | Name the disqualifying constraint and the scope reduction that would change the verdict |
⚠️ "Not feasible" is a professional answer, not a failure. But it is only complete when you also name what would make it feasible. "No" without "here's what would change it" is not architecture, it's refusal.
2.4 Pattern selection — the core taxonomy
This is the highest-frequency Domain 1 topic.
The three primary patterns
| Pattern | Predictability | Autonomy | Use when |
|---|---|---|---|
| Augmented LLM call | High | Low | A single bounded task, verifiable output, no branching |
| Workflow | Medium | Medium | The shape is predictable; bounded model judgment inside each step |
| Agent | Low | High | The steps genuinely cannot be determined in advance |
The four workflow sub-patterns
| Sub-pattern | Shape | Use when |
|---|---|---|
| Chaining | Sequential — step 2 consumes step 1's output | Clear stage handoffs, each stage verifiable |
| Routing | A classifier decides which downstream path runs | Different input types need genuinely different handling |
| Parallelisation | Concurrent independent calls, results aggregated or voted | Sub-tasks are independent; you want to cut wall-clock time or get consensus |
| Evaluator–optimizer | Generate → evaluate → revise, in a loop | Quality is verifiable but a single pass isn't good enough |
🔧 Analogy: Chaining = a sequential Jenkins pipeline. Routing = a load balancer with path-based rules. Parallelisation = a fan-out/fan-in step function. Evaluator-optimizer = a build-test-fix loop with a quality gate.
The five-factor decision framework
This is the table to reason through, not just memorise.
| Factor | Augmented LLM | Workflow | Agent |
|---|---|---|---|
| Predictability risk | Low | Low | High |
| Error cost | Medium | Low — step guards contain failures | High — a bad decision propagates through the whole trajectory |
| Observability difficulty | Medium | Low — steps log like code | High — you get a transcript, and tooling is weak |
| Latency | Low | Medium — additive across steps | High — open-ended |
| Cost | Low | Medium — scales with step count | High — iterative, and context grows each turn |
The rule that settles most questions:
If you could have written the steps in code, use a workflow. Do not choose an agent because the task feels open-ended.
And the corollary: the tightest constraint wins. If any one of the five factors is critical (e.g. "every step must be individually auditable"), that factor decides the pattern regardless of the other four.
The escalation ladder — try the cheap thing first
prompt refinement
↓ (still failing?)
add tools / retrieval
↓ (still failing?)
stronger pattern (decompose into a workflow; add evaluator-optimizer)
↓ (still failing?)
fine-tuning ← genuine last resort
⚠️ Exam trap: when a prompt has already been refined twice and output is still inconsistent on a long multi-part task, the answer is decomposition into sequenced subtasks, not a bigger model, not more few-shot examples, and not a lower temperature. The failure signature — some items skipped, reasoning shallow — is a structure problem, not a capacity problem.
2.5 Multi-agent systems
When multiple agents are actually warranted
Only two justifications count:
- Distinct sub-tasks need genuinely different specialisations, tools, and context that would overload a single agent's prompt and tool catalogue.
- Independent sub-tasks can run in parallel to reduce end-to-end time.
⚠️ What does NOT justify multi-agent: high request volume (a scaling concern, solvable in any pattern), a large budget, or stakeholder appetite for sophistication.
Orchestrator and subagents — the division of labour
| Role | Owns | Never does |
|---|---|---|
| Orchestrator / supervisor | The goal: decomposes, delegates, sequences, synthesises, records outcomes, halts on exception | Sub-task work itself |
| Subagent | One scoped sub-task, in its own separate context, with its own scoped tools | Decide the overall plan |
Failure asymmetry — this gets tested:
| Failure | Recoverability |
|---|---|
| Subagent fails | Usually recoverable — retry, re-route, flag the gap |
| Orchestrator fails | Usually unrecoverable — the whole run fails |
The five multi-agent design rules
- Scope each subagent's tools to its own task — least privilege per worker.
- Shared trace ID across orchestrator and all workers — otherwise traces fragment and incidents cannot be reconstructed.
- Define recoverable vs unrecoverable failure boundaries explicitly before you build.
- Coverage check at synthesis — results returned MUST equal units dispatched. A silently dropped subagent output is the classic orchestration bug.
- Checkpoint gates before irreversible actions — and prefer plan-level review over per-step approval (per-step approval causes consent fatigue).
⚠️ When the requirement is "complete ordered audit trail" + "later stages must not run after an exception," the answer is a supervisor invoking specialists in sequence. Peer-to-peer handoffs make ordering and halting emergent rather than guaranteed; parallel execution violates the halt requirement outright.
2.6 The reference architectures
Don't invent architectures. Name one.
| Architecture | Underlying pattern | Primary failure mode |
|---|---|---|
| Agent | Agentic exploration | Non-deterministic failures somewhere in the trajectory |
| RAG | Retrieval-augmented generation | Retrieval applied to live state — the most common mistake |
| Document processing pipeline | Evaluator-optimizer | No exception path for low-confidence extractions |
| Customer service / ticket triage | Routing | Missing escalation path; unguarded tools |
| Coding agent | Agentic + deterministic edit/test/review loop | Unbounded tool use |
On combining architectures: combine them when different parts of the problem break differently. Do not combine them because you haven't yet decided what problem you're solving.
2.7 Business value alignment
The five value pillars
Every business justification maps to one of these:
| Pillar | Example measure |
|---|---|
| Efficiency | Hours saved per case, cost per transaction |
| Transformation | A workflow that was previously impossible now exists |
| Productivity | Throughput per person |
| Solution cost | Total run cost vs the incumbent process |
| Performance SLAs | Resolution time, response latency, availability |
ROI mapping — four steps
- Baseline in the business unit's own terms (analyst-hours per claim, days to resolution). From the business owner's operational data, never from intuition.
- Post-deployment state in the same unit — and include the human review cost if the design requires review.
- Subtract the run cost from the sizing model. Value = operational gain − recurring run cost.
- Payback period + sensitivity. How long to cover build + run? How does the number move if the assumptions are wrong?
The three ROI errors that get a business case rejected:
| Error | Consequence |
|---|---|
| Baseline estimated rather than measured | Finance rejects the case |
| Projection assumes full automation when the design mandates human review | Actual hours don't fall as promised |
| Run cost computed from the average rather than the distribution | Understates cost on heavy-tailed inputs |
Selecting the first use case
When an executive says "put AI across the whole business" and hands you twelve candidates, the selection driver is:
Measurable business value (cost, efficiency, or an SLA improvement) combined with feasible data access and manageable risk.
Not: the most impressive agentic showcase, not the most enthusiastic department, not the fastest to ship regardless of impact.
2.8 Feedback loops as an architectural component
A system with latency and cost dashboards but no way of knowing whether its outputs are correct is architecturally incomplete. The missing piece is the feedback stage:
input → processing → output → FEEDBACK → (back into the eval set)
Concretely: capture downstream corrections and user signals, and route a sample of production outputs into a labelled evaluation set.
⚠️ Distractors that look like solutions but measure the wrong thing: a token-consumption anomaly alert (monitors cost, not correctness), a weekly system-prompt review (monitors configuration, not correctness), a bigger model (changes the system without measuring anything).
2.9 Worked example — the contract review system
Scenario. A law firm wants Claude to review commercial contracts against an internal playbook. Documents live in iManage. Material is subject to attorney–client privilege. Sections of a contract are largely independent. Senior associates currently do this work.
The five decisions that hold together:
| Decision | Answer | Why |
|---|---|---|
| Entry point | Direct API/SDK behind SSO and the firm's approved gateway | Privilege requires the firm to own the audit trail end to end |
| Pattern | Parallelised workflow | Sections are independent — parallelisation cuts wall-clock time, and each section's output is individually verifiable |
| Decomposition | Claude extracts, classifies, drafts. The playbook is a versioned source of truth retrieved per clause. iManage handles document fetch. A senior associate is the final reviewer | Playbook in the prompt would go stale and be reprocessed on every call |
| Model & context | Sonnet as default; progressive context; extended thinking only where an eval justifies it | Opus everywhere is a cost failure with no measured benefit |
| Human-in-the-loop | Senior associate signs off; low-confidence clauses explicitly flagged | Irreversible professional advice — high stakes, accountability sits with a licensed person |
Why the plausible alternatives fail:
- Claude.ai for privileged material → privilege failure. A consumer-grade tool cannot carry the firm's audit obligation.
- Full playbook in the system prompt → it goes stale, and you reprocess the entire playbook on every single call.
- Open-ended agent → "flexibility" applied to work that decomposes cleanly. Adds cost, latency, and unobservability for nothing.
- Opus for every step → cost failure with no eval evidence that Sonnet is insufficient.
2.10 Domain 1 rapid drill
Cover the right column and answer.
| Situation | Correct move |
|---|---|
| Same steps every request, requirements stable | Fixed workflow |
| Path only emerges during execution | Autonomous agent |
| Long multi-part task, prompt already refined twice, items being skipped | Decompose into sequenced subtasks |
| Ordered audit trail required + halt on exception | Supervisor invoking specialists in sequence |
| Twelve candidate use cases, pick the first | Measurable value × feasible data access × manageable risk |
| Production classifications, no correctness signal | Feedback loop into a labelled eval set |
| Data changes daily, model must answer from it | Retrieval over the live source (not fine-tuning, not full paste) |
| One agent, 35 tools, 3 domains, tool selection degrading | Split into domain agents behind a router/supervisor |
| Two reasons to go multi-agent | Different specialisations/tools/context + independent parallelisable sub-tasks |
| Two reasons to stay with a fixed workflow | Steps known and identical per request + each step must be auditable and reproducible |
| Summarise an email with the customer record for context | Single augmented LLM call |
| Diagnose an incident where each log query determines the next | Autonomous agent |
| Merger review: legal + financial + technical specialists, one recommendation | Multi-agent system |
PART 3 — Domain 2: Claude Models, Prompting & Context Engineering (13% · ~8 items)
Why this domain is your hardest. Every other domain rewards general architecture instinct. This one requires Claude-specific mechanics — caching multipliers, model tiers, thinking modes, context strategies. There is no way to reason your way to "1.25× write, 0.1× read." You memorise it.
Good news: it's only ~8 items and the topics are narrow. Prompt caching alone is reliably worth 1–2 items.
3.1 The model lineup
⚠️ Verify at
platform.claude.comthe day before your exam. The exam guide states content tracks current documentation, and the lineup moves. The reasoning rules below are stable; the numbers are a snapshot (July 2026).
| Model | API ID | Input / Output per MTok | Context | Max output | Thinking | Best for |
|---|---|---|---|---|---|---|
| Claude Fable 5 | claude-fable-5 |
$10 / $50 | 1M | 128k | Adaptive (always on) | Hardest frontier work, long-horizon agents |
| Claude Opus 4.8 | claude-opus-4-8 |
$5 / $25 | 1M | 128k | Adaptive; effort param (default high, xhigh for coding/agentic) |
Complex reasoning, agentic coding, enterprise |
| Claude Sonnet 5 | claude-sonnet-5 |
$2/$10 intro → $3/$15 from 1 Sep 2026 | 1M | 128k | Adaptive (default on); no extended thinking | Production default — best speed/intelligence balance |
| Claude Sonnet 4.6 | claude-sonnet-4-6 |
$3 / $15 | 1M | 64k | Adaptive + extended | Prior production workhorse |
| Claude Haiku 4.5 | claude-haiku-4-5 |
$1 / $5 | 200k | 64k | Extended (budgeted) | Real-time, high-volume, cost-sensitive, subagents |
The two numeric facts to hold cold
PRICE LADDER: Haiku 1/5 → Sonnet 3/15 → Opus 5/25 → Fable 10/50
OUTPUT ≈ 5× INPUT at every tier
CONTEXT: 1M for Opus / Sonnet / Fable · 200k for Haiku
MAX OUTPUT: 128k (Opus/Sonnet 5/Fable) · 64k (Sonnet 4.6 / Haiku)
⚠️ Output is 5× the price of input at every tier. This single fact drives several optimisation answers: verbose outputs, chain-of-thought (which produces output tokens), and extended thinking are all disproportionately expensive.
The six model-selection rules
- Start small, upgrade on evidence. Begin at Haiku or Sonnet, run evals, upgrade only for a demonstrated capability gap. Not choosing a model = choosing the most expensive one.
- Try the
effortparameter before switching model tiers. On Opus/Sonnet,efforttrades intelligence against latency and cost within one model. It is often the better lever. - Route per step. In a workflow with variable difficulty, use Haiku for cheap steps (classification, extraction) and Sonnet/Opus for hard steps (synthesis, judgment). Model choice is per-step, not per-system.
- Optimise cost per completed TASK, not per token. A smarter model that finishes correctly in one pass can be cheaper than a weaker one that needs three attempts plus a human fix.
- Latency-critical + simple = Haiku. Regulated / high-stakes reasoning = Opus. Everything else starts at Sonnet.
- Pin model versions in configuration. Monitor the deprecation page. Keep a version-update runbook. Every model swap re-runs the eval suite. Never let versions roll forward silently.
The eval gate for a model swap — three requirements
Every model change is a release, gated by:
- A curated test set with known-good outputs covering the real input distribution
- A grading function — model-graded rubric or programmatic
- A delta threshold set BEFORE running the eval, not after
⚠️ Setting the threshold after seeing the result is not a gate; it's a rationalisation.
3.2 Prompt caching — the single highest-yield topic in this domain
What it actually does
Claude caches a prompt prefix. On each request the system checks whether that prefix is already cached:
- Hit → the cached prefix is reused. Massive cost and latency (time-to-first-token) reduction.
- Miss → the prefix is processed in full and written to cache.
The cache TTL is refreshed at no extra cost on every hit — a sliding window. A steadily-used prefix stays warm indefinitely.
🔧 Analogy: It's a CDN edge cache keyed on an exact prefix match of the whole path. Change one byte at the front of the path and you get a total miss — not a partial one. That's the whole mental model.
Two configuration modes
| Mode | How | When |
|---|---|---|
| Automatic caching (recommended) | One top-level cache_control field; the system places and moves the breakpoint onto the last cacheable block automatically |
Default — especially good for multi-turn conversations where the prefix grows |
| Explicit breakpoints | cache_control on individual content blocks; up to 4 independent breakpoints |
Mixed TTLs, or caching the system prompt separately from tool definitions |
The pricing multipliers — MEMORISE
| Operation | Multiplier vs base input rate | Note |
|---|---|---|
| 5-minute cache WRITE | 1.25× | Pays for itself after just one read |
| 1-hour cache WRITE | 2× | Pays for itself after two reads |
| Cache READ (hit) | 0.1× (10%) | This is the entire saving |
| Default TTL | 5 minutes | Refreshed free on each hit; 1-hour TTL available at 2× write |
Do the arithmetic once so it sticks. Base input rate = 1.0.
- No caching, 100 requests with the same 10k-token prefix →
100 × 1.0 = 100 units - With caching →
1 write × 1.25 + 99 reads × 0.1 = 1.25 + 9.9 = 11.15 units - That's an ~89% reduction on the cached portion.
The constraints
| Constraint | Value |
|---|---|
| Minimum cacheable length | 1,024 tokens (Sonnet) · 4,096 tokens (Opus, Haiku 4.5) |
| Matching | Prefix-based and exact. Any change to the cached prefix = total miss |
| Ordering rule | Static content FIRST (system prompt, policy docs, tool definitions, static few-shot examples). Dynamic content LAST (user message, timestamps, request IDs) |
| Rate limits | Cache READ tokens do not count toward input-tokens-per-minute (ITPM) limits on most models |
| Stacking | Caching stacks with the Batch API 50% discount |
The rate-limit benefit is worth understanding, not just memorising. If your ITPM limit is 2M and you achieve an 80% cache hit rate, cache reads don't consume the quota — your effective throughput becomes roughly 10M tokens/minute. Caching is a throughput lever, not only a cost lever.
The canonical exam scenario (this appears in the official samples)
"The same 8,000-token system prompt and policy document goes out with every request. The user message is short and varies. Both latency and cost are concerns."
Answer: reorder so the static content is first, and enable prompt caching.
Why the distractors fail:
- Truncate the policy document → loses required policy content
- Downsize the model → risks quality with no evidence
- Move the content into few-shot examples → doesn't create a cacheable prefix; same tokens, different label
The canonical failure scenario
"The application prepends the current timestamp and a request ID to the top of the system prompt, followed by 9,000 tokens of static policy, then the user message. Caching is enabled but the hit rate is near zero."
Cause: the dynamic values sit at position zero, so the prefix is unique on every single request and no cached prefix can ever match.
Fix: move the dynamic values after the static block.
Why the distractors fail:
- "The policy is too long to cache" → not a real restriction
- "Caching only applies to user messages" → false
- "Requests are too frequent, causing eviction" → wouldn't produce a zero hit rate
The caching risk nobody mentions
Consistency window. Cached content cannot reflect live state within the TTL. If something in your cached prefix needs to be current, caching will serve you a stale version for up to the TTL duration.
Rule: separate live-state queries (tool calls) from static-knowledge content (cacheable prefix). This is the same live-state-vs-stable-knowledge distinction from Part 1, showing up in a different place.
3.3 Prompting techniques
The technique ladder
Use the lightest technique that meets the requirement. Escalate only on evidence.
| Technique | What it is | When to use | Cost profile |
|---|---|---|---|
| Zero-shot | Instruction only, no examples | Default. Well-specified tasks, strong models | Cheapest |
| Few-shot | 2–5 input/output exemplars in the prompt | When format or judgment is easier to show than to describe | More input tokens — but cacheable if static |
| Chain-of-thought | Ask the model to reason step by step before answering | Multi-step reasoning, interacting conditions, analysis | Most expensive — produces output tokens at 5× input price, plus latency |
| Structured outputs | Enforce a JSON schema on the response | Machine-readable pipelines, extraction, integration contracts | Eliminates parse failures — usually a net win |
| Prefilling | Begin the assistant turn to constrain the format | Forcing JSON, skipping conversational preamble | Minimal |
When to use each — the discriminators
Few-shot beats prose instructions when the requirement is FORMAT fidelity.
Scenario: "Output must follow a precise house style — fixed section order, defined heading names, specific table layout. Written instructions get close but not consistent." Answer: add one or two complete, correctly-formatted few-shot examples. Showing beats telling. Increasing max tokens addresses length, not fidelity. Raising temperature increases variation — the opposite of what's needed.
Chain-of-thought is applied selectively, never platform-wide.
Scenario: "CoT applied uniformly. It improved complex contract analysis but made simple field extraction slower and more expensive with no accuracy gain." Answer: CoT adds value on multi-step reasoning and adds pure cost on simple extraction. Apply it per-task based on measured benefit. Not "remove it everywhere" (throws away a proven gain), not "make the CoT longer" (doubles down where there's no benefit).
System prompt design
The three-part enterprise structure:
| Section | Contains |
|---|---|
| 1. Role & scope | Who Claude is in this deployment, and what it does |
| 2. Constraints | What it must always do; what it must never do |
| 3. Output contract | The exact shape of the response |
The governing principle:
Underspecification is a gap the model will fill with its own assumption — differently each time.
That is the definition of the "prompt failure" bug class: not a wrong instruction, an absent one.
The placement rules:
| Rule | Reason |
|---|---|
| Role, constraints, policy → system prompt. Task data → user message | Clean separation; also makes the system prompt cacheable |
| Critical rules at the beginning or end, never buried mid-context | Lost-in-the-middle: attention is weakest in the middle of a long prompt |
| Separate rules from reference content with clear structural delimiters | The model can distinguish "these are instructions" from "this is material" |
| Explicit priority ordering when rules can conflict | Removes the ambiguity that produces inconsistent behaviour |
| Inject server-verified identity/role — never accept a user-asserted role | A role claimed in a user message is manipulable input, not identity |
| Long, stable system prompts are prime caching candidates | Static prefix → 0.1× reads |
⚠️ Canonical trap: "A critical rule ('never quote internal pricing') is buried in the middle of 12,000 tokens of product context and is followed inconsistently. Rewording hasn't helped." Answer: move it to the beginning or end and structurally separate rules from reference content. Not: repeat it after every paragraph (bloats and dilutes further), not lower the temperature (affects randomness, not rule salience), not upper-case it (superstition).
Two practices that improve instruction adherence
When a system prompt produces inconsistent behaviour, the two highest-value fixes are:
- Organise the prompt into clearly delimited sections with explicit priority when rules conflict
- Include concrete examples of correct handling for the specific cases the model gets wrong
Not: raising temperature (adds variance), not placing critical rules in the middle (weakest attention position), not removing structure in favour of flowing prose (removes the very thing that aids adherence).
3.4 Extended and adaptive thinking
What it is. A separate block of thinking tokens generated before the final answer.
| Aspect | Detail |
|---|---|
Adaptive thinking (effort parameter) |
The recommended approach on Claude 4.6+ and Sonnet 5 |
Manual budget_tokens |
Deprecated on 4.6; removed on Sonnet 5 (returns a 400) |
| Billing | Thinking tokens are billed as output tokens — i.e. 5× input price |
| Latency | Adds meaningfully to response time |
The decision rule:
Run your evals WITHOUT extended thinking first. Enable it only where a measured accuracy gap justifies the cost. "It can't hurt" is not a valid reason — it demonstrably hurts cost and latency.
3.5 Context engineering — the strategy spectrum
There are four strategies. Production systems combine them.
| Strategy | What it does | Use when |
|---|---|---|
| Monolithic (full context) | Everything in the prompt at once | Bounded task, predictable input, corpus fits comfortably, caching absorbs the cost |
| Progressive discovery | The model starts with a map/summary and fetches details on demand via tools | Most production agentic workloads over large spaces (codebases, document trees) |
| Retrieval (RAG) | Fetch only the relevant chunks per query | Corpus far exceeds the window; freshness matters |
| Compaction / summarisation | Periodically compress conversation history | Long-running multi-turn sessions approaching the limit |
| Chunking | Split an oversized single input, process in parts, merge | One input exceeds the window |
How to combine them — ask four questions:
- What is needed at the very start? → monolithic portion
- What does each subsequent step need? → progressive
- What can be fetched on demand? → retrieval
- What can be compressed as it ages? → compaction
Monolithic vs progressive discovery — the explicit tradeoff
| Monolithic | Progressive discovery | |
|---|---|---|
| Gains | Simpler, single call, cache-friendly | Lower cost per request on large corpora; scales beyond the window; keeps context lean |
| Costs | Pays for every token every time; hits window ceilings; degrades via lost-in-the-middle | Tool-call latency, loop complexity, needs explicit stopping criteria |
| Choose when | Corpus fits comfortably and is stable | Corpus is huge or dynamic, or the task is exploratory |
The two situations that most strongly favour progressive discovery:
- A large catalogue of tools and reference material of which only a small subset is relevant per request
- A constrained context budget where stuffing everything up front degrades response quality
Situations that favour monolithic: three tools all needed every request; reference material that never changes and fits comfortably; a hard requirement to complete in a single model invocation with no intermediate steps.
The context budget rule
Do not budget the full context window. The window is a ceiling, not a target.
Budget for: largest realistic conversation + retrieved context + system prompt + tool definitions + working scratch + output headroom + margin.
Lost-in-the-middle — and what to do about it
Recall is strongest at the head and tail of context, weakest in the middle. Practical consequences:
- Put the most critical instructions at the head or tail of the prompt
- In RAG, put the highest-ranked chunks at both the head and the tail of the assembled context
- If a 150k-token corpus is being pasted in full and mid-document answers are unreliable and cost is high → retrieve only the relevant sections. That fixes both problems at once, which is why it beats reordering (fixes neither well) or reading twice (fixes neither and adds latency).
3.6 Skills — packaging and reuse
What a Skill is: a reusable, distributable bundle of instructions plus optional code, versioned, that behaves as a repeatable procedure.
The reuse ladder:
ad-hoc prompt → modular prompt / template → SKILL (versioned, governed, distributable)
Prompt library vs Skill — when to promote
| Modular prompt library | Skill | |
|---|---|---|
| Repeatability | Often tweaked per use | Stable — runs the same way every time |
| Distribution | One codebase, one team | Across teams and products |
| Governance | Lightweight | Versioning, approval, rollback |
The four distribution mechanisms (crossover with Domain 7 — memorise all four)
| Mechanism | How it works | Access control | Versioning & rollback | Use when |
|---|---|---|---|---|
| Org-provisioned Skill | Uploaded under Organization settings → Skills | Everyone in the org | None | A capability genuinely needed by everyone, with no governance requirement |
| Plugin | Bundles one or more Skills, assigned to a group or the org. Install preferences: required / installed-by-default / available / not available | Group or org targeting | Version-controlled updates from a connected repo + rollback | Whenever you need versioning, group targeting, or rollback — the governed path |
| Claude Code project Skill | Filesystem artifacts in .claude/skills/ |
Scoped to projects carrying them | Versions with the repository | A coding convention and toolset for one engineering team |
| API Skill | Called programmatically by your own products | Explicit version pinning | Explicit version pinning | A reusable capability your products must invoke programmatically |
⚠️ Centrally-managed Claude Code configuration (server-managed settings) is a separate channel — it's a settings mechanism, not a Skills distribution path. This distinction is testable.
💀 Failure story — the Skill with no way back. A platform team packaged a release-notes procedure as a Skill, bundled it into a plugin, and assigned it to 40 engineers. A well-meaning edit changed the prompt and the wrong format shipped across every team. It had been pushed as a flat bundle with no version control and no rollback, so the fix required manual re-editing while bad output kept shipping. A shared asset with no version and no way back is a liability the moment more than one person depends on it.
Skill supply-chain security (crossover with Domain 5)
| Step | What you do |
|---|---|
| Audit | Open the bundle. Look for (a) anomalous calls — network, shell, filesystem, credential reads; (b) operations out of scope versus the stated purpose |
| Runtime confinement | Run with least privilege in a sandbox: limited file access, limited network, no standing credentials |
| Trusted-source policy | Only vetted internal registry, verified publishers, signed releases |
| Recorded verdict | Approve / Reject / Remediate (strip the offending call, sandbox it, pin a safer version, re-audit) |
⚠️ Do not assume the platform screens skills for you. Verify what automated vetting actually exists.
3.7 Refusal handling — API mechanics
| Element | Detail |
|---|---|
| Signal | stop_reason: "refusal" with a stop_details object (available since Claude Opus 4.7) |
stop_details |
Carries a policy category plus a human-readable explanation. Both are null when there's no named category |
| Known categories | cyber, bio, frontier_llm, reasoning_extraction — re-check the docs, this list changes |
| Critical handling rule | After a refusal, RESET the conversation context. Remove or rephrase the triggering turn. Sending the next request on the same refused context returns further refusals |
3.8 Guardrails at the prompt layer — the bridge to Domain 5
- The system prompt is the first layer and the weakest layer. It is steerable, not enforceable.
- Pair every prompt-level rule that MATTERS with a runtime control: input screening, output validation, or tool authorization.
- If the rule protects money, data, or a person, it does not live only in the prompt.
3.9 Domain 2 rapid drill
| Situation | Correct move |
|---|---|
| 400k short classifications/day, accuracy comparable across tiers | Smallest model meeting the target + ongoing eval validation |
| Timestamp + request ID at top of prompt, cache hit rate ≈ 0 | Dynamic values break the prefix — move them after the static block |
| CoT helps complex analysis, hurts simple extraction | Apply CoT selectively per task, based on measured benefit |
| Critical rule buried mid-prompt, followed inconsistently | Move to start/end + structurally separate rules from reference content |
| Precise house-style format, prose instructions insufficient | Add complete few-shot examples of correct output |
| 150k corpus pasted per request; mid-document answers unreliable; cost high | Retrieve only relevant sections (fixes both problems) |
| Large static prompt, rising per-request cost — two levers | Cacheable static prefix + on-demand instruction loading (modular prompts / Skills) |
| Inconsistent instruction adherence — two fixes | Delimited sections with explicit conflict priority + concrete examples of the failing cases |
| Cache write multipliers | 1.25× (5-min) · 2× (1-hour) · read 0.1× |
| Minimum cacheable length | 1,024 tokens Sonnet · 4,096 tokens Opus/Haiku |
| Shared asset needing versioning, targeting, rollback | Organization-managed plugin |
Manual budget_tokens on Sonnet 5 |
Removed — returns 400. Use adaptive thinking / effort |
PART 4 — Domain 3: Integration (19% · ~12 items)
The biggest domain. It splits roughly into: tools & least privilege, identity & authorization, connection protocols (MCP / API / agent-to-agent), RAG pipeline design, accuracy–latency tradeoffs, and observability.
Half of it is your home turf (auth, observability, tradeoffs). The other half — RAG mechanics and MCP — is new and worth deliberate study.
4.1 The five integration layers — in priority order
When you integrate Claude into an enterprise, you make decisions at five layers. Compliance first — it eliminates options.
| # | Layer | The architectural decision | What breaks when you get it wrong |
|---|---|---|---|
| 1 | Compliance | Which routes and entry points survive the governing constraint? | You build on a route that fails legal/security review — after the build |
| 2 | Identity & SSO | Where does the user-identity boundary sit? | Claude can't scope responses to authorised data; identity asserted in a user message is manipulable |
| 3 | Authorization & policy | Which capabilities does this user/role actually have? | Users reach unauthorised data through an unguarded path |
| 4 | Data handling & PII | What data is allowed into the context window? | PII lands in plaintext in request logs and surfaces at audit |
| 5 | Observability & audit | What must you be able to reconstruct later? | An unlogged data path is an invisible one; no evidence after an incident |
🔧 Analogy: This is exactly the order you'd design a new AWS workload — compliance/account boundary → IAM/identity federation → policies → data classification → CloudTrail/logging. Same instincts, new subject.
4.2 Least-privilege tool configuration
The rule: every tool exposed to an agent is simultaneously attack surface and cost. If a role doesn't need a capability, remove it from the configuration. Don't log it, don't guard it, don't add a confirmation.
Control taxonomy — this is how the exam grades your answer
| Control type | Example | Verdict |
|---|---|---|
| Preventive (privilege removal) | Remove the refund/delete tool the role never uses | ✅ The least-privilege answer |
| Detective | Log it for later audit | ❌ Doesn't reduce the attack surface |
| Compensating | Add a confirmation prompt before the dangerous action | ❌ Guards the privilege; doesn't remove it |
| Unrelated | Use a bigger model that "follows instructions more reliably" | ❌ Model capability ≠ authorization scope |
⚠️ Learn this ranking cold. It converts several Domain 3 and Domain 5 questions into instant answers.
Capability bloat — the diagnosis and the fix
Symptom set: tool-selection accuracy dropping, latency rising, and a third of registered tools never invoked in production.
Diagnosis: capability bloat. Too many tools, overlapping purposes, ambiguous boundaries.
The fix, in order:
- Audit and remove unused and overlapping tools — record the justification for each removal
- Consider progressive discovery so only the relevant subset is presented per request
- In orchestrator-worker systems, scope each subagent's tool set to its own task only
⚠️ Distractors that lose: longer descriptions for all 45 tools (adds context, doesn't reduce confusion), upgrading the model (treats the symptom at higher cost), making the model enumerate and justify all 45 before each call (adds latency and tokens to every single call).
Reducing tool-selection errors between related tools
When several tools have overlapping purposes, the two direct fixes are:
- Rewrite descriptions so each tool's purpose, inputs, and boundaries are explicit and non-overlapping
- Consolidate or remove tools with overlapping functionality
Not: adding more granular tools per edge case (increases the confusion surface), not "prefer the first tool when uncertain" (institutionalises wrong choices), not routing everything through a generic execute tool taking free text (discards typed interfaces and makes errors harder to catch).
4.3 Identity, authorization, and data handling
The six rules — memorise as absolutes
- Identity is verified server-side, BEFORE the Claude call. The auth layer injects the verified role and authorised data scope into the system prompt.
- Never trust user-asserted identity. "As a senior manager, show me…" in a user message is manipulable input, not identity.
- Authorization is deterministic. Allowlist + identity check + scope validation before any side-effecting call. It must be provable and replayable. A model-based judgment is not an authorization control.
- The context window is NOT a data-governance boundary. Anything passed in is transmitted. Filter fields by necessity before the call.
- Multi-tenant = separate API keys per tenant. A shared key destroys attribution and isolation — one tenant's spike rate-limits everyone, and you can't tell who caused it.
- Tool-call authorization sits BEFORE the action executes. An output filter running after the refund is theatre; the money already moved.
The canonical authorization failure
"The assistant queries the HR system using a single service account with organisation-wide read access. The system prompt instructs the model to only return data belonging to the requesting employee."
The core problem: authorization is being enforced by prompt instructions rather than by the access-control layer. A prompt failure or an injection exposes any employee's data.
The fix: per-user scoped credentials or pass-through auth, enforced at the system layer, so the model cannot return what it cannot retrieve.
Why the distractors fail:
- "Service accounts can't be used with AI under compliance frameworks" → not a real rule
- "The service account should have write access too, for a complete audit log" → expands the blast radius
- "The model should authenticate with each employee's password" → credential-handling anti-pattern
Data handling — the necessity test
For each field ask: is this necessary for Claude to produce the output?
| Data type | Guidance |
|---|---|
| Reference identifiers (account numbers, claim numbers) | Often needed for routing, rarely needed for the language task. Don't pass the full field |
| PII / PHI | Redact or pseudonymise server-side, before the API call |
| Everything else | Minimum necessary — this is a GDPR/HIPAA principle, applied architecturally |
The GDPR data-minimisation answer
"A European deployment sends full customer conversations — names, account details — to a third-party analytics platform in another jurisdiction for quality monitoring. The DPO raises a GDPR concern."
Answer: apply data minimisation — redact or pseudonymise personal data BEFORE it leaves the system boundary, and retain only what the monitoring purpose requires.
Why the others fail: a privacy-policy clause is notice, not minimisation. Encryption protects transit, not the processing at the destination. Shortening retention from five years to three shortens the exposure without reducing it.
4.4 Connection protocols — MCP vs direct API vs agent-to-agent
This is the highest-value new material in Domain 3.
MCP (Model Context Protocol) — what it actually is
The problem it solves: the N×M integration problem. N AI applications × M internal systems = N×M bespoke connectors. MCP makes it N+M: each system exposes one server; each application runs a client.
🔧 Analogy: MCP is to AI tool integration what a service mesh sidecar contract or a standard API gateway spec is to microservices. You stop hand-writing every point-to-point connector and standardise on one protocol that any consumer can speak.
The architecture:
HOST (the AI application)
├── client 1 ──▶ SERVER A (ticketing)
├── client 2 ──▶ SERVER B (CRM)
└── client 3 ──▶ SERVER C (HR)
One client per server. JSON-RPC 2.0. Stateful sessions. Capability negotiation at initialisation.
The three MCP primitives — and who controls each
| Primitive | What it is | Controlled by | Methods |
|---|---|---|---|
| Tools | Executable functions | Model-controlled — the model decides to invoke; a human approves | tools/list, tools/call |
| Resources | Read-only context data | Application-controlled | URIs, resources/read, templates for parameterised queries |
| Prompts | Reusable interaction templates | User-controlled | — |
⚠️ The "controlled by" column is the tested part. Tools = model-controlled. Resources = application-controlled. Prompts = user-controlled.
Client-side features: sampling (the server asks the host's LLM for a completion), elicitation (the server asks the user for input or confirmation), and logging.
Transports:
| Transport | Use |
|---|---|
| stdio | Local, development |
| Streamable HTTP | Remote, production — OAuth 2.1 required |
Dynamic discovery: tools are discovered at runtime via tools/list plus change notifications. That's what makes it plug-and-play — no pre-baked connector needed.
The selection matrix
| Mechanism | Choose when | Cost / tradeoff |
|---|---|---|
| MCP | Standardised tool connections reused across multiple clients/hosts; you want an ecosystem of servers; runtime discovery is valuable; decentralised ownership with frequent tool churn | An extra protocol layer to debug |
| Direct API / SDK | Full control over requests, retries, streaming, errors; a single integration with one owner; deterministic, tightly-scoped calls inside a pipeline you own | You build and maintain the orchestration; bespoke per system |
| CLI (e.g. Claude Code) | Developer-workflow tasks, repo-scoped automation | Not for multi-user or customer-facing products |
| Agent-to-agent | Delegating a whole subtask to a peer agent with its own reasoning loop, especially across an organisational trust boundary | Weakest observability; hardest failure attribution; needs an explicit contract and trace propagation |
The rule of thumb:
One system talking to one model → direct API. Many tools shared across many AI surfaces → MCP. Cross-boundary autonomous delegation → agent-to-agent (with trace IDs and contracts).
The canonical MCP scenario
"Twelve internal systems. Different teams own each. Tools will be added and retired frequently. Multiple AI applications across the company need to reuse the same connections."
Answer: expose each system via MCP servers that any application can connect to.
Why the others fail:
- Hard-code each REST API into each application's tool definitions → multiplies maintenance by the number of applications
- One custom middleware service wrapping all twelve → creates a bottleneck team and a single point of failure
- Give Claude direct database access → bypasses business logic and access control
The canonical agent-to-agent scenario
"A procurement agent at one company must negotiate delivery schedules with a supplier's independently operated scheduling agent. Neither organisation will expose internal tools or systems to the other."
Answer: agent-to-agent communication across an agreed protocol boundary, with each agent mediating access to its own organisation's systems.
The defining characteristic is the organisational trust boundary. Registering the supplier's tools directly, or giving each agent database access to the other, both expose exactly what neither party will expose.
Scenario-matching practice (this format appears verbatim on the exam)
| Integration need | Mechanism |
|---|---|
| Many AI apps need standardised, reusable access to the ticketing system | MCP server |
| A deterministic nightly batch job pushes records into a warehouse, no model involved in the transfer | Direct API integration |
| Two autonomous agents owned by different companies coordinate logistics | Agent-to-agent protocol |
| A new internal KB should be discoverable by any current or future agent | MCP server |
| An existing microservice calls the model once to classify a document inside its own pipeline | Direct API integration |
The pattern: standardised + reusable + discoverable + many consumers → MCP. Deterministic + tightly scoped + inside a pipeline you own → direct API. Crosses an organisational trust boundary between autonomous agents → agent-to-agent.
4.5 RAG pipeline design — deep dive
The two pipelines
OFFLINE (indexing): ingest → parse → chunk → embed → store (vector DB + metadata)
ONLINE (query): embed query → retrieve top-k → [rerank] → assemble context → generate
Understanding that these are two separate pipelines is half the battle: most RAG failures are offline pipeline failures (stale index, changed embedding model, broken chunk boundaries) that present as online symptoms (confidently wrong answers).
Chunking strategies — memorise this table
| Strategy | How it works | Use when | Failure mode |
|---|---|---|---|
| Fixed-size | Every N tokens (typically 512) with 10–20% overlap | Homogeneous, unstructured, short-paragraph corpora; a predictable baseline | Splits mid-clause or mid-function; facts cut in half |
| Recursive | Split on a separator hierarchy (paragraph → sentence → word) within a size budget | The sane production default — respects natural boundaries | Still fundamentally size-driven |
| Semantic | Split where consecutive sentence-embedding similarity drops | Long-form prose with wandering topics and no clean headings | Unpredictable chunk sizes; can produce chunks too small to reason over |
| Layout-aware / hierarchical | Markdown headers, HTML tags, PDF structure, code function boundaries | Structured documents — contracts, manuals, policies, codebases | Needs reliable structure to exist |
| Parent–child (small-to-big) | Index small child chunks ( |
Mixed corpora where answer quality matters — the most-adopted production pattern | Extra preprocessing |
Sizing heuristics:
- 512–1024 tokens per chunk is the baseline
- Too big → the signal is diluted; the embedding averages into mush
- Too small → no context. "This applies to enterprise customers" — what is this?
- Read your actual chunks. Half of all chunking bugs are visible to the naked eye
The canonical chunking failure
"A RAG system over commercial contracts uses fixed 300-token chunks. Retrieval frequently returns clause fragments whose meaning depends on definitions and cross-references elsewhere in the document."
Answer: adopt structure-aware chunking aligned to clauses and sections, with metadata linking definitions and cross-references.
The failure is structural — fixed-size chunks sever clauses from the definitions that give them meaning. Reducing chunk size to 100 tokens makes fragmentation worse. Increasing retrieved chunks from 5 to 50 floods the context hoping to get lucky. Replacing retrieval with a keyword index over headings discards the semantic retrieval that works elsewhere.
Indexing and embeddings
| Rule | Detail |
|---|---|
| Consistency rule | Use the same embedding model and configuration for indexing and for querying. A mismatch silently destroys retrieval — no error, just bad results |
| ANN index | HNSW or IVF |
| Distance metric | Cosine / dot / L2 — must match the embedding model's recommendation |
| Metadata filtering | This is where security boundaries live: tenant/ACL scoping, recency constraints, source scoping. Access control for confidential documents belongs at the retrieval layer |
| Storage | Store raw text separately from vectors so you can re-embed without re-parsing |
| Re-index discipline | Documents added or removed without re-indexing = retrieval drift = the classic "confidently wrong after refresh" scenario |
Retrieval strategies matched to data shape
| Data / query shape | Strategy |
|---|---|
| Uniform prose, paraphrase-style queries | Dense vector search alone can suffice |
| IDs, part numbers, error codes, exact terms | Hybrid: BM25 (sparse) + dense, fused with Reciprocal Rank Fusion (RRF) — dense embeddings compress rare tokens into mush; BM25 catches exact matches |
| High-stakes, domain-specific precision | Hybrid + a cross-encoder reranker (rescore the top 50–200 candidates jointly; +10–20% relevance, +100–400 ms) |
| Short or ambiguous user queries | Query rewriting: Multi-Query (3–5 rephrasings searched in parallel, RRF-fused) or HyDE (embed a hypothetical answer) |
| Cross-referencing documents ("as defined in Article 3") | Contextual / late chunking — chunks retain surrounding context |
| Live-state data (inventory, prices, order status) | NOT RAG. A tool call to the owning system. Separate live state from static knowledge |
Reciprocal Rank Fusion (RRF) is the standard way to merge dense and sparse ranked lists: score each item by its rank in each list, favouring items that rank well in both. You don't need the formula — you need to know it's the merge mechanism for hybrid retrieval.
The canonical hybrid-retrieval scenario
"A parts-lookup assistant uses pure semantic retrieval. Users searching exact part numbers like 'KX-2481-B' get similar-but-wrong parts. Natural-language queries work well."
Answer: hybrid retrieval combining keyword/exact matching with semantic search, weighted by query type.
Exact identifiers are where lexical matching wins and embeddings blur. Natural language is where semantic search wins. Match the strategy to the query shape. Replacing semantic entirely breaks the NL queries that currently work. A larger embedding model marginally improves a fundamentally lexical problem. Telling users to stop using part numbers pushes the system's failure onto users.
Anthropic's Contextual Retrieval
A specific, named technique worth knowing:
Prepend chunk-situating context before embedding + contextual BM25 + a reranker → reduces top-20 retrieval failures by ~67%.
Additional findings: top-20 beat top-10 and top-5 in Anthropic's tests, and highest-ranked chunks should be placed at both the head and tail of the assembled context (lost-in-the-middle).
RAG failure diagnosis
"Confident but incorrect answers after a document refresh. Latency and model version unchanged."
The retrieval/indexing step is feeding stale or irrelevant chunks. Check, in this order:
- Was the refresh actually re-indexed?
- Is the embedding model still the same?
- Are chunk boundaries broken?
Before touching prompts or models.
Stale-content remediation — the two direct measures
"After a nightly documentation refresh, a RAG assistant intermittently answers from superseded content."
- An automated re-indexing pipeline that validates completeness and embedding consistency after every content refresh
- Document versioning metadata in the index, with retrieval filtering out superseded versions
Not: a larger context window (retrieves more of the same stale content), not weekly manual spot-checks (too slow and too sparse to catch a nightly issue), not lowering temperature (doesn't change what's retrieved).
And: keep retrieval quality IN the eval loop. Retrieval precision and recall are system metrics. Monitor them like you monitor latency.
4.6 Accuracy–latency–cost tradeoffs
The lever table
| Lever | Latency | Accuracy | Cost |
|---|---|---|---|
| Smaller model tier | ↓↓ | ↓ (task-dependent — eval it) | ↓↓ |
Lower effort parameter |
↓ | ↓ | ↓ |
| Prompt caching | ↓ (time-to-first-token) | none | ↓↓ |
Shorter max_tokens / concise output |
↓ | truncation risk | ↓ |
| Fewer retrieved chunks (top-k ↓) | ↓ | ↓ recall risk | ↓ |
| Add a reranking stage | ↑ (100–400 ms) | ↑↑ retrieval precision | ↑ small |
| Extended / adaptive thinking | ↑↑ | ↑ on hard reasoning | ↑↑ (output tokens) |
| Streaming | perceived ↓ | none | none |
| Batch API (async) | not latency-bound | none | −50% |
How to reason about a tradeoff on the exam
"Re-ranking improves accuracy 86% → 93% but adds 500 ms. The SLA is 3 seconds. Current p95 is 1.6 seconds."
Do the arithmetic against the SLA. 1.6 s + 0.5 s = ~2.1 s against a 3 s SLA. That leaves clear headroom for a 7-point accuracy gain.
Answer: adopt re-ranking and monitor.
The framework: quantify both sides against the stated constraint. "Latency should never increase in customer-facing systems" is dogma, not analysis. Applying it only to queries outside the SLA fragments behaviour arbitrarily. Deferring until the SLA is renegotiated defers a decision the data already supports.
Design targets: p95, never median. SLA breaches live in the tail.
4.7 Observability at scale
The four layers
| Layer | What it does |
|---|---|
| 1. Request-level tracing | Model + version, token counts (input / cached / output), latency, stop_reason, tool calls, prompt identifier |
| 2. Metric aggregation | Cost per request, p50/p95 latency, task success rate, error rate by type |
| 3. Anomaly detection | Threshold alerts (cost > 150% of the 7-day average; p95 > SLA) + distribution comparison for drift |
| 4. Change attribution | Distinguish model drift (behaviour changed, inputs stable) from data drift (input distribution changed) from model-update effects (version changed) |
⚠️ Per-request decomposition matters. Aggregates can look perfectly healthy while 5% of requests consume 80% of the budget. Never rely only on the mean.
The four things to log per request
| Category | Fields |
|---|---|
| Request | Model version, input token count, prompt identifier |
| Response | Output token count, latency, stop reason |
| Context | User role, session ID, was caching applied? |
| Outcome | Did the downstream system accept the output? Any rejection signals? |
The observability strategy question
"Tens of thousands of agent sessions daily. Engineers log every full prompt, response, and tool payload. It's costly and failures are still hard to find."
Answer: structured traces with correlation IDs and key metrics for every session, with full-payload capture sampled and triggered on error conditions.
At scale, you instrument everything cheaply and capture expensively selectively. Disabling production logging loses the context that caused the failure. Logging only the final response discards the intermediate steps where agents actually fail. Relying on user complaints is lagging and reputationally costly.
🔧 Analogy: This is exactly your tracing strategy — head-based sampling for the baseline, tail-based sampling on errors, full payloads only where you need them. Same pattern, new telemetry.
Two rules that carry weight in security review
- "An action taken but not logged is an action that cannot be allowed." Observability is the precondition for approving agent autonomy, not a nice-to-have added afterwards.
- The business translation layer. Map technical metrics to business metrics (
task success rate → first-contact resolution,latency → handle time). Build it at design time — funders read KPI dashboards, not request traces.
4.8 Multi-tenancy and reliability
Multi-tenant isolation
| Anti-pattern | Consequence | Fix |
|---|---|---|
| Shared API key across tenants | No attribution for rate-limit breaches; every tenant absorbs the impact when the org-level limit trips | Separate API keys per tenant |
The three reliability controls
| Control | What it does | Where it sits |
|---|---|---|
| Exponential backoff | Retries transient errors (429, 529, timeouts, 5xx) with progressively longer delays | Adjacent to the API call |
| Fallback chains | Routes to an alternative model, endpoint, or cached response when the primary is unavailable (e.g. Sonnet → Haiku on a latency spike) | Orchestration layer |
| Circuit breaker | Trips when the error rate exceeds a threshold; fails fast rather than waiting for timeouts; has a cooldown | Service boundary |
⚠️ Build these from the start. Retrofitting reliability is far harder than designing it in.
The constraint-to-integration matrix
The complete mapping from a governing constraint down through every layer:
| Constraint | Route | Integration | Identity | Data | Observability |
|---|---|---|---|---|---|
| Attorney–client privilege | API behind the firm's own gateway | Gateway holds the API key, enforces access, produces the audit log | SSO; server-assigned permissions | All privileged content flows through the gateway | Every request and response logged at the gateway |
| HIPAA (PHI) | BAA-covered configuration only (API with BAA, Bedrock, Vertex) | Cloud provider mediates | Partner auth system; minimum necessary PHI | PHI stripped to task-essential; reference IDs instead of full fields | Log request, model version, user identity, data scope |
| GDPR / residency | Region-pinned (CSP route, or inference_geo) |
Region locked at the integration layer | Verified within the approved region | Personal data only in the pinned region — including logs and caches | Who accessed what, legal basis, deletion date |
| FedRAMP | Authorised cloud only (Claude for Government, Bedrock GovCloud, Vertex Assured Workloads) | Limited to the authorised configuration | Agency identity provider | Per agency classification rules | Continuous-monitoring grade |
| Internal data-residency | CIO-approved provider | Constrained by procurement | Partner standard SSO | Per partner classification | Feeds existing logging infrastructure |
4.9 Domain 3 rapid drill
| Situation | Correct move |
|---|---|
| 12 systems, many teams, many consuming apps, frequent tool churn | MCP servers |
| 45 tools, third never used, selection accuracy dropping | Audit and remove unused/overlapping; consider progressive discovery |
| Service account with org-wide read + prompt says "only their own data" | Authorization enforced by prompt instead of the access-control layer |
| Fixed 300-token chunks severing clauses from definitions | Structure-aware chunking + linkage metadata |
| Exact part numbers failing, natural language working | Hybrid retrieval (BM25 + dense, RRF), weighted by query type |
| Reranking: +7 points accuracy, +500 ms, p95 1.6 s, SLA 3 s | Adopt — quantify both sides against the SLA; headroom is clear |
| Tens of thousands of sessions, logging everything, failures still hard to find | Structured traces + metrics everywhere; full payloads sampled and error-triggered |
| Two agents, two companies, neither exposes internals | Agent-to-agent protocol |
| Nightly refresh, intermittently answering from superseded content | Validated re-index pipeline + version metadata with retrieval filtering |
| Wrong tool chosen among related tools — two fixes | Explicit non-overlapping descriptions + consolidate/remove overlaps |
| Two situations favouring progressive discovery | Large catalogue, small relevant subset per request + constrained context budget degrading quality |
| MCP primitive control | Tools = model-controlled · Resources = app-controlled · Prompts = user-controlled |
| MCP production transport | Streamable HTTP with OAuth 2.1 (stdio is local/dev) |
| Multi-tenant rate-limit attribution | Separate API keys per tenant |
PART 5 — Domain 4: Evaluation, Testing & Optimization (16% · ~10 items)
The mental shift: you cannot unit-test a probabilistic system. So you replace deterministic tests with statistical acceptance criteria. Everything in this domain follows from that.
🔧 If you think in SLOs, error budgets, and burn-rate alerts, you already have the right instincts. An eval suite is an SLO for output correctness instead of availability.
5.1 Evals as acceptance criteria — the core doctrine
Write the eval suite BEFORE the production code.
Doing so forces three things:
- You must state what success means in measurable terms — before you've fallen in love with an implementation
- You expose design assumptions early, while they're cheap to change
- You own a gate for every future change: model swap, prompt revision, retrieval config, context strategy
The governing statement:
If you cannot write an eval for a behaviour, you have no reliable way to measure whether that behaviour is present.
That sentence answers a surprising number of exam questions on its own.
The five-stage eval workflow
| Stage | What happens | Output |
|---|---|---|
| 1. Define the task | State the behaviour in specific, measurable terms; write the prompt | A task spec with pass criteria |
| 2. Build the golden dataset | Assemble representative inputs including edge cases and counterexamples | A labelled dataset with expected outputs |
| 3. Run automated checks | Code-based comparison of output vs expected — fast and cheap | Pass/fail per item |
| 4. Score with a judge | Model-based rubric scoring for interpretive behaviours | Score + reasoning per item |
| 5. Interpret and act | Aggregate scores and check the per-category breakdown | Overall score + breakdown |
⚠️ Stage 5's per-category breakdown matters. An aggregate of 91% can hide a category at 40%. Always decompose.
5.2 Defining success criteria — the four steps
Step 1 — Identify the behaviour specifically.
"Summarise claims accurately" → "extract the filer's name, claim number, incident date, and claimed amount"
Vague behaviour cannot be graded. Specific behaviour can.
Step 2 — Set the threshold from the business requirement, not from prototype performance.
100% accuracy on structured fields · <2% hallucination rate · 99.5% schema compliance
⚠️ Setting the threshold at "whatever the prototype currently achieves" is circular and meaningless.
Step 3 — Identify the failure modes. A fabricated claim number, a missing date, a wrong claim value. Each failure mode becomes a labelled category in the eval dataset, so you can see which one is regressing.
Step 4 — Include adversarial inputs. Missing fields, handwritten sections, unusual formatting, non-standard layouts, other languages.
5.3 The grading ladder — cheapest reliable method first
| Rank | Method | How | When | Cost | Limitation |
|---|---|---|---|---|---|
| 1 | Code-based | A function checks the output — schema, regex, JSON validity, length, exact match, presence/absence | Unambiguous behaviours | Very low (milliseconds, no API call) | Cannot assess interpretation |
| 2 | LLM-as-judge | A judge model scores against a rubric | Tone, reasoning quality, safety, faithfulness, ambiguous inputs | Medium–high (an API call per item) | Inconsistent on borderline cases |
| 3 | Human review | A person scores against a rubric | High-stakes, novel, safety-critical | Highest — slow, not scalable | Has its own inconsistency; limited throughput |
Always start at rank 1 and only escalate where the behaviour genuinely requires it.
LLM-as-judge — the four requirements
- Detailed rubrics — not "is this good?"
- Constrained verdicts — a fixed scale or category set, not free text
- Calibration against human labels — before you trust any verdict
- A different model than the one being evaluated — to avoid self-preference bias
⚠️ The calibration point is the tested one. An uncalibrated judge produces confident scores with no validated link to quality — which is worse than having no automated grade, because it seems trustworthy.
And: favour volume over perfection. Many auto-gradable cases catch more regressions than a handful of hand-graded ones.
The LLM-as-judge scenario
"A marketing-content assistant must be evaluated for tone and brand alignment across thousands of outputs per week. Human review of every output is infeasible."
Answer: an LLM-as-judge rubric scored against brand guidelines, periodically calibrated against a sample of human expert ratings.
Exact string matching can't score novel copy. Full human review doesn't scale. Skipping tone evaluation abandons a measurable requirement.
5.4 Test dataset design
| Principle | Detail |
|---|---|
| Representativeness | Build from the real input population, not from the ten convenient documents the team already knows |
| Coverage | Include edge cases, adversarial and malformed inputs, and each known failure mode as its own labelled category |
| Multi-turn evals | A separate category — full conversation transcripts, checking context retention and quality over turns |
| Currency | Keep the golden dataset current. The highest-risk state is evals that are present but stale after a prompt change: still green, measuring behaviour that no longer exists |
| Spot-checks are not evals | A spot-check verifies one input → one output. It tells you nothing about unknown inputs |
The dataset composition question
"Which composition provides the most trustworthy signal for a customer-support assistant before launch?"
Answer: anonymised real queries sampled from production-like channels, augmented with deliberately constructed edge cases and failure-prone scenarios.
Real queries capture the true input distribution; constructed edge cases probe where it breaks. Synthetic questions generated from the documentation inherit the documentation's blind spots. The examples in the system prompt only prove memorisation. Questions written by the engineers who built it test the builders' assumptions with the builders' assumptions.
The regulated pre-production framework — the two essentials
- A golden dataset labelled by domain experts, covering both typical and high-risk scenarios
- Adversarial test cases probing safety boundaries, prompt injection, and policy-violating requests
Both halves are required: expert-labelled data proves competence; adversarial cases prove the boundaries hold under attack. A live demo on hand-picked examples is theatre; a general-knowledge benchmark measures the wrong thing; a post-launch satisfaction survey arrives after the risk has shipped.
5.5 Metrics across five axes
| Axis | Example metrics | Grading method |
|---|---|---|
| Accuracy | Exact-match on extracted fields, schema compliance %, hallucination rate | Code-based where verifiable |
| Latency | p95 vs target, under concurrent load | Code-based (numeric) |
| Cost | Tokens × tier per request vs ceiling — distribution, not average | Code-based |
| Safety | No prohibited action taken (binary); summary faithfulness | Code-based for actions; LLM judge for faithfulness |
| Security | No cross-tenant identifier leakage; no PII in output | Code-based deterministic scan |
Worked example — a claims-processing eval framework
| Dimension | Metric | Grading method | Why |
|---|---|---|---|
| Accuracy: field extraction | Exact match on claimant, policy #, loss amount, date | Code-based | Known values, verifiable by exact/schema match |
| Latency | p95 < target | Code-based | Numeric check, no interpretation |
| Safety: no auto-deny | Binary — was a denial issued? | Code-based | Deterministic check |
| Safety: summary faithfulness | Does the narrative accurately represent the source? | LLM judge | Interpretive — a function can't encode it |
| Security: no cross-claimant leakage | Scan summary for identifiers from other claims | Code-based | Deterministic scan |
| Cost per claim | Token cost < ceiling | Code-based | Numeric from token counts × tier |
⚠️ Notice the pattern: only ONE row needs an LLM judge. That's the discipline — push everything possible down to code-based grading.
5.6 A/B testing for LLM systems
The four required components — any one missing means it isn't an experiment
| Component | Requirement | What goes wrong without it |
|---|---|---|
| Hypothesis | Specific and falsifiable: names the treatment, the metric, the threshold, and the secondary-metric constraints | Any result can be spun as a win |
| Random assignment | Consistent per user/session; control the input distribution | Groups aren't comparable; input mix confounds the result |
| Primary metric fixed BEFORE the run | One metric, declared in advance | Outcome-shopping / retrospective correlation |
| Sample size calculated | From the minimum detectable effect, the baseline, and the confidence level | Underpowered — you can't distinguish a real effect from noise |
⚠️ LLM output variance is higher than deterministic systems, so you need MORE samples. A 6-point difference needs hundreds of sessions per arm, not 50.
Example hypothesis, correctly formed:
"The new retrieval configuration increases RFP task success from 70% to 75%, without p95 latency exceeding 8 s or cost rising more than 10%. ~1,500 sessions per group. At 800 requests/day split evenly, that's ~4 days. Control for RFP complexity distribution."
Reading results
Two questions before declaring a winner:
- Is the effect large enough to justify the operational overhead? (statistical significance ≠ practical significance)
- Did any secondary metric degrade?
The LLM-specific failure: an interaction effect between treatment and input type. The treatment improves typical inputs and degrades rare edge cases — which then spike seasonally and blow up in production.
Shadow testing
What it is: run the new version in parallel. Send it a copy of live requests. Serve the current version to all users. Score the new version's outputs offline.
| Use when | Cost |
|---|---|
| A single bad output is too risky to expose | No downstream signal — no user acceptance, no follow-up behaviour |
| Traffic is too low for a meaningful live split | You rely entirely on an offline rubric |
| Regulated industry where exposure isn't permissible |
The offline-gain question
"A revised prompt beats the current one by 6 points on the offline eval suite. The team wants confidence before replacing production."
Answer: run a controlled A/B test in production on a fraction of traffic, monitoring quality and guardrail metrics before ramping up.
Offline gains don't always transfer to the production distribution. Re-running the offline suite just re-measures the same distribution. Three stakeholders comparing samples is opinion sampling, not evaluation.
💀 Failure story — the 50-session winner that wasn't. 50 sessions per group was far too small for high-variance LLM output. The input distribution wasn't controlled, so the treatment arm happened to receive fewer edge cases. And the primary metric wasn't pre-specified, enabling outcome-shopping. The result was noise that looked like signal.
5.7 Model version rollout
"A team plans to move production workloads to a newly released model version. Offline spot checks look fine."
Answer: run the FULL evaluation suite against the new version, then roll out gradually (canary traffic) with regression monitoring before full cutover.
Model version changes are regression risks. The full suite catches task-level regressions that spot checks miss. Canary rollout bounds the blast radius of anything the suite didn't catch.
Why the others fail: switching all traffic assumes "newer" means "better on your tasks." Waiting six months forfeits improvements without adding any safety. Adopting only for new customers splits the fleet without protecting either half.
🔧 Analogy: identical to an AMI or base-image bump. You don't push it fleet-wide because the release notes look good — you run the test suite, canary a slice, watch the golden signals, then ramp.
5.8 Failure diagnosis taxonomy — heavily tested
| Failure class | Signature | Fix |
|---|---|---|
| Prompt failure | Ambiguous, underspecified, or conflicting instructions; the model filled the gap; wrong-but-plausible output on a valid input | Fix the prompt — not the model |
| Hallucination | Confident, fluent content not grounded in the input or source; fabricated citations, invented tracking numbers | Grounding — retrieval, tool use, verification. A sterner instruction will not fix it |
| Model mismatch | Wrong tier for the task complexity, or a model swapped without re-eval. Works on easy inputs, degrades on hard ones | Model selection, gated by the eval suite |
| Retrieval failure | Confidently wrong after a corpus or index change; model and latency unchanged | Re-index, verify embedding consistency, check chunk boundaries |
| Context failure | Degradation on long inputs; middle content ignored | Reduce context, reorder to head/tail, progressive discovery |
| Orchestration failure | A missing subtask output; fragmented traces | Shared trace ID; recoverable vs unrecoverable boundaries; synthesis coverage check |
How to tell the three headline classes apart
This scenario-matching format appears on the exam. The discriminators:
| If the scenario says… | It's… |
|---|---|
| The instructions conflict or are ambiguous ("be concise" + "explain in detail") | Prompt failure |
| The model invented something not present in the source or the tool result | Hallucination |
| A small/general model handles easy cases fine but fails on long or specialised ones despite good prompts | Model mismatch |
Worked set:
- Small fast model summarises short emails well, loses key details on 40-page contracts → model mismatch (capability gap vs task)
- "Respond concisely" conflicts with "explain your reasoning in detail" → prompt failure (the prompt is the defect)
- Q&A bot cites a warranty clause that doesn't exist in the documentation → hallucination
- General-purpose model performs poorly on deep legal reasoning despite well-structured prompts → model mismatch
- Agent invents a tracking number when the lookup tool returns no results → hallucination (ungrounded in the tool result)
The triage order when quality drops
1. WHAT CHANGED? deploy? corpus refresh? model version? input mix?
2. CHEAPEST CHECK the one that takes five minutes, first
3. DISTRIBUTION compare — is this model drift, data drift, or a version effect?
Diagnosing intermittent degradation
"Quality has degraded intermittently over two weeks. Latency, model version, and prompts are unchanged."
The two most useful data sources:
- End-to-end traces of affected sessions, including retrieved context and tool inputs/outputs
- Analysis of the input distribution for drift — new query types, formats, or languages the system wasn't designed for
With code, model, and prompts unchanged, the cause is in what's flowing through. Request volume doesn't explain a quality change. The billing dashboard is spend, not quality. Uptime is availability, not quality.
5.9 Leading vs lagging indicators
"You want early warning of quality degradation in a production RAG assistant, ideally before users notice."
Answer: a decline in retrieval relevance scores and a rise in "no grounded answer found" rates in the pipeline's telemetry.
These are pipeline-internal signals that move before user-visible quality does — the definition of a leading indicator.
| Indicator | Type |
|---|---|
| Retrieval relevance score decline | Leading |
| "No grounded answer found" rate rise | Leading |
| Eval score drift on the scheduled suite | Leading |
| Formal complaints via the support portal | Lagging — damage done |
| Monthly inference invoice | Cost, not quality |
| Quarter-on-quarter DAU drop | Lagging and far too coarse |
5.10 Cost–performance optimisation playbook
Apply these in order — top-down.
| # | Lever | Why it's here |
|---|---|---|
| 1 | Prompt caching — static prefix first | Biggest cost + latency lever when the system prompt/policy is long and stable. Reads at 0.1× |
| 2 | Model tiering / routing | Haiku for classification and extraction; Sonnet default; Opus only where evals prove it's needed |
| 3 | effort parameter |
Dial within a model before switching models |
| 4 | Batch API | −50% for async workloads. Verify BAA coverage for regulated data. Stacks with caching |
| 5 | Output-length control | Output ≈ 5× input price. Concise formats, structured outputs, max_tokens budgets |
| 6 | Retrieval top-k tuning | Enough for recall (the top-20 pattern), no more |
| 7 | Token-distribution modelling | Plan for the heavy tail — average-based models miss by 2–3× |
| 8 | Per-turn budgets + stopping criteria on agents | Unbounded loops are the #1 agent cost failure |
The cost-mandate question
"Leadership asks for a 40% reduction in inference costs. The team's first proposal is to switch every workload to the smallest model."
Answer: analyse token usage and cost per workload from production traces, then target the dominant cost drivers — caching, context trimming, selective model downsizing — with evaluation of the quality impact at each step.
Optimise from evidence. Trace-level cost analysis reveals whether the spend is actually in context size, cache misses, output length, or model tier. Blindly switching every workload to the smallest model is one lever applied blindly. Refusing the mandate abdicates. Cutting max_tokens by 40% across the board truncates outputs regardless of consequence.
5.11 POC → production: the four things a demo lies about
| Dimension | Why it's invisible in the demo | What it looks like when it fails |
|---|---|---|
| Cost | 10–50 requests/day makes the bill negligible | The bill blows the budget; the architecture gets renegotiated after deployment |
| Latency | One request at a time, no concurrency | p95 under concurrent load ≠ median latency. SLA breaches, user abandonment |
| Reliability | No retry, no fallback, no circuit breaker | Any transient API failure takes down the entire workflow |
| Failure modes | Only expected inputs were tested | Silent degradation; fabricated outputs on edge cases |
Cost & latency modelling — the four inputs
- Call volume — requests/day or month, from the business owner, not from developer intuition or a sample dataset
- Token budget per request — input (system prompt + retrieved context + user message) + output. Model the distribution. Note: cache writes cost more than standard input; default TTL is 5 minutes
- Model tier —
volume × input tokens × input rate + volume × output tokens × output rate, using the cache-read rate for cached tokens. Batch API = 50% discount for async (verify BAA coverage for regulated data) - Sensitivity — what if volume doubles? What if the distribution shifts to the tail? How fragile is this model?
💀 Failure story — the POC cost profile that became a production bill. Three compounding failures: (1) the cost model was built at POC volume; (2) token distribution was assumed uniform when the tail consumed 80% of spend; (3) no reliability testing — a 529 at peak took the entire workflow down. Root cause: the POC was treated as a cost and reliability model when it was only a capability demonstration.
Failure modes by architecture
| Architecture | What breaks first | Mitigation |
|---|---|---|
| Agent | Unbounded tool use; context growing every turn | Per-turn token budgets, max tool-call counts, explicit stopping criteria, a constrained tool set |
| RAG | Retrieval quality drift (docs added/removed, query-doc misalignment, staleness) | Keep retrieval quality in the eval loop; monitor precision/recall; separate live state from static knowledge |
| Document pipeline | No exception path for low-confidence extractions | Confidence scoring → route low-confidence items to a human review queue |
| Orchestrator-workers | Blurred failure boundaries; fragmented traces; a silently dropped subagent | Define recoverable vs unrecoverable; shared trace ID; coverage check at synthesis |
5.12 Domain 4 rapid drill
| Situation | Correct move |
|---|---|
| "Is it good enough to launch?" with only pilot anecdotes | Task-specific metrics tied to business outcomes, with agreed launch thresholds |
| Most trustworthy eval dataset | Anonymised real queries + deliberately constructed edge cases |
| Tone/brand at thousands of outputs per week | LLM-as-judge rubric, periodically human-calibrated |
| Offline prompt beats current by 6 points | Controlled A/B on a fraction of production traffic |
| 40% cost reduction mandate | Trace-level analysis → target dominant drivers, evaluate quality at each step |
| New model version, offline spot checks fine | Full eval suite, then canary rollout with regression monitoring |
| Earliest warning of RAG quality decay | Retrieval relevance decline + rising "no grounded answer" rate |
| Regulated pre-production framework — two components | Expert-labelled golden dataset + adversarial safety/injection test cases |
| Intermittent degradation, nothing changed — two sources | End-to-end traces of affected sessions + input distribution drift analysis |
| Judge model requirement | Calibrated against humans + a DIFFERENT model from the one being evaluated |
| Uncalibrated judge | Worse than no automated grade — false trust |
| Highest-risk eval state | Present but stale — green while measuring behaviour that no longer exists |
| A/B four components | Hypothesis · random assignment · pre-fixed primary metric · calculated sample size |
| p95 vs median | Always p95 — SLA breaches live in the tail |
PART 6 — Domain 5: Governance, Safety & Risk Management (14% · ~9 items)
The one sentence that carries this domain: Safety is not a setting. It is a stack of layers, each covering a different part of the request path, each with a blind spot the next must catch. The architect places each control and decides what happens when it fails.
6.1 The safety stack — four layers, and who owns each
| Layer | What it covers | What it does NOT cover | Owner |
|---|---|---|---|
| 1. Trained behaviour | Broad classes of harmful/unsafe output. Every request. Zero configuration | Your domain policy, data rules, authorization model | Anthropic |
| 2. System-prompt instruction | Role, tone, stated constraints within one request | Anything adversarial input can talk Claude out of — instructions are not enforcement | Architect |
| 3. Runtime screening | Input/output screening detecting disallowed content | Actions with side effects (screening doesn't authorize); novel attacks the classifier misses | Architect |
| 4. Authorization | Whether a specific side-effecting action is permitted for this caller in this context | Content quality and fairness | Architect |
🔧 Analogy: Layer 1 is the AMI's baseline hardening — the vendor gives it to you. Layers 2–4 are your security groups, your IAM policies, and your admission controllers. Nobody at AWS knows your business rules. Nobody at Anthropic knows them either.
Training-time alignment vs inference-time control
| Training-time alignment | Inference-time control | |
|---|---|---|
| When | Before deployment, during training | At request time, in your deployment |
| Scope | General — broad harm classes | Specific — your domain policy, data rules, auth model |
| Owner | Anthropic | Architect |
| Effect | Lowers baseline risk | Enforces deployment-specific rules |
The Constitution. Anthropic trains Claude against a constitution (January 2026 version). The priority ordering is: broadly safe → ethical → compliant with guidelines → genuinely helpful. It is applied holistically, not as a rigid sequence.
⚠️ The #1 exam trap in this entire domain
Assuming Claude enforces a rule it was never given.
Claude arrives with broad safety behaviour. It does not know your data-handling rules, your authorization model, or your domain policy. A request can pass Claude's general alignment and still violate a deployment-specific rule.
💀 Failure story — trained refusals mistaken for domain policy. A team deployed an internal assistant for a partner who had a cross-business-unit data-access policy. Claude refused every harmful prompt in testing, so the team assumed cross-unit disclosure was covered too. In production, a normal-looking, in-domain request asked for a forbidden record — and Claude answered it. The rule was never part of Claude's training and was never encoded in any application layer. It lived nowhere.
What belongs where
| Obligation | Owner | Why |
|---|---|---|
| Refuse dangerous content (weapons, self-harm) | Claude's trained behaviour | Broad harm class, covered by training |
| Cross-business-unit data access rules | Application layer | Deployment-specific, never in training |
| A partner's data-handling policy | Application layer | Specific to that partner |
| The authorization model (who can do what) | Application layer | Deployment-specific |
| Tone and role constraints | System prompt (application layer) | Shaped per deployment |
6.2 The five LLM risk categories
| # | Risk | Description |
|---|---|---|
| 1 | Direct prompt injection | The user crafts input that overrides the system instructions |
| 2 | Indirect prompt injection | Malicious instructions arrive via retrieved content or tool outputs, which the model treats as trusted. Input screening never sees them. This is the dominant enterprise vector |
| 3 | Token-budget exhaustion | Oversized or adversarially padded inputs consume the context or output budget |
| 4 | Tool and action abuse | The model is induced to call a side-effecting tool outside policy |
| 5 | Data exposure | Sensitive fields enter the context window or logs where they shouldn't |
Indirect injection — why it needs its own control
user input ──▶ [screened] ──▶ model ✅ covered
retrieved content ──▶ [ ??? ] ──▶ model ❌ NOT covered by input screening
tool outputs ──▶ [ ??? ] ──▶ model ❌ NOT covered by input screening
The fix: screen retrieved content and tool outputs before appending them to the model's context, using the same model-based classifier you apply to user input. The blind spot is different because the source is different.
The vulnerability assessment method
Walk the request path and the data path together. At each entry point — user input, retrieved content, tool outputs, the model's output, the logs — ask:
What could an adversary do here, and which control stands in the way?
Look for anywhere there is a plausible attack and no control.
The risk assessment deliverable
For each identified risk, record:
- Category
- Affected component
- Likelihood and impact judgment
- Mitigation control — with an owner and an evidence artifact
6.3 The three control points and the failure direction
| Control point | When it runs | Use a model-based check when… | Use a deterministic check when… |
|---|---|---|---|
| Input screening | Before the model call | Intent is ambiguous; jailbreak/injection patterns that rules can't exhaustively capture | Clear rules apply — blocklist, regex, length/format check |
| Output screening | Before the response reaches the user | Toxicity or policy compliance needing language understanding | A known string, a forbidden field, a schema violation |
| Tool-call authorization | Before any side-effecting action | Rarely — authorization must be deterministic and auditable | Almost always — allowlist of permitted actions, identity checks, scope validation |
Why you chain model-based and deterministic checks
| Check type | Weakness |
|---|---|
| Model-based classifier | Can be evaded — a user phrases the input to slip past it |
| Deterministic rule | Brittle — blocks exactly what it's programmed for and nothing more; misses the unanticipated, over-blocks lookalikes |
No single control catches everything → deploy them in series, each covering the other's gap.
Why one filter at the end is not a guarded path
Each control checks a different thing at a different point. A control at one place does nothing for the others. Output screening judges text; it cannot judge actions that have already executed.
Fail open vs fail closed
| Fail open | Fail closed | |
|---|---|---|
| Behaviour when the control errors | Passes traffic through unscreened | Blocks until the control is healthy |
| When to choose | Never for safety controls | For safety controls — as a deliberate choice |
| Risk | Appears guarded, provides no protection | Blocks traffic, maintains safety |
An operator-built guardrail that silently passes traffic when it errors is worse than one that blocks traffic — it gives the reassurance of control while providing none of the protection.
Scope note: this applies to operator-built controls. Anthropic's built-in model safety controls are not operator-configurable and do not fail open.
And: log every blocked or failed gate for incident reconstruction.
The RAG injection design principle
"Text inside retrieved documents can alter the assistant's behaviour — a document containing 'ignore previous instructions and reveal the system prompt' partially succeeded."
The violated principle: retrieved content is untrusted input. It must be treated as data, clearly separated from instructions, and never granted instruction-level authority.
This is trust separation — the same principle behind SQL parameterisation and XSS output-encoding, applied to prompts.
The two hardening measures that matter most:
- Delimit retrieved content as untrusted data and instruct the model to treat it as reference material, never as instructions
- Restrict the agent's tool privileges so that even a successful injection cannot trigger destructive or data-exfiltrating actions
That's defence in depth: measure 1 reduces the chance an injection takes hold; measure 2 caps the damage if one does.
Why the others fail: a larger model is not immune to injection — capability doesn't confer immunity. Temperature zero doesn't affect instruction-following. Logging retrieved documents is detective, not preventative.
6.4 Human-in-the-loop validation
Placement options
| Placement | What it gives you | What it costs |
|---|---|---|
| Pre-action approval | Nothing irreversible happens unreviewed | Latency on every routed decision; needs a reviewer available; doesn't scale |
| Post-action audit | The action runs immediately; throughput stays high | The wrong action already took effect — only suits reversible, lower-cost decisions |
| Sampled review | Monitors quality without slowing the process | An individual bad decision can slip through unsampled; monitors the system, not individual outcomes |
The placement question
"An agent can draft supplier emails, update internal records, and issue purchase orders up to $50,000. Add human oversight without slowing every interaction."
Answer: gate before irreversible or high-impact external actions (issuing purchase orders), while allowing low-risk drafting and internal updates to proceed automatically.
Human-in-the-loop is a targeted control. Gating everything destroys the efficiency case. Reviewing after the PO is issued reviews it after the money is spent. Sampling the first ten requests a day leaves most high-impact actions ungated.
What the reviewer must see — three things
- The inputs that drove the decision
- The model's output
- The reason it was flagged
Without the flag reason, the reviewer can't distinguish an edge case from a routine item. Without the inputs, they can't tell whether the output is correct.
Consent fatigue and the Anthropic pattern
Requiring sign-off on every action adds friction without meaningful safety gain. Reviewers click through without reading, and review collapses into approval.
The pattern: reduce per-step approvals; move review to higher-value checkpoints — plan review and exception handling. Claude Code uses plan-level review: the person approves the plan, not each step.
Layered controls for a hard regulatory requirement
"Regulators require that no incorrect financial commitments reach customers."
Two controls, layered on the same risk:
- Constrain the output with guardrails that block commitments outside approved policy language (preventative)
- Require human review and approval before any drafted response is sent (validation)
Why the others fail: a larger context window may improve quality but guarantees nothing. Prompt training improves inputs, not the guarantee. Logging to a warehouse for quarterly review detects failures months after customers received them.
6.5 Fairness, bias, and explainability
The four injection points where skew enters
| Injection point | How skew enters |
|---|---|
| Retrieval corpus | Over- or under-represents groups → the context is already skewed before the model sees it |
| Prompt framing | Encodes an assumption that pushes outcomes in one direction |
| Few-shot examples | Carry the same skew as the corpus |
| Downstream routing | Directs some groups down different paths |
Fairness is an architectural property you instrument, not a model attribute you assume.
The model passing published bias evaluations says nothing about your corpus.
The proxy-variable question
"A résumé-screening assistant scores candidates from certain postcodes systematically lower. Names and demographic fields were already excluded."
Answer: proxy variables (such as postcode) can encode protected characteristics. Conduct structured bias evaluation across demographic slices, remediate, and maintain ongoing fairness monitoring.
Removing explicit attributes doesn't remove bias, because correlated proxies — postcode, school, employment gaps — carry the same signal.
Why the others fail: "no protected attribute was used, so it's working correctly" mistakes formal compliance for fairness. "The base model's training data is at fault and nothing can be done at the application layer" ignores the real levers you control. "Hide the scores from recruiters" hides the harm instead of fixing it.
⚠️ Watch for: aggregate metrics that look fine while harm concentrates in one subgroup. Require per-subgroup breakdowns.
Three audiences for explanations
| Audience | What they need | What you must capture |
|---|---|---|
| Affected user | A clear explanation of why a decision was made, in terms they can act on | The inputs that drove the decision + the reason for the outcome, in digestible form |
| Regulator | Evidence that comparable cases are treated consistently + a specific decision reconstructable on demand | A durable, queryable record of inputs, outputs, and the decision path |
| Build team | Enough detail to find why a flagged decision went wrong | The full trace: prompt, retrieved context, model output, every routing step |
Decision logging
Capture, per decision: inputs, retrieved context, model output, and routing — keyed so a single decision can be replayed.
It's the same observability instrumentation as production monitoring, pointed at "why did this specific decision happen" instead of "is the system healthy."
⚠️ The decision log is itself in scope for the compliance register. In HIPAA/GDPR contexts, logged inputs and retrieved context contain sensitive personal data. Apply minimisation, retention limits, and access controls to the log.
💀 Failure story — fairness treated as the model provider's problem. The team used a model that passed fairness evaluations. Skew entered through the retrieval corpus — an injection point they never monitored. When outcomes were questioned, there was no decision-level log to reconstruct what happened. They could neither explain specific decisions nor rule out the corpus as the cause. If you cannot reconstruct an explanation, you cannot reliably provide one.
6.6 Transparency obligations
"A bank deploys an AI assistant on its public website. Compliance asks how the design supports transparency obligations."
Answer: clearly disclose to users that they are interacting with an AI system, describe its limitations, and provide a path to a human for consequential matters.
Transparency in deployment means users know they're dealing with AI, understand its limits, and can reach a human when it matters — disclosure that changes user behaviour appropriately.
Publishing the parameter count discloses a fact no customer needs. A model-version watermark is metadata, not actionable transparency. Keeping the AI nature ambiguous is the opposite of the obligation.
6.7 Compliance — from obligation to evidenced control
The core discipline
Choosing a compliant entry point is a prerequisite, not proof. Each obligation must become three things you own:
| # | Element | Examples |
|---|---|---|
| 1 | A specific technical control that achieves the outcome | Region pinning; server-side PII redaction; gateway-level audit logging |
| 2 | A named owner accountable for it | A person or team, by name |
| 3 | A living evidence artifact proving it's operating | Signed agreement, configuration screenshot, authorization record, a log query that returns rows today |
A control named in a design document with no owner and no artifact is a claim, not proof.
Revalidate the register on a cadence.
The two claims never to collapse
"Excluded from training" ≠ "not retained."
Data can be excluded from model training while still being retained for logging, abuse prevention, legal compliance, or configured audit purposes. These are two distinct claims.
The architecture-stage question
"A hospital wants an assistant answering clinician questions using patient records. Which consideration must be resolved at the architecture stage rather than post-launch?"
Answer: ensuring the entire data path — model, retrieval, logging, and any subprocessors — meets applicable health-data compliance obligations, with agreements in place BEFORE PHI flows through it.
Retrofitting after PHI has flowed is a violation, not an enhancement. Compliance obligations attached to health data determine what the architecture may be: which services can touch PHI, under what agreements, with what logging.
💀 Failure story — right route, no proof. A team selected the compliant delivery route and treated compliance as settled. They mapped obligations to controls once, at design time, in a document. No owner attached. No logging wired to show the control operating. Months later a logging config change wrote request metadata to a second region. Nobody owned the residency control; no artifact tracked where data was landing. The gap surfaced at audit when the reviewer asked for evidence — and the team had a design document, not a data-flow record. The residency control was real at design time and silently false in production.
6.8 The control-selection matrix (scenario matching)
This exact format appears on the exam. The discriminators:
| If the requirement is… | The primary control is… |
|---|---|
| Absolute — "must never," "before it is ever displayed" | Preventative guardrail (it must be prevented, not caught) |
| A consequential judgment on each individual decision | Human-in-the-loop validation |
| Reconstruction after the fact, or trend detection across the fleet | Monitoring and audit |
Worked set:
- Must never output customer account numbers, under any circumstances → preventative guardrail
- Agent recommends loan approvals; each carries financial and regulatory consequence → human-in-the-loop validation
- Compliance must demonstrate months later exactly what an agent did and why → monitoring and audit
- Content generator must be prevented from breaching advertising standards before display → preventative guardrail
- Leadership wants early detection if refusal or error rates trend upward across the fleet → monitoring and audit
6.9 Worked assembly — a public-sector benefits assistant (FedRAMP)
Five sequenced decisions:
| # | Decision | Answer |
|---|---|---|
| 1 | The boundary | Trained behaviour refuses broad harm but has never seen the eligibility rules — those belong to the application layer. Leave them in trained behaviour and no downstream control can reach them |
| 2 | Runtime controls | Input screening, output screening, tool-call authorization. Choose model-based or deterministic at each. Fail closed — a screen that fails open lets an unscreened denial reach an applicant |
| 3 | Fairness & transparency | Name which of the four injection points could skew the outcome (corpus, prompt framing, examples, routing). Build decision logging once — the applicant, the regulator, the build team, and the control register all draw on it |
| 4 | Human-review routing | Route by confidence, reversibility, and cost. A low-confidence, hard-to-reverse denial → pre-action approval. Key to stakes, not volume |
| 5 | Control register | Map each FedRAMP obligation to a control, an owner, and an evidence artifact. A control with no evidence artifact is a claim you cannot prove operated |
6.10 Domain 5 rapid drill
| Situation | Correct move |
|---|---|
| Agent drafts emails, updates records, issues POs to $50k | Gate before irreversible/high-impact external actions only |
| EU deployment ships full conversations to offshore analytics | Data minimisation — redact/pseudonymise before leaving the boundary |
| Hospital assistant over patient records — architecture-stage item | Whole data path compliant, agreements in place BEFORE PHI flows |
| Résumé screener penalises certain postcodes, no demographic fields used | Proxy variables — structured bias eval across slices + ongoing monitoring |
| Retrieved document says "ignore previous instructions" and partly succeeds | Retrieved content is untrusted data — separate from instructions, no instruction authority |
| Bank public-site assistant, transparency obligation | Disclose AI, describe limits, provide a human path for consequential matters |
| No incorrect financial commitments may reach customers — two controls | Output guardrails blocking non-approved commitments + mandatory human approval |
| RAG agent hardening against injection — two measures | Delimit retrieved content as untrusted + restrict tool privileges |
| Guardrail service errors under load | Fail closed — deliberately |
| Only an output filter, and a refund tool executed | Output screening judges text, not actions — needs tool-call authorization before execution |
| A control in a design doc with no owner | A claim, not proof — needs control + owner + evidence artifact |
| "Excluded from training" | Does NOT mean "not retained" |
| Human review routing rule | Low-confidence AND (irreversible OR high-cost) |
| Four fairness injection points | Corpus · prompt framing · few-shot examples · downstream routing |
| Five risk categories | Direct injection · indirect injection · token exhaustion · tool abuse · data exposure |
PART 7 — Domain 6: Stakeholder Communication & Lifecycle Management (14% · ~9 items)
The domain your day job already covers. As a manager you run discovery, present tradeoffs, negotiate SLAs, and hand over ownership. The exam formalises what you do by instinct. Learn the vocabulary and the named artifacts — that's where the marks are.
7.1 Discovery — structured elicitation, not a conversation
Stakeholders speak in preferences. Design decisions are made against constraints. Your job is to translate.
The three-step filter: Listen → Translate → Write down.
The translation move
When a stakeholder uses an experience word — seamless, easy, fast, simple, intuitive — treat it as a signal that more discovery is needed, never as a requirement.
"We want this to feel seamless." Ask: What would make it NOT seamless? What must the user never notice? What must still be true when something goes wrong? → Produces: a latency target, an integration requirement, a handoff rule, a safe failure path.
The four question categories — memorise
| Question | What it captures |
|---|---|
| What must the system DO? | Capabilities as business outcomes, not features. Separate Claude's work from existing systems and humans |
| What must the system NOT do? | Boundaries, prohibited actions, cases that route to a human. Stakeholders rarely volunteer these — ask explicitly |
| What must the system COST? | The budget constraint in the stakeholder's terms: latency target, per-interaction cost ceiling, volume forecast |
| What must the system PROVE? | Evidence and audit obligations. In regulated workflows, proof obligations ARE requirements. Finding them in discovery is far cheaper than during legal review |
The output artifact — the translation table
One row per item:
| Stakeholder statement | Implied constraint | Required architectural decision | Assumption to document |
|---|---|---|---|
| "We want this to feel seamless" | Latency budget; no exposed internals; graceful failure | Set a p95 target; design an internally-safe failure state | Assumes "seamless" = responsiveness + continuity. Confirm |
| "Clinicians will review the output anyway" | A licensed human must authorize before record entry | Build human-in-the-loop as a mandatory checkpoint | Assumes review is an architectural gate. Confirm authority and timing |
| "We're in healthcare, so be careful with data" | A health-privacy proof obligation | Audit trail and data-handling evidence as core requirements | Assumes a covered workflow with a formal obligation. Confirm with compliance |
Requirement vs assumption
| Definition | |
|---|---|
| Requirement | Traces to something the stakeholder actually said |
| Assumption | Something the design takes for granted that was never stated |
An unsourced assumption is the most dangerous artifact in the document — nobody remembers deciding it.
⚠️ Exam pattern: you'll be shown a requirements table and asked which row has no supporting stakeholder statement (e.g. a retention period nobody mentioned). That row is the assumption.
💀 The killer anti-pattern — the discovery call that became a design session
An architect heard the stakeholder and immediately proposed a solution sketch. The stakeholder confirmed it, because it sounded competent. Constraints were never identified: a licensed-clinician authorization requirement, PHI in the context window, two-state retention rules.
Plausibility is what makes it dangerous. A plausible sketch ends the questions — the stakeholder assumes you already have what you need.
Fix: finish all four question categories before proposing anything. Treat every "oh, it's just a quick review" as a constraint to chase down.
The "we need a chatbot" question
"A client opens with 'we need a chatbot for our intranet.' What should the architect do first?"
Answer: run structured discovery to identify the underlying business problem, users, success measures, data landscape, and constraints — the chatbot may or may not be the right solution.
"We need a chatbot" is a proposed solution, not a problem statement. Pricing an unvalidated solution, prototyping immediately (which anchors everyone to it), or copying a competitor all skip the actual work.
The two discovery outputs required before design begins
- Agreed, measurable success criteria and acceptance thresholds tied to the business problem
- An assessment of data availability, quality, access constraints, and compliance obligations
Design decisions hang off exactly two anchors: what success measurably means, and what the data landscape will permit. The final system prompt, the pinned model version, and the UI design are all downstream design/build outputs — premature at discovery.
7.2 Communicating tradeoffs
The three elements (plus one for regulated)
| # | Element | Question |
|---|---|---|
| 1 | Gain | What does this choice provide? |
| 2 | Give up | What does it cost or sacrifice? |
| 3 | Reversal cost | What does it cost to undo once the system is built around it? |
| 4 | (regulated) Compliance posture | What does this do to our compliance position? |
The reversal cost is the element most people skip, and it's the one that most often changes the meeting. It turns "what is the better technical answer?" into "what is the better business choice?"
The tradeoff translation map
| Architectural decision | Gain | Give up | Reversal cost |
|---|---|---|---|
| Larger context window vs retrieval | Simpler design; the full document in view | Higher per-call cost; slower at scale | Reworking the architecture after cost spikes — plus the credibility hit |
| Trade logging for latency | Faster response, smoother UX | Reduced visibility per interaction | A compliance gap requiring remediation for the gap period (regulated) |
| Single route vs multi-platform | Lower build complexity; consistent auth and logging | Less flexibility for regional/compliance needs | Delayed or blocked cutover if the route can't satisfy a late requirement |
💀 The CTO story — the approval that wasn't an informed choice
An architect presented a context-strategy tradeoff in technical terms. The CTO asked about cost, received a per-call figure ("about four cents"), and approved. Six weeks later: a five-figure monthly bill.
CTO: "I approved a direction, not a number. Nobody told me four cents × call volume was a five-figure monthly line."
The presentation was accurate. The alignment was false. The reversal cost never entered the conversation.
Fix: name all three elements every time — especially the reversal cost when the design feels obviously simpler.
Present as a package, not a verdict
Give: options considered, the criteria, your recommendation, and the residual risks. The stakeholder must be able to defend the decision to their own leadership. Lead with the business outcome; frame limitations honestly; hand them the peer-proof justification.
The three professional-conduct scenarios
1. "It must be 100% accurate before launch."
Answer: explain that LLM systems are probabilistic, then work with the sponsor to define measurable acceptance criteria and an error-handling strategy aligned to business risk. Convert an unachievable absolute into an achievable agreement. Don't agree to the impossible, don't walk away from a solvable conversation, and don't propose a smaller model (which changes the error rate, not the expectation).
2. "The CFO orders the cheapest model for regulatory reporting, but testing shows a materially higher error rate."
Answer: present the tradeoff with evidence — error rates, downstream rework, and regulatory exposure against the cost saving — recommend a decision framework, and let the accountable stakeholder decide with full information. Silently using the better model is deception. Complying without comment withholds material information from a decision-maker. Escalating to the board audit committee is escalation before the conversation has happened.
3. "Sub-second responses demanded; the pipeline cannot go below three seconds."
Answer: present the latency breakdown, negotiate an SLA that reflects the pipeline's realistic envelope, and propose experience improvements such as streaming and progress indicators. Accepting and hoping signs up to miss. Removing retrieval and reasoning sacrifices the capability that justifies the system. Committing "for demonstrations only" guarantees the gap surfaces in production.
7.3 GTM: demos, joint scoping, and objections
Capabilities demo vs scenario-specific demo
| Capabilities demo | Scenario-specific demo | |
|---|---|---|
| Answers | "What can this system do?" | "What does this do with MY problem?" |
| Creates | Interest | Confidence |
| Data | Generic, polished | Resembles the buyer's data in structure and volume |
The four demo design decisions
| Decision | What to do | Why |
|---|---|---|
| Scenario selection | Choose a workflow the buyer recognises from their own operations | Recognition is more persuasive than a polished feature tour |
| Limit placement | Decide in advance which 1–2 limitations to name; frame them as intentional scope boundaries | A buyer discovering a limitation mid-demo drops confidence. Naming it early reads as discipline |
| Sales collaboration | Shape the demo narrative with the sales team before building | Sales knows the buyer's concerns; you know what's realistic |
| Data preparation | Use data resembling the buyer's in structure and volume (anonymised for regulated) | When the data looks like theirs, the demo argues for itself |
Limit placement — answer three questions: What is the limit? Why does it exist? What happens if the use case needs to go beyond it?
In regulated settings, an upfront, clearly scoped boundary signals rigour; a discovered or deflected limitation erodes confidence.
Joint scoping preparation
Arrive with three things:
- A documented view of the customer's requirements and constraints
- Proposed pattern(s) with tradeoffs already named
- A short list of open questions only the Applied AI team can answer
The three objection categories
| Category | The question behind it | Your response |
|---|---|---|
| Capability | Can the system do this at all? | Demonstrate capability |
| Governance & compliance | Can this deployment be trusted, controlled, evidenced? | Show controls and evidence artifacts |
| Design-choice | Why this choice instead of another? | Explain the tradeoff and what the alternative would have cost |
7.4 Feedback loops and SLA management
A feedback loop is the decision layer ABOVE observability
Monitoring is not a feedback loop. A dashboard collects signals. A feedback loop maps each signal to a trigger, an owner, and an action.
The five stages:
| Stage | Question |
|---|---|
| Signals | What is the system showing us? |
| Triage | What needs attention now, what can wait? |
| Decide | Team fix, stakeholder review, or no action? |
| Act | What correction or escalation is required? |
| Review | Did the response work? Does the rule need to change? |
💀 Failure story — the observability stack that replaced the feedback loop. Dashboards live, alerts configured, data flowing — so the team concluded stakeholder feedback was covered. The eval score had been drifting down since week 4, but no hard alert fired because the error rate was flat and no governance rule mapped slow quality drift to a review trigger. The stakeholder reported "it's been less useful lately" in week 12; the quarterly review finally surfaced it. The loop would have caught it seven weeks earlier.
An SLA names three things
- What are we measuring?
- What counts as a breach?
- What happens when a breach occurs?
Thresholds must trace to a tangible source:
| Threshold | Traces to |
|---|---|
| Latency | User experience expectation |
| Availability | Business criticality |
| Quality | Eval results and acceptance criteria |
If the number can't be tied to one of these sources, it's probably arbitrary.
Cost is the expectation that breaks most often
- Production volume routinely runs 1–2 orders of magnitude above pilot
- Cost that looked trivial in the POC becomes a five-figure monthly line at scale
Pre-empt it: give the stakeholder a consumption forecast at expected production volume, name the spend-control posture (caching, model tiering, budget alerts), and frame the model-tiering narrative before the first invoice.
The governance table — must exist BEFORE launch
| Signal type | Review trigger | Architect action | Regulated checkpoint |
|---|---|---|---|
| Output quality (eval score) | Score crosses the threshold from the eval suite | Diagnose prompt / data / model drift; iterate vs re-architect | Periodic output audit on a schedule, regardless of score |
| Latency p95 | Crosses the budget from UX requirements | Investigate the bottleneck; tune or escalate | Usually none, unless it masks a logging gap |
| Cost per interaction | Crosses the budget from discovery | Identify the driver; bring the tradeoff to the stakeholder | Usually none, unless cost is a regulated constraint |
| Data-residency config | Scheduled confirmation | Confirm and record the residency posture; flag drift | Residency confirmation on schedule |
⚠️ Regulated reviews fire on a SCHEDULE, not on a threshold. A quarterly output audit runs regardless of eval scores. Residency confirmation runs on the calendar. These are design-time obligations, not tasks to add later — with no trigger, the checkpoint surfaces only when an auditor comes looking.
Reporting to sponsors
"Two months post-launch, sponsor enthusiasm is fading because the fortnightly report shows only token spend, latency, and uptime."
Answer: report against the business success criteria agreed at discovery — hours saved, resolution rate, error reduction — with technical metrics as supporting detail.
Sponsors funded a business outcome. Reporting only technical metrics answers a question they never asked. More frequency, more technical metrics, or no report at all all make it worse.
Iterate vs re-architect
- Cause is prompt, data, or model drift → iterate
- The budget or architecture assumption itself is wrong → stakeholder review and possible re-architecture
7.5 Managing scope change
"Midway through a build, stakeholders keep requesting additions — new data sources, extra user groups, additional output formats."
The two practices:
- Assess each request against the agreed success criteria and scope baseline, making the impact visible before accepting it
- Re-baseline timeline, cost, and risk with sponsor sign-off when accepted changes materially alter the plan
Healthy change management makes every request's impact visible against the baseline, and formally re-baselines when accepted changes move it. The relationship survives because nothing is hidden.
Why the others fail: absorbing requests silently erodes the project invisibly. Refusing all changes erodes the relationship. Implementing while quietly reducing testing trades quality for schedule in the dark.
7.6 Documentation for handoff and audit
Three readers, one document
| Reader | What they need |
|---|---|
| Handoff recipient | Decisions made + alternatives rejected + the reason for each rejection. Without rejected alternatives they will reverse the right decision for an understandable wrong reason |
| Compliance reviewer | Each obligation, technical control, owner, and evidence artifact. Assertions are not enough |
| Returning architect | A document that stands on its own. Decisions dated. Assumptions labelled as assumptions. Open items with owners and resolution criteria |
The completeness test
Can a competent architect who was not in the room make a SAFE change to the system after reading this document? If no, the document is not complete.
The checklist fields
| Field | Captures | Primary reader |
|---|---|---|
| Decision (with date) | The architectural choice made | All three |
| Rejected alternatives | Options considered but not chosen | Handoff recipient |
| Tradeoff named | Gains, costs, and reversal implications | Handoff recipient + returning architect |
| Owner | Person or team responsible going forward | Compliance reviewer + handoff recipient |
| Evidence artifact | The artifact showing the control is operating | Compliance reviewer |
| Audit-ready status | Whether the evidence is current and sufficient | Compliance reviewer |
💀 Failure story — design rationale that lived in the architect's head. The original architect left 12 weeks after launch. The replacement inherited a thorough architecture diagram with no rationale. A performance issue arose; the replacement switched the context strategy. The switch reintroduced a data-handling pattern that violated a data-residency constraint. The original strategy had been a deliberate choice to satisfy residency — the reasoning was never written down.
The diagram showed the WHAT and lost the WHY. If the reasoning is never written, it leaves with you.
The handoff artifact question
"A consultancy hands a completed solution to the client's internal team. Beyond the code, which artefact set is most critical?"
Answer: architecture documentation with decision records explaining key trade-offs, operational runbooks, and evaluation baselines the team can re-run.
The receiving team must operate and evolve the system: decision records explain why it is the way it is, runbooks explain how to keep it running, and eval baselines let them verify changes safely. A demo recording, a history of prompt drafts, or a list of unbuilt features do none of that.
7.7 Lifecycle phases and the outcome document
The lifecycle
DISCOVERY → DESIGN → HANDOFF → MONITORING → ITERATION
| Phase | Activities |
|---|---|
| Discovery | Interviewing frontline staff; workshops to agree what success means and how it's measured; the four question categories; the translation table |
| Design | Selecting the retrieval strategy; defining the guardrail architecture; pattern and model choices; tradeoff framing |
| Handoff | Walking the client's engineers through the runbooks; transferring operational ownership; documentation package |
| Monitoring & iteration | Reviewing production evaluation trends; prioritising the next round of improvements; the feedback loop |
Identifying which phase a decision belongs to is what lets you judge when one phase is ready to move to the next.
Phase transitions are gated by artifacts. And a gate can legitimately be incomplete — at week 4, the outcome document may have a before-metric but need more runtime for the after-metric. The correct action then: name the owner, confirm the control is logging, and schedule completion at a defined milestone.
The outcome document — six fields
| Field | What it records |
|---|---|
| Use case with scope boundary | What the deployment does and does not do |
| Metric BEFORE | The business metric before deployment |
| Metric AFTER | The same metric, same definition, after deployment |
| Control in place | What makes the before-and-after auditable rather than merely asserted |
| Measurement owner | Who owns ongoing measurement after the engagement closes |
| Reuse potential | How the pattern transfers to other customers or engagements — as IP |
💀 Failure story — the outcome document that measured the wrong thing. The architect wrote it from easy-to-export metrics: request volume, average latency, error rate. The sponsor took it to the CFO to justify expansion.
CFO: "That tells me it runs. What did it do for us? What were claim processing times before and after?"
The document couldn't answer — there was no before-and-after on a business metric.
Volume, latency, and error rate prove the system RUNS. Only a before/after on the business metric, backed by an auditable control, proves what it's WORTH.
Capture the BEFORE metric at the start. You cannot reconstruct it later.
7.8 Cross-platform deployment
Problems a single entry point never shows:
- Model identifier strings differ across routes
- Feature availability lags on CSP-mediated routes versus the direct API
- Regional availability on Bedrock/Vertex requires explicit configuration
- ⚠️ Defaulting to the global endpoint is the common pattern that breaks data residency
The entry-point-responsibility map must be documented before the first line of integration code. It specifies which entry point handles which task and why. It prevents the most common multi-entry-point failure: an entry point chosen for one task gradually taking on another because the routing logic was never documented.
7.9 Worked assembly — a regulated multi-platform deployment
Scenario. A regional healthcare network across two states. A clinical documentation assistant. AWS-standardised. Health-privacy obligation. The CFO wants evidence of value.
| # | Decision | Answer |
|---|---|---|
| 1. Discovery | Must-prove | A health-privacy obligation with an audit trail. Requirement: an auditable record of every model-generated note reviewed by a licensed clinician, traceable to the interaction |
| 2. Tradeoff | Trim logging for latency | Gain: faster response. Give up: per-interaction audit detail. Reversal: redesign of the interaction layer plus compliance exposure for the gap period |
| 3. Feedback loop | Periodic output audit | Trigger: calendar-based (quarterly), fires regardless of metrics. Owner: compliance lead. Action: stakeholder review with the audit record |
| 4. Documentation | Decision row | Context strategy, explicit in-region via Bedrock. Rejected alternative: the global Bedrock endpoint. Why it's load-bearing: a successor reverting to global breaks residency |
| 5. Entry point | Primary / secondary | Primary: AWS Bedrock with explicit in-region config. Secondary: direct API for non-regulated tasks. Config step: set the region parameter explicitly — do not rely on the default |
| 6. Outcome document | Before / after / control | Before: average time from dictation to clinician-authorized note. After: same metric post-deployment. Control: the clinician-authorization log (timestamped, tying clinician + note + interaction) |
| 7. Phase transition | Gate status at week 4 | Gate = outcome document with before/after + auditable control + measurement owner. Not yet satisfied — the after-metric needs more runtime. Action: name the owner, confirm control logging, schedule completion at a defined milestone |
7.10 Domain 6 rapid drill
| Situation | Correct move |
|---|---|
| Sponsor insists on "100% accurate" | Explain probabilistic nature → define measurable acceptance criteria + error-handling strategy |
| "We need a chatbot for our intranet" | Structured discovery first — the chatbot may not be the answer |
| CFO orders cheapest model despite higher error rate | Present evidence-based tradeoff, recommend, let the accountable owner decide |
| Sub-second demanded, three-second floor | Latency breakdown + negotiate a realistic SLA + streaming/progress indicators |
| Handoff artifact set | Decision records with tradeoffs + operational runbooks + re-runnable eval baselines |
| Sponsor enthusiasm fading, report shows only tech metrics | Report against agreed business success criteria; tech metrics as supporting detail |
| Two discovery outputs required before design | Measurable success criteria + data availability/quality/access/compliance assessment |
| Scope creep mid-build — two practices | Assess each request against the baseline with visible impact + re-baseline with sponsor sign-off |
| Three tradeoff elements | Gain · Give up · REVERSAL COST (+ compliance posture if regulated) |
| Four discovery question categories | Must DO · Must NOT do · Must COST · Must PROVE |
| SLA names | What's measured · what counts as a breach · what happens on breach |
| Regulated review trigger type | Calendar-based schedule, not a threshold |
| Outcome document — what proves value | Before/after on a BUSINESS metric with an auditable control |
| Documentation completeness test | Can an architect who wasn't in the room make a safe change? |
| Most dangerous documentation gap | Rejected alternatives and the reasoning — the WHY leaves with you |
PART 8 — Domain 7: Developer Productivity & Operational Enablement (7% · ~4 items)
Smallest domain, easiest points. This is platform engineering by another name: shared configuration, governed distribution, guardrails on automation, and runbooks. If you've run a platform team, you already believe all of it.
8.1 Team setup — four decisions made up front
| Decision | What it covers | The key consideration |
|---|---|---|
| 1. Environment | A shared configuration baseline | Shared CLAUDE.md, an agreed set of tools and MCP servers, permission posture — reviewable, versionable, improvable once for everyone |
| 2. Rollout | How access is granted | Champions first, then batches — never an all-hands switch-on |
| 3. Skills distribution | How reusable assets reach the team | Four mechanisms, each with different access, versioning, and rollback characteristics |
| 4. Spend posture | Cost guardrails | Model defaults, allowlists/restrictions, effort guidance, spend/rate/per-user caps |
Shared configuration
A team environment is a shared baseline every developer starts from, not personal setups that drift apart.
🔧 Analogy: it's the difference between a shared, version-controlled Terraform module and 40 engineers each maintaining their own copy of the same thing. The value isn't the config — it's that you can improve it once and everyone inherits.
The champion-and-batch rollout
| Step | What happens |
|---|---|
| 1. Champion per department | Granted access first. Proves the workflow on a real task (~2 weeks). Absorbs the early friction. Builds local examples |
| 2. Batch rollout | The champion runs sessions for peers (e.g. a 45-minute session for five colleagues) and becomes first-line support |
| 3. Broad rollout | Every department now has a working example, a local expert, and a tuned CLAUDE.md |
⚠️ Why not mass rollout? A single mass email produces a spike of confused first-time prompts, followed by a quiet retreat to old habits. You never see the retreat in a dashboard.
The two adoption failure modes
| Failure mode | What happens | Fix |
|---|---|---|
| Lumpy adoption | A few developers use it heavily; the rest barely touch it. The team never realises the real gain and practice never standardises | Champion-and-batch rollout spreads usage deliberately |
| Stalling at basic chat | The team uses Claude as a question-answering box and never advances to tool use, repository-aware assistance, or packaged Skills | Configure for real enablement within current workflows. Access ≠ adoption |
Spend posture — set before the first bill
| Lever | What it controls |
|---|---|
| Model defaults | Which model a session starts on |
| Model allowlists and restrictions | Which models the team may switch to |
| Effort guidance | How hard the model works on a task |
| Spend, rate, and per-user caps | Keeps consumption within bounds |
⚠️ Leaving model choice unmanaged quietly routes work to a more capable, more expensive tier than the task requires. At team scale that multiplies across every member and every request.
8.2 Skills distribution — the governing question
Who must be able to reach it, and who must be able to update or revoke it?
| Mechanism | Access control | Versioning & rollback | Use when |
|---|---|---|---|
| Org-provisioned Skill | Everyone in the org | None | Genuinely needed by all, no governance requirement |
| Plugin (organization-managed) | Group or org targeting | Version-controlled updates + rollback | Whenever you need versioning, group targeting, or rollback |
Claude Code project Skill (.claude/skills/) |
Scoped to the project | Versions with the repository | A coding convention and toolset for one engineering team |
| API Skill | Explicit version pinning | Explicit version pinning | A capability your products must invoke programmatically |
Plugin install preferences: required · installed-by-default · available · not available
⚠️ The answer to "we need to roll this out to every department identically, and be able to revoke it from one place" is always the organization-managed plugin. An org-provisioned Skill reaches everyone but offers no versioning or rollback.
💀 Failure story — the Skill with no way back. 40 engineers, a flat bundle, one well-meaning edit, the wrong format shipping across every team, and a manual re-edit while bad output kept going out. A shared asset with no version and no way back is a liability the moment more than one person depends on it.
8.3 AI-assisted developer workflows
Integrate into the existing workflow
AI tooling pays off when it lives inside the existing workflow — the editor, the review process, the test loop — not in a separate chat window visited occasionally.
Integration is also how team knowledge gets encoded: conventions, review standards, and repeated procedures become Skills and project configuration that Claude applies consistently.
Diligence — the discipline that keeps AI work trustworthy
Diligence is one of the four AI Fluency competencies. Applied to developer workflows:
- Hold AI-generated code to the same standards as any other code: correctness, security, maintainability
- Watch for judgment erosion: engineers accepting output they no longer fully understand, because it looks right and passes a check
The verification checklist — four dimensions, gating before production
| Dimension | The check |
|---|---|
| Correctness | Tests exist and pass; behaviour matches the stated requirement, including edge cases |
| Security | No secrets in code; inputs validated; tools and external calls use least-privilege access |
| Maintainability | Code reads clearly, follows team conventions, no unexplained complexity |
| Human understanding | The developer submitting the change can explain what the code does and why — including how it handles inputs it was not explicitly tested against |
Wherever a check can be automatic, it should be. A regression test suite plus an eval set turn correctness and behaviour verification from a judgment call into a gate that runs on every change.
💀 Failure story — the merge nobody could explain. A team adopted AI-assisted coding and shipped faster. A generated change passed code review and tests, went to production, and leaked data through an unvalidated input. The author could not explain why the code handled the input the way it did.
Speed had quietly replaced understanding. The checklist question that would have caught it: "Can the person merging this explain what it does and why?"
If the author can't explain it, HOLD the merge.
Independent review
"A team uses an AI assistant to both write and review code. Reviews of AI-authored changes rarely raise issues, yet defects still reach production."
Answer: have review performed independently of the authoring session or agent — a fresh context is not anchored to the reasoning that produced the code — with humans retaining merge authority.
A reviewer anchored to the reasoning that produced the code inherits its blind spots. Skipping review removes the gate. Asking the same session to review again repeats the anchoring. Limiting AI authoring to test files restricts authoring without improving review.
🔧 Analogy: it's the same reason you don't let the person who wrote the change approve their own PR, and the same reason a chaos-test designed by the author of the system tests the author's mental model rather than the system.
Scaling safely — the two practices
"A platform team wants to scale AI-assisted development across the organisation without introducing operational risk."
- Maintain shared configuration, prompt standards, and reusable workflows in version control so teams inherit proven practice — the accelerator
- Constrain what automated tooling is permitted to execute — allowed commands, protected branches, approval gates for destructive actions — the brake
You need both. Unrestricted credentials maximise blast radius. Prohibiting developers from inspecting AI-generated code removes human oversight. Adopting every new tool on release adds churn without vetting.
The team consistency question
"Rolling out AI-assisted coding to 30 people. Early adopters each configured the tooling differently, producing inconsistent code style and duplicated effort."
Answer: establish shared, version-controlled project configuration and standards that every team member's tooling inherits, reserving personal configuration for individual preferences.
Consistency where it matters, freedom where it doesn't. Letting everyone continue is the current problem. Restricting the tooling to two senior engineers reduces the productivity the rollout exists to create. Mandating hand-rewriting discards the gain entirely.
Claude Code customisation layers
Worth knowing the split:
| Purpose | Layers |
|---|---|
| SHAPING — what the agent knows and does | CLAUDE.md, Skills, Subagents, MCP servers |
| GOVERNING — what the agent can touch | Hooks, permission boundaries, sandboxing |
⚠️ Hooks are in the governing column because they are deterministic code that fires on an event — the model cannot skip them. That's what makes them a control rather than a suggestion.
8.4 Operational support and debugging
Support is translation, not firefighting
| What it is | Consequence | |
|---|---|---|
| Firefighting | You resolve one incident yourself | The load repeats next time |
| Support that lasts | You teach the team the symptom → cause path they can follow again | The class of problem is solved |
The role: the team identifies the symptom (latency spiked, outputs degraded, a tool is failing). The architect connects the symptom to an architecture cause — and writes the path down.
The symptom → cause map (the foundation of a runbook)
| Symptom | Likely architecture cause |
|---|---|
| Latency spike | Model tier mismatch · output length · context window saturation |
| Output quality degradation with no code change | Model or prompt drift · retrieval drift (the corpus grew, the index didn't keep pace) |
| A tool started failing | Tool API change · permission/scope issue · circuit breaker tripped |
| Cost spike | Volume increase · model tier escalation · caching not applied / cache-miss rate up |
Diagnose before you treat
"A production agent has begun taking unexpected actions on a subset of requests. The on-call engineer's instinct is to immediately rewrite the system prompt."
Answer: inspect the traces of affected sessions — inputs, retrieved context, tool calls, and outputs — to identify the actual failure mode before changing anything.
Traces reveal whether the failure lives in the inputs, the retrieval, the tool behaviour, or the prompt. Changing the prompt first risks masking the real cause and destabilising behaviour that currently works. Rolling back to a six-month-old model version is a large intervention with no evidence it targets the cause. Disabling the agent permanently abandons the system over a subset failure.
Building self-sufficiency — two artifacts
| Artifact | What it is |
|---|---|
| Runbook | The captured set of known symptom → cause → action paths, so the team resolves recurring issues without you |
| Escalation path | A named definition of who handles what, and when an issue leaves the team |
Goal: the team needs you only when NEW problems arise — never for ones you have already taught them to face.
💀 Failure story — the drift that waited for quarterly review. Dashboards stayed green for an entire quarter while answer quality quietly slid. Nobody connected the slow decline to its cause: a growing retrieval corpus the index hadn't kept pace with. The missing runbook entry was one line: "gradual quality decline with no code change → points at model, prompt, or retrieval drift." With that path written down, a first-line engineer could have resolved it in an afternoon. Without it, it waited for the quarterly review.
8.5 Domain 7 rapid drill
| Situation | Correct move |
|---|---|
| 30 devs, everyone configured differently | Shared version-controlled project config; personal config for preferences only |
| AI writes and reviews code; defects still ship | Independent review in a fresh context; humans retain merge authority |
| Agent taking unexpected actions; instinct is to rewrite the prompt | Inspect traces of affected sessions FIRST |
| Scale AI dev org-wide safely — two practices | Shared standards in version control + constrain what tooling may execute |
| Roll out identically to every department, revocable centrally | Organization-managed plugin |
| Gradual quality decline, no code change | Model / prompt / retrieval drift — check corpus and index first |
| Adoption failure modes | Lumpy adoption · stalling at basic chat |
| Rollout method | Champion per department, then batches — never mass switch-on |
| Four verification dimensions | Correctness · Security · Maintainability · Human understanding |
| Author can't explain the change | HOLD the merge |
| Two self-sufficiency artifacts | Runbook + escalation path |
| Spend posture set when? | Before the first bill — defaults, allowlists, effort guidance, caps |
PART 9 — Scenario Archetypes: 24 Pre-Solved Patterns
How to use this. These are the recurring shapes. Rehearse them until recognition is reflexive. On exam day, most questions will be a costume change on one of these. Read the Signal, say the Answer out loud, then check the Why.
#1 — The over-privileged agent Signal: an agent has tools a role never uses; a security review flags it. Answer: Remove the unnecessary tools from the configuration. Why: privilege removal is preventive. Logging is detective. A confirmation prompt is compensating. A better model is irrelevant — capability ≠ authorization scope.
#2 — Repeated static prompt + cost/latency pressure Signal: the same large system prompt or policy document on every request; the user message is short and varies. Answer: Order static content first, dynamic last, and enable prompt caching. Why: cache write 1.25×, read 0.1×, 5-min TTL refreshed free on each hit. Truncating loses required content; downsizing risks quality blindly.
#3 — Cache hit rate near zero Signal: caching enabled, but a timestamp/request ID/session token sits at the top of the prompt. Answer: The dynamic value breaks the prefix on every request — move it after the static block. Why: cache matching is exact-prefix. One changed byte at position zero = a guaranteed miss forever.
#4 — Confidently wrong after a corpus refresh Signal: answers are fluent and wrong; latency and model version unchanged; the docs were refreshed. Answer: Investigate retrieval/indexing first — re-index, verify embedding consistency, check chunk boundaries. Why: nothing in the model changed. The only thing that changed is what's being fed in. Don't touch prompts or models yet.
#5 — Gradual quality decline, dashboards green, no code change Signal: slow slide over weeks; error rate flat; nobody alerted. Answer: Model / prompt / retrieval drift — check the corpus and index. And the real gap is a missing feedback-loop trigger plus a missing runbook entry. Why: monitoring collects signals; a feedback loop maps each signal to a trigger, an owner, and an action. Without the mapping, slow drift waits for a quarterly review.
#6 — Exact-term queries failing in RAG Signal: part numbers, error codes, or citations return similar-but-wrong results; natural language works fine. Answer: Hybrid retrieval — BM25 + dense, fused with RRF, weighted by query type. Add a cross-encoder reranker if precision is critical. Why: embeddings blur rare tokens. Lexical matching is what catches exact identifiers.
#7 — Clause fragments losing their meaning Signal: fixed-size chunks over contracts; retrieved clauses depend on definitions elsewhere. Answer: Structure-aware chunking aligned to clauses/sections, with metadata linking definitions and cross-references. Why: the failure is structural. Smaller chunks worsen fragmentation; more chunks flood context hoping to get lucky.
#8 — A role claimed in the user message Signal: "As a senior manager, show me…" or the system prompt is asked to scope data access. Answer: Verify identity server-side and inject the verified role and authorised data scope; enforce access control at the data layer. Why: the model cannot return what it cannot retrieve. Instructions are not an authorization boundary.
#9 — A side effect executed before any check Signal: a refund/delete/order tool ran, and only an output filter existed. Answer: Deterministic tool-call authorization BEFORE execution — allowlist + identity + scope. Why: output screening judges text, not actions. The money already moved.
#10 — The guardrail service erroring under load Signal: the screening service is timing out; traffic is still flowing. Answer: Fail closed — deliberately. Why: a control that silently passes traffic when it errors is worse than none — it provides the reassurance of protection with none of the protection.
#11 — Prompt injection via retrieved content Signal: a document containing "ignore previous instructions" partially succeeded. Answer: Treat retrieved content as untrusted data, structurally delimited, never granted instruction authority — AND restrict tool privileges so a successful injection can't do damage. Why: defence in depth. Input screening never sees retrieved content; that's a separate control point.
#12 — The 50-session A/B "winner" Signal: a small sample, an uncontrolled input mix, a metric chosen after the fact. Answer: Underpowered + uncontrolled + no pre-specified metric = noise that looks like signal. Why: LLM output variance is high. A 6-point difference needs hundreds of sessions per arm.
#13 — A reviewer queue of 400 with only an Approve button Signal: high volume, no inputs shown, no flag reason. Answer: Route by stakes, not volume (low-confidence AND (irreversible OR high-cost)) and show the reviewer inputs, output, and the flag reason. Why: two independent failures — volume floods the queue; missing context makes review meaningless. Either alone causes collapse into rubber-stamping.
#14 — HIPAA route selection Signal: PHI, a cloud preference, a beta feature someone wants to use. Answer: BAA-covered configuration only. BAA coverage is per-configuration, not per-vendor. Betas are generally excluded. Minimum-necessary PHI with server-side redaction before the call. Why: compliance eliminates options before you weigh preferences.
#15 — POC → production sizing Signal: the demo works, someone asks what it will cost at scale. Answer: Volume × token DISTRIBUTION (not average) × tier. Design for p95, not median. Backoff + fallback + circuit breaker from day one. Why: the POC lies about four things: cost, latency, reliability, and failure modes. Average-based models understate by 2–3×.
#16 — "It must be 100% accurate" Signal: an executive sponsor with an absolute requirement. Answer: Explain the probabilistic nature, then jointly define measurable acceptance criteria and an error-handling strategy proportionate to business risk. Why: convert an unachievable absolute into an achievable agreement. Don't agree, don't walk away.
#17 — The four-cents approval Signal: a stakeholder approved a design after hearing a per-unit cost. Answer: Always present gain, give-up, AND reversal cost — plus the figure at production volume. Why: an accurate presentation can still produce false alignment. Reversal cost is the element that changes the meeting.
#18 — The successor who broke residency Signal: a replacement engineer changed a strategy to fix performance and broke a compliance constraint. Answer: Document decisions WITH rejected alternatives and the reason each was rejected. Why: the diagram carries the WHAT; without the WHY, a successor reverses the right decision for an understandable wrong reason.
#19 — The outcome document the CFO rejected Signal: the report showed volume, latency, and error rate. Answer: Before/after on a BUSINESS metric, backed by an auditable control, with a named measurement owner. Why: technical metrics prove the system runs. Only the business before/after proves what it's worth. Capture the before-metric at the start.
#20 — The compliance control that was real at design time Signal: the right route was chosen, the design doc maps obligations to controls, and an audit finds a gap. Answer: Every obligation needs a control + a named owner + a living evidence artifact, revalidated on a cadence. Why: a control with no owner and no artifact silently goes non-operational and surfaces at audit.
#21 — One agent, too many domains Signal: 35+ tools, a 6,000-token prompt spanning three business areas, tool-selection accuracy declining, and stakeholders want to add a fourth domain. Answer: Split into domain-specific agents behind a router or supervisor, each with a focused toolset and prompt. Why: declining selection accuracy as breadth grows is the classic overload signal. Splitting makes the new domain an addition, not a further burden.
#22 — Retrieval where a tool call belongs Signal: answers contradict the database; results shift after an index refresh; the data has a current value owned by a system. Answer: Call the owning system directly. Retrieval is for stable knowledge; tool calls are for live state. Why: described in the source material as the single most common architectural mistake.
#23 — Cross-organisation agent coordination Signal: two autonomous agents, two companies, neither will expose internals. Answer: Agent-to-agent protocol with each agent mediating access to its own systems — plus a contract and propagated trace IDs. Why: the defining characteristic is the organisational trust boundary. MCP and direct API both require exposing what neither party will expose.
#24 — The agent behaving unexpectedly, and the instinct to rewrite the prompt Signal: unexpected actions on a subset of requests; on-call wants to rewrite the system prompt now. Answer: Inspect traces of affected sessions first — inputs, retrieved context, tool calls, outputs. Why: diagnose before treating. Changing the prompt first can mask the real cause and destabilise behaviour that currently works.
PART 10 — Interview Preparation: 60 Architect-Level Q&A
Different muscle from the exam. The exam wants the best option. An interview wants your reasoning, your tradeoffs, and a story. For each answer below: give the principle, then the tradeoff, then a concrete example.
The universal interview structure — use it every time:
1. Restate the constraint "So the binding constraint here is X." 2. Name the options "There are broadly three ways to do this…" 3. Give the tradeoff "A buys us Y at the cost of Z; reversal cost is W." 4. Recommend + justify "I'd go with B, because the constraint that dominates is…" 5. Name what would change it "If volume were 10× or the SLA were 500ms, I'd switch to A."Point 5 is what separates a senior answer from a competent one.
A. Architecture & Design (Q1–12)
Q1. When do you choose a workflow over an agent?
When the steps are known in advance and are the same every request, and when each step must be individually auditable and reproducible. The rule I use: if I could have written the steps in code, it's a workflow. Agents cost you predictability, observability, latency, and cost control — all four. I only pay that when the path genuinely can't be determined until execution. A useful sanity check is whether I can draw the flowchart; if I can, an agent is over-engineering.
Q2. When is multi-agent actually justified?
Two conditions, and only two. First, distinct sub-tasks need genuinely different specialisations, tools, and context that would overload one agent's prompt and tool catalogue. Second, independent sub-tasks can run in parallel to cut end-to-end time. Volume isn't a reason — that's a scaling problem solvable in any pattern. Budget isn't a reason. Stakeholder appetite for sophistication definitely isn't a reason.
Q3. Walk me through how you'd decompose a business process for AI.
Three buckets. Claude takes language understanding, summarisation, classification, planning, drafting, and tool-mediated action. Existing systems keep anything already reliable and deterministic — the rules engine, the pricing service, the database of record. Humans keep judgment calls, exceptions, approvals, and anything irreversible and high-stakes. The framing question isn't "where can Claude help?" — it's "where do Claude's properties beat the system that already does this correctly?" I've seen a team hand a deterministic £5,000 threshold rule to a model and get 41 misroutes out of 14,000 because an email said "around five thousand." The rule was precise; the input wasn't. That rule belonged in code.
Q4. What's the most common architectural mistake you see?
Using retrieval where a tool call belongs. The tell is obvious once you know it: answers contradict the database, results shift after an index refresh, and stale figures surface. The rule is clean — retrieval is for stable knowledge that was true yesterday and will be true tomorrow; a tool call is for live state owned by a system. Inventory, pricing, order status, account balances are never RAG.
Q5. How do you decide between a fixed workflow and progressive discovery?
Corpus size and stability. If the corpus fits comfortably and is stable, monolithic context plus caching is simpler and cheaper — one call, cache-friendly. If the corpus is large or dynamic, or only a small subset is relevant per request, progressive discovery pays. The costs of progressive are real: tool-call latency, loop complexity, and you must define explicit stopping criteria or the loop is unbounded.
Q6. How do you size a use case before committing?
Four inputs and a sequence. Volume from the business owner, never from developer intuition. Token budget per request — modelled as a distribution, because heavy tails make average-based models understate by two to three times. Model tier. Then a sensitivity analysis: what if volume doubles, what if the mix shifts to the tail. And I gather the constraints before I answer the capability question. I've watched an architect confirm feasibility and then discover 800 requests a day, 300-page inputs, and a 30-second SLA — all three disqualifying.
Q7. What are your feasibility verdicts?
Three. Feasible as scoped — all properties favour it, cost within ceiling, latency within SLA. Feasible with constraints — works under specific conditions like a document-length threshold or a mandatory human gate, and those constraints are part of the architecture, not caveats. Not feasible — a property limitation can't be compensated in scope or budget. And "not feasible" is only a complete answer when I also name the scope reduction that would change the verdict.
Q8. How do you design an orchestrator-worker system?
The orchestrator owns the goal and never does sub-task work. Subagents own scoped sub-tasks in their own context, with tools scoped to their own task only. Five rules: least privilege per worker, a shared trace ID across orchestrator and all workers, explicitly defined recoverable versus unrecoverable boundaries, a coverage check at synthesis so results returned equals units dispatched, and checkpoint gates before irreversible actions. The asymmetry matters — a subagent failure is usually recoverable, an orchestrator failure usually isn't.
Q9. What's the coverage check and why does it matter?
At synthesis, verify that the number of results returned equals the number of units dispatched. A silently dropped subagent output is the classic orchestration bug: the final answer looks complete and coherent, and a whole section of the analysis is simply missing. Nothing errors. Nobody notices until a customer does.
Q10. How do you pick a first use case for an organisation?
Measurable business value — cost, efficiency, or an SLA improvement — combined with feasible data access and manageable risk. Not the flashiest agentic showcase, not the most enthusiastic department, not the fastest to ship. Those optimise for spectacle, politics, and speed. The first project sets the credibility for everything after it, so it needs a number a CFO recognises.
Q11. What's missing from a system with cost and latency dashboards but no quality signal?
The feedback stage. The loop is input → processing → output → feedback, and the fourth step is what's absent. Concretely: capture downstream corrections and user signals, and route a sample of production outputs into a labelled evaluation set. Without it you know the system is fast and affordable and you have no idea whether it's right.
Q12. How would you handle a 60-page document, 40 policies, scoring, and a recommendation in one prompt that's producing shallow, incomplete output?
Decompose it. The failure signature — items skipped, reasoning shallow — is a structure problem, not a capacity problem. Sequenced subtasks: extract, assess per policy group, score, then synthesise, with structured output passed between steps. Each step gets focused context and produces something verifiable. A bigger model treats capacity as the issue when structure is; more few-shot examples add guidance where structure is the gap.
B. Models, Prompting & Context (Q13–22)
Q13. How do you choose a model?
Start at Sonnet, upgrade only on evidence. Not choosing is choosing the most expensive one. Before switching tiers I'll try the
effortparameter, which trades intelligence against latency and cost within one model. In workflows I route per step — Haiku for classification and extraction, Sonnet or Opus for synthesis. And I optimise cost per completed task, not per token: a smarter model that gets it right first time can beat a weaker one that needs three attempts and a human fix.
Q14. Explain prompt caching and its economics.
It caches an exact prompt prefix. Hit means reuse at 10% of input cost with a big latency win; miss means full processing plus a write. A 5-minute write costs 1.25× and pays for itself after one read; a 1-hour write costs 2× and pays back after two. The TTL refreshes free on every hit, so a steadily-used prefix stays warm indefinitely. The design consequence is simple: static content first — system prompt, policy, tool definitions — dynamic content last. And there's a throughput benefit people miss: cache reads don't count toward input-tokens-per-minute limits, so an 80% hit rate roughly quintuples your effective throughput.
Q15. A team has caching enabled and a near-zero hit rate. Diagnose it.
Almost certainly a dynamic value at the front of the prefix — a timestamp, a request ID, a session token. Matching is exact-prefix, so one changed byte at position zero means a guaranteed miss on every request. Move it after the static block. The other thing I'd check is whether the static block clears the minimum cacheable length: 1,024 tokens on Sonnet, 4,096 on Opus and Haiku.
Q16. When is chain-of-thought worth it?
On genuine multi-step reasoning with interacting conditions. Not on simple extraction. It's the most expensive technique because it produces output tokens, and output is roughly five times the input price at every tier, plus the latency. I apply it per-task based on measured benefit, never platform-wide. I've seen a team apply it uniformly, improve a contract-analysis feature, and make a field-extraction endpoint slower and more expensive for zero accuracy gain.
Q17. A critical rule is being followed inconsistently. What do you do?
First check where it sits. If it's buried mid-prompt, that's lost-in-the-middle — recall is strongest at the head and tail. Move it to the beginning or end and structurally separate rules from reference content. Second, add explicit priority ordering if rules can conflict. Third, add concrete examples of correct handling for the cases it's getting wrong. What I won't do is repeat it after every paragraph, lower the temperature, or upper-case it — those address randomness or superstition, not rule salience.
Q18. When does a prompt become a Skill?
When it needs to run the same way every time, reach across teams and products, and carry governance — versioning, approval, rollback. A modular prompt library is fine for one codebase where things get tweaked per use. The moment more than one team depends on it, you need version control and a way back. I've seen a flat-bundle Skill pushed to 40 engineers, one well-meaning edit ship the wrong format everywhere, and the fix require manual re-editing while bad output kept going out. That's an organization-managed plugin, not a flat bundle.
Q19. How do you budget a context window?
The window is a ceiling, not a target. I budget for the largest realistic conversation plus retrieved context plus system prompt plus tool definitions plus working scratch plus output headroom plus margin. Same instinct as a pod memory limit — you don't size at 100% or you get OOMKilled at the worst moment. Practically: 1 token ≈ 0.75 words, an 80-page document is about 29k tokens, a 300-page document is 100–120k.
Q20. What's lost-in-the-middle and how do you design around it?
Recall is strongest at the beginning and end of context, weakest in the middle. Two consequences. In prompt design, critical instructions go at the head or tail. In RAG, the highest-ranked chunks go at both the head and the tail of the assembled context. Anthropic's contextual-retrieval work found top-20 outperformed top-10 and top-5, and that placement matters at that scale.
Q21. When do you enable extended thinking?
Only when an eval shows a measured accuracy gap that justifies the cost. I run evals without it first. Thinking tokens are billed as output tokens — five times input — and they add real latency. "It can't hurt" isn't a reason; it demonstrably hurts cost and latency. Also worth knowing the API has moved: adaptive thinking via
effortis the recommended path, and manualbudget_tokensis deprecated on 4.6 and removed on Sonnet 5.
Q22. Should the system prompt enforce your data-access policy?
No, and this is one of the few places I'd push back hard. A system prompt is guidance, not enforcement. Anything adversarial input can talk the model out of needs a runtime control — deterministic authorization, input and output screening. If the rule protects money, data, or a person, it does not live only in the prompt. The correct architecture makes it so the model cannot retrieve what it must not return.
C. Integration, RAG & MCP (Q23–36)
Q23. When would you use MCP versus a direct API integration?
MCP solves the N×M problem — N applications times M systems becomes N plus M. I use it when many AI surfaces need reusable, discoverable access to many systems, especially with decentralised ownership and frequent tool churn: each team maintains one server and every application reuses it. Direct API when it's one system, one owner, a deterministic tightly-scoped call inside a pipeline I control. The cost of MCP is a protocol layer to debug — if there's only one client, skip it.
Q24. Explain MCP's architecture and primitives.
A host — the AI application — runs one client per server, and each server exposes capabilities. JSON-RPC 2.0, stateful sessions, capability negotiation at init. Three primitives, each with a different controller: tools are executable functions and are model-controlled; resources are read-only context data and are application-controlled; prompts are reusable templates and are user-controlled. Transports are stdio for local development and Streamable HTTP for production, which requires OAuth 2.1. Tools are discovered at runtime via
tools/listwith change notifications, which is what makes it plug-and-play.
Q25. When is agent-to-agent the right answer?
When you're crossing an organisational trust boundary and delegating a whole subtask to a peer with its own reasoning loop. The defining case is two companies whose agents must coordinate without either exposing internal systems. I'd go in with eyes open: it has the weakest observability and the hardest failure attribution of any integration option, so I'd insist on an explicit contract and propagated trace IDs.
Q26. Walk me through designing a RAG pipeline.
Two pipelines. Offline: ingest, parse, chunk, embed, store into a vector DB with metadata. Online: embed the query, retrieve top-k, optionally rerank, assemble context, generate. Chunking strategy comes from the source structure — recursive as the sane default, layout-aware for structured documents like contracts and manuals, parent-child small-to-big for mixed corpora where answer quality matters. Indexing strategy comes from the query pattern — dense for paraphrase, sparse BM25 for exact identifiers, hybrid with RRF for the common mixed case. And I put access control at the retrieval layer via metadata filtering, because that's the real security boundary.
Q27. What's the most common RAG bug you'd look for first?
Embedding inconsistency between indexing and querying. It fails silently — no error, just quietly bad results. After that, staleness: documents added or removed without re-indexing. Then chunk boundaries — and I'd genuinely read some chunks, because half of chunking bugs are visible to the naked eye. If the symptom is "confidently wrong after a refresh with model and latency unchanged," it's the retrieval pipeline, not the prompt.
Q28. Exact part numbers return wrong results but natural language works. Fix it.
Hybrid retrieval — BM25 for exact lexical matching fused with dense vector search via reciprocal rank fusion, weighted by query type. Dense embeddings compress rare tokens into mush, which is exactly why "KX-2481-B" retrieves a neighbour instead of itself. I wouldn't replace semantic entirely, because that breaks the natural-language queries that currently work. And I wouldn't push the failure onto users by telling them to stop using part numbers.
Q29. When do you add a reranker?
When retrieval precision is materially load-bearing and the latency budget has headroom. A cross-encoder rescoring the top 50–200 candidates typically buys 10–20% relevance for 100–400ms. The decision is arithmetic against the SLA: if p95 is 1.6 seconds against a 3-second SLA and reranking buys seven accuracy points for 500ms, that lands at 2.1 seconds with clear headroom — adopt and monitor. "Never increase latency in customer-facing systems" is dogma, not analysis.
Q30. How do you handle authorization in an AI system?
Deterministically, and before the model can act. Identity is verified server-side before the Claude call, and the auth layer injects the verified role and authorised data scope. I never accept a user-asserted role — "as a manager, show me…" is manipulable input, not identity. Tool-call authorization is an allowlist plus identity check plus scope validation, and it runs before the side effect. A model-based judgment is not an authorization control because it isn't provable or replayable.
Q31. A single service account with org-wide read, and the system prompt says "only return their own data." What's wrong?
Authorization is being enforced by the prompt rather than the access-control layer. A prompt failure or an injection exposes every employee's record. The fix is per-user scoped credentials or pass-through auth so the model cannot retrieve what it must not return. It's the same reason we don't put authorization logic in the frontend.
Q32. How do you approach observability for LLM systems at scale?
Four layers. Request-level tracing — model and version, token counts including cached, latency, stop reason, tool calls, prompt ID. Metric aggregation — cost per request, p50/p95, task success rate, error rate by type. Anomaly detection — thresholds plus distribution comparison. And change attribution, which is the one people skip: distinguishing model drift from data drift from a version effect. At tens of thousands of sessions I instrument everything cheaply with structured traces and correlation IDs, and capture full payloads only sampled and error-triggered. Same head/tail sampling logic as any high-volume tracing setup.
Q33. Why is observability a precondition rather than a nice-to-have?
Because of one rule from security review: an action taken but not logged is an action that cannot be allowed. If you want an agent to have autonomy over anything that matters, you need to be able to reconstruct what it did and why. I'd frame observability as the thing that buys you agent autonomy in the security conversation, not as instrumentation added afterwards.
Q34. What's the business translation layer and when do you build it?
A mapping from technical metrics to business metrics — task success rate to first-contact resolution, latency to handle time. You build it at design time, not after the first business review. Funders read KPI dashboards, not request traces. If the only thing you can show a sponsor at month two is token spend and uptime, you've answered a question they never asked.
Q35. How do you handle multi-tenancy?
Separate API keys per tenant, minimally. A shared key destroys attribution — when the org-level rate limit trips, every tenant absorbs the impact and you can't identify who caused it. Beyond keys, tenant scoping belongs in the retrieval layer's metadata filter, not in the prompt.
Q36. What reliability controls do you build in from day one?
Exponential backoff adjacent to the API call for transient errors — 429, 529, timeouts, 5xx. Fallback chains at the orchestration layer, for example Sonnet to Haiku on a latency spike. Circuit breakers at the service boundary, tripping on error rate with a cooldown so you fail fast instead of waiting for timeouts. All three from the start — retrofitting reliability is far harder than designing it in, and the POC will never surface the need.
D. Evaluation & Operations (Q37–46)
Q37. Why write evals before code?
Three reasons. It forces you to state what success means in measurable terms before you're attached to an implementation. It exposes design assumptions while they're cheap to change. And it gives you a gate for every future change — model swap, prompt revision, retrieval config. The governing line I'd use is: if you can't write an eval for a behaviour, you have no reliable way to know whether that behaviour is present.
Q38. Describe your grading ladder.
Cheapest reliable first. Code-based wherever the behaviour allows — schema, exact match, regex, presence, length. Milliseconds, free, never drifts. LLM-as-judge only where interpretation is genuinely required, with a detailed rubric, constrained verdicts, calibration against human labels, and a different model from the one being evaluated to avoid self-preference. Human review last, for high-stakes and novel cases. In a well-designed claims eval, five of six dimensions are code-based and only summary faithfulness needs a judge.
Q39. What's wrong with an uncalibrated judge?
It's worse than no automated grade. It produces confident scores with no validated link to quality, so it looks trustworthy while telling you nothing. Calibrate against human-labelled outputs before you trust a single verdict. And once calibrated, favour volume over perfection — many auto-gradable cases catch more regressions than a handful of hand-graded ones.
Q40. How do you build a golden dataset?
From the real input population — anonymised production queries — augmented with deliberately constructed edge cases and each known failure mode as its own labelled category. Not synthetic questions generated from the documentation, which inherit the documentation's blind spots. Not questions written by the engineers who built it, which test the builders' assumptions with the builders' assumptions. And I'd keep it current, because the highest-risk state is an eval suite that's present but stale — green while measuring behaviour that no longer exists.
Q41. How do you run a valid A/B test on an LLM feature?
Four non-negotiables. A specific, falsifiable hypothesis naming the treatment, the metric, the threshold, and the secondary-metric constraints. Random assignment that's consistent per user or session, with the input distribution controlled. A primary metric fixed before the run. And a sample size calculated from the minimum detectable effect. LLM variance is higher than deterministic systems, so it needs more samples than people expect — hundreds per arm, not fifty. Before declaring a winner I ask two things: is the effect big enough to justify the operational overhead, and did any secondary metric degrade?
Q42. When do you use shadow testing instead?
When a single bad output is too risky to expose, when traffic is too low for a meaningful split, or when the regulatory posture forbids exposing users to the new version. You run the new version in parallel on copies of live requests, serve the current version to everyone, and score offline. The cost is real: no downstream signal — no user acceptance, no follow-up behaviour — so you're relying entirely on an offline rubric.
Q43. How do you roll out a new model version?
Full eval suite first, then canary traffic with regression monitoring, then ramp. Exactly like an AMI or base-image bump. The full suite catches task-level regressions that spot checks miss; the canary bounds the blast radius of whatever the suite didn't catch. Switching everything at once assumes "newer" means "better on your tasks," which is an assumption, not a fact.
Q44. Walk me through diagnosing a quality regression.
Three steps. What changed — a deploy, a corpus refresh, a model version, or the input mix? Cheapest check first. Then a distribution comparison to classify it: model drift means behaviour changed on stable inputs; data drift means the inputs changed underneath you; a model-update effect means the version moved. If code, model, and prompts are genuinely unchanged, the two most useful sources are end-to-end traces of affected sessions and an input-distribution drift analysis.
Q45. How do you tell a hallucination from a prompt failure from a model mismatch?
Hallucination is content the model invented that isn't grounded in the source or the tool result — a fabricated citation, an invented tracking number. Prompt failure is ambiguous or conflicting instructions producing wrong-but-plausible output on a valid input; "be concise" alongside "explain in detail" is the textbook case. Model mismatch is a capability gap — fine on easy inputs, degrades on long or specialised ones despite well-structured prompts. The fixes are completely different: grounding, prompt repair, and model selection gated by eval respectively.
Q46. Leadership wants a 40% cost reduction. What's your approach?
Evidence before levers. Trace-level cost analysis tells me whether the spend is actually in context size, cache misses, output length, or model tier — and it's usually not where people assume. Then I apply levers in order: caching first, model tiering and routing second, the
effortparameter third, Batch API for async workloads at minus 50%, output-length control, top-k tuning. Each step gets a quality evaluation. Switching everything to the smallest model is one lever applied blindly, and cutting max_tokens 40% across the board truncates outputs regardless of consequence.
E. Safety, Governance & Risk (Q47–54)
Q47. Explain the safety stack and who owns what.
Four layers. Trained behaviour is Anthropic's — broad harm classes, every request, no config. System-prompt instruction is mine — role, tone, stated constraints, but guidance, not enforcement. Runtime screening is mine — input and output content detection, but it doesn't authorize actions. Authorization is mine — whether this caller may take this action in this context. The dangerous failure is silent: assuming Claude enforces a rule that lives in none of those layers. I've seen a team watch Claude refuse every harmful prompt in testing, conclude their cross-business-unit data policy was covered, and then have a normal-looking in-domain request pull a forbidden record in production.
Q48. What's the difference between training-time alignment and inference-time control?
Training-time alignment is Anthropic's, general in scope, and it lowers baseline risk. Inference-time control is mine, specific to my deployment, and it enforces my rules. Claude cannot enforce a rule it was never given. A request can pass general alignment perfectly and still violate a deployment-specific policy — that's the gap architects exist to close.
Q49. Where do you place guardrails?
Three control points, three different jobs. Input screening before the model call. Output screening before the response reaches the user. Tool-call authorization before any side-effecting action. None substitutes for another. I'd also chain model-based and deterministic checks in series, because model-based classifiers can be evaded and deterministic rules are brittle — each covers the other's gap. And I'd add the fourth screening point people forget: retrieved content and tool outputs, before they enter context.
Q50. Fail open or fail closed?
Fail closed for safety controls, and as a deliberate documented choice. A guardrail that errors and silently passes traffic is worse than no guardrail — it provides the reassurance of protection with none of the protection. I'd rather return a 503 than serve unscreened output. And every blocked or failed gate gets logged, because incident reconstruction depends on it.
Q51. How do you defend against prompt injection?
Defence in depth on two axes. First, trust separation: retrieved content and tool outputs are untrusted input, structurally delimited as data, never granted instruction-level authority — the same principle as SQL parameterisation. Second, least privilege on tools, so that even a successful injection can't trigger a destructive or exfiltrating action. Indirect injection through retrieval is the dominant enterprise vector precisely because user-input screening never sees it, so it needs its own screening point.
Q52. How do you decide what goes to human review?
By stakes, never by volume. Three variables: reversibility, cost of a wrong decision, and confidence — and confidence is only useful if it's calibrated. The rule is: route to a person when low-confidence AND (irreversible OR high-cost). Cost and reversibility set what needs review; confidence sets how much volume you can safely let through. And whatever routes must show the reviewer three things — the inputs, the output, and why it was flagged. I've seen a 400-item queue with just an output and an Approve button; that's two independent failures and review collapsed into rubber-stamping within a week.
Q53. How do you turn a compliance obligation into something auditable?
Three artefacts per obligation: a specific technical control, a named owner, and a living evidence artifact — a signed agreement, a config screenshot, a log query that returns rows today. A control named in a design document with no owner and no artifact is a claim, not proof. I've seen exactly that go wrong: right route chosen, obligations mapped in a doc, and months later a logging config change wrote metadata to a second region. Nobody owned the residency control. It was real at design time and silently false in production. So I also revalidate the register on a cadence — it's drift detection.
Q54. How do you approach fairness?
As an architectural property I instrument, not a model attribute I assume. Skew enters at four points I control: the retrieval corpus, the prompt framing, the few-shot examples, and downstream routing. A model passing published bias evals says nothing about my corpus. Removing explicit demographic fields doesn't remove bias either, because proxies like postcode carry the same signal. So: structured bias evaluation across demographic slices, per-subgroup breakdowns rather than aggregates, remediation, and standing fairness monitoring — plus decision-level logging, because if I can't reconstruct an explanation I can't reliably provide one.
F. Stakeholder, Lifecycle & Leadership (Q55–60)
Q55. A sponsor demands 100% accuracy. What do you say?
I'd explain that these are probabilistic systems and no amount of testing produces a 100% guarantee — and then immediately move to what we can agree: measurable acceptance criteria, thresholds tied to business risk, and an explicit error-handling strategy for what happens when it's wrong. The job is converting an unachievable absolute into an achievable agreement. Agreeing to the requirement commits to the impossible; declining walks away from a very solvable conversation.
Q56. How do you present a technical tradeoff to an executive?
Three elements, always: what we gain, what we give up, and what it costs to reverse once the system is built around it. Plus compliance posture in a regulated setting. The reversal cost is the one people skip and the one that most often changes the meeting — it turns "what's the better technical answer" into "what's the better business choice." I present it as a package: options considered, criteria, recommendation, residual risks, so the stakeholder can defend the decision to their leadership. And I put costs at production volume, not per-call. There's a well-known failure where a CTO approved "four cents a call" and got a five-figure monthly bill — the presentation was accurate and the alignment was false.
Q57. What does good discovery look like?
Structured elicitation, not a conversation. Four question categories: what must the system do, what must it not do, what must it cost, and what must it prove. The third and fourth are the ones people miss — stakeholders never volunteer boundaries, and in regulated workflows proof obligations are requirements. Every preference gets translated into a testable constraint: "seamless" becomes a p95 target plus a safe failure path. Output is a translation table with the statement, the implied constraint, the forced architectural decision, and any assumption labelled as an assumption. The anti-pattern I actively guard against is proposing an architecture sketch mid-call — a plausible sketch ends the questions and the stakeholder assumes you already have what you need.
Q58. What makes a handoff succeed or fail?
Rejected alternatives. A thorough architecture diagram without rationale is a trap: it carries the WHAT and loses the WHY. I've seen a replacement engineer switch a context strategy to fix performance and reintroduce the exact data-handling pattern the original design existed to avoid — breaking residency — because nobody wrote down why the original choice was made. So the package is: dated decisions, rejected alternatives with reasons, named tradeoffs including reversal cost, owners, evidence artifacts, plus runbooks and re-runnable eval baselines. The test I apply: can a competent architect who wasn't in the room make a safe change after reading this?
Q59. How do you prove value to a CFO?
A before/after on a business metric, backed by an auditable control, with a named measurement owner. Volume, latency, and error rate prove the system runs — they don't prove what it's worth. The critical operational point is that you have to capture the before-metric at the start; you cannot reconstruct it later. I've seen an outcome document get bounced by a CFO with exactly that question: "That tells me it runs. What were claim processing times before and after?"
Q60. What's the difference between monitoring and a feedback loop?
Monitoring collects signals. A feedback loop is the decision layer above it — it maps each signal to a trigger, an owner, and an action, through five stages: signals, triage, decide, act, review. Without that mapping you get the classic failure: dashboards green, error rate flat, eval score drifting down from week four, and a stakeholder saying "it's felt less useful lately" in week twelve. The loop would have caught it seven weeks earlier. In regulated deployments I'd also wire calendar-based triggers — a quarterly output audit and a residency confirmation that fire regardless of whether any metric moved.
Interview closers — questions worth asking them
Asking good questions signals seniority. Pick two or three:
- "How do you currently decide whether an AI feature is good enough to ship — is there an eval gate, or is it judgment?"
- "Where does authorization sit today for tool-using agents — in the prompt, or in code?"
- "What's your current story for reconstructing why a specific model decision happened, months later?"
- "How do you handle model version upgrades — pinned with an eval gate, or rolling forward?"
- "What proportion of your AI spend can you attribute to a specific workload right now?"
PART 11 — Glossary
Every term you need, defined in one line. Use this to check yourself: cover the definition, read the term, say it.
Architecture
| Term | Definition |
|---|---|
| Augmented LLM call | A single model call with tools/retrieval attached. Highest predictability, lowest autonomy |
| Workflow | A predefined sequence of steps with bounded model judgment in each. Sub-patterns: chaining, routing, parallelisation, evaluator-optimizer |
| Agent | A model that plans, acts, observes, and decides its next step in a loop. Lowest predictability, highest autonomy |
| Orchestrator / supervisor | Owns the goal; decomposes, delegates, sequences, synthesises. Never does sub-task work |
| Subagent | A scoped sub-task running in its own separate context with its own scoped tools |
| Chaining | Sequential workflow — step 2 consumes step 1's output |
| Routing | A classifier decides which downstream path runs |
| Parallelisation | Concurrent independent calls, results aggregated or voted |
| Evaluator-optimizer | Generate → evaluate → revise loop |
| Coverage check | At synthesis: verify results returned = units dispatched. Catches silently dropped subagent output |
| Decomposition | Splitting work across Claude / existing systems / humans, before choosing any pattern |
| Reference architecture | A named, tested design: agent, RAG, document pipeline, triage/routing, coding agent |
Model & prompting
| Term | Definition |
|---|---|
| Context window | The total token budget for a request. A hard edge — outside it there is no access |
| Lost-in-the-middle | Recall is strongest at the head and tail of context, weakest in the middle |
| Prompt caching | Caching an exact prompt prefix. Write 1.25× (5-min) or 2× (1-hour); read 0.1×; TTL refreshed free on hit |
| Cache breakpoint | Where the cacheable prefix ends. Automatic mode moves it; explicit mode allows up to 4 |
| Zero-shot / few-shot / chain-of-thought | The prompting ladder — lightest technique that meets the requirement |
| Structured output | Enforcing a JSON schema on the response |
| Prefilling | Starting the assistant turn to constrain the output format |
| Extended / adaptive thinking | A separate block of thinking tokens before the answer. Billed as output tokens |
effort parameter |
Trades intelligence against latency and cost within one model. Try before switching tiers |
| Progressive discovery | Model starts with a map/summary and fetches details on demand via tools |
| Compaction | Periodically summarising or compressing conversation history |
| Skill | A versioned, distributable bundle of instructions plus optional code |
| Plugin | An organization-managed bundle of Skills with group targeting, versioned updates, and rollback |
| Hook | Deterministic code that fires on an event — the model cannot skip it |
Integration & retrieval
| Term | Definition |
|---|---|
| MCP (Model Context Protocol) | A standard protocol connecting AI hosts to capability servers. Solves N×M → N+M |
| MCP host / client / server | Host = the AI app; one client per server; each server exposes capabilities |
| MCP tools / resources / prompts | Model-controlled / application-controlled / user-controlled respectively |
| Sampling (MCP) | A server asking the host's LLM for a completion |
| Elicitation (MCP) | A server asking the user for input or confirmation |
| stdio / Streamable HTTP | MCP transports — local/dev vs remote/production (OAuth 2.1 required) |
| Agent-to-agent | Delegating a subtask to a peer agent, typically across an organisational trust boundary |
| RAG | Retrieval-augmented generation — fetch relevant chunks at query time and generate from them |
| Chunking | Splitting source documents for indexing: fixed, recursive, semantic, layout-aware, parent-child |
| Parent–child (small-to-big) | Index small child chunks for precision, return large parents for context |
| Dense retrieval | Vector/embedding similarity search — good for paraphrase and concept matching |
| Sparse retrieval / BM25 | Keyword/lexical search — good for exact identifiers, part numbers, error codes |
| Hybrid retrieval | Dense + sparse combined, typically fused with RRF |
| RRF (Reciprocal Rank Fusion) | Merges ranked lists by rank position; favours items ranking well in both |
| Reranker (cross-encoder) | Rescores the top 50–200 candidates jointly. +10–20% relevance, +100–400 ms |
| HyDE | Embed a hypothetical answer instead of the raw query |
| Multi-Query | Generate 3–5 rephrasings, search in parallel, RRF-fuse the results |
| Contextual Retrieval | Anthropic's technique: chunk-situating context before embedding + contextual BM25 + reranker. ~67% fewer top-20 failures |
| HNSW / IVF | Approximate-nearest-neighbour index types |
| Metadata filtering | Index-level filtering — where tenant/ACL/recency security boundaries belong |
| Retrieval drift | Retrieval quality degrading as the corpus changes and the index doesn't keep pace |
Evaluation & operations
| Term | Definition |
|---|---|
| Eval suite | The set of tests defining acceptance criteria. Written before production code |
| Golden dataset | Labelled inputs with expected outputs, drawn from the real input population plus edge cases |
| Code-based grading | A deterministic function checks the output. Cheapest, fastest, never drifts |
| LLM-as-judge | A judge model scores against a rubric. Needs calibration and a different model |
| Self-preference bias | A model rating its own output more favourably — why the judge must be a different model |
| Multi-turn eval | A separate eval category scoring full conversation sequences |
| Shadow testing | Running the new version in parallel on copies of live traffic; users see the current version |
| Canary rollout | Ramping a change through a small traffic slice with regression monitoring |
| Model drift | Behaviour changed while inputs stayed stable |
| Data drift | The input distribution changed underneath the system |
| Prompt failure | Ambiguous, underspecified, or conflicting instructions produce wrong-but-plausible output |
| Hallucination | Confident, fluent content not grounded in the input, source, or tool result |
| Model mismatch | Wrong tier for the task complexity, or a swap without re-eval |
| p95 | The 95th-percentile latency. The design and alerting target — never the median |
| Batch API | Async processing at a 50% discount. Stacks with caching |
| Circuit breaker | Trips on error-rate threshold, fails fast, cools down |
| Fallback chain | Routing to an alternative model/endpoint/cached response when the primary fails |
| Change attribution | Distinguishing model drift from data drift from a version-update effect |
Safety, governance & lifecycle
| Term | Definition |
|---|---|
| Safety stack | Four layers: trained behaviour (Anthropic) / system prompt / runtime screening / authorization (all yours) |
| Training-time alignment | Anthropic's general harm reduction, applied before deployment. Lowers baseline risk |
| Inference-time control | Your deployment-specific enforcement at request time |
| Direct prompt injection | User input crafted to override system instructions |
| Indirect prompt injection | Malicious instructions arriving via retrieved content or tool outputs. The dominant enterprise vector |
| Fail closed | Blocking traffic when a control errors. The correct posture for safety controls |
| Preventive / detective / compensating control | Remove the capability / log it / guard it. Preventive wins on the exam |
| Human-in-the-loop | Routing decisions to a person. By stakes, not volume |
| Consent fatigue | Reviewers clicking through without reading when volume is too high |
| Decision log | Per-decision capture of inputs, retrieved context, output, and routing — keyed for replay |
| Control register | The obligation → control → owner → evidence-artifact map, revalidated on a cadence |
| BAA | Business Associate Agreement (HIPAA). Coverage is per-configuration, not per-vendor |
| DPA | Data Processing Agreement (GDPR) |
inference_geo |
The direct-API region parameter. Supports "us" and "global" — no EU pinning |
| Data minimisation | Passing only the fields necessary for the task — a GDPR/HIPAA principle applied architecturally |
| Proxy variable | A non-protected field (postcode, school) correlated with a protected characteristic |
| Translation table | Discovery output: statement → implied constraint → architectural decision → assumption |
| Reversal cost | What it costs to undo a decision once the system is built around it |
| Outcome document | Six fields: use case + scope, metric before, metric after, auditable control, measurement owner, reuse potential |
| Entry-point-responsibility map | Which entry point handles which task and why — documented before integration code |
| Feedback loop | The decision layer above observability: signals → triage → decide → act → review |
| Runbook | The captured set of symptom → cause → action paths |
| Judgment erosion | Engineers accepting output they no longer fully understand because it looks right and passes checks |
| Champion-and-batch | Rollout method: one champion per department proves the workflow, then seeds peers in batches |
PART 12 — Rapid Revision & Cold-Recall Sheet
Use this daily. Cover the answers. Write them out from memory. If you can produce this sheet cold, you are ready.
12.1 The numbers (write these from memory)
CACHING
5-min cache WRITE .................... 1.25×
1-hour cache WRITE ................... 2×
Cache READ (hit) ..................... 0.1×
Default TTL .......................... 5 minutes (refreshed free on every hit)
Minimum cacheable — Sonnet ........... 1,024 tokens
Minimum cacheable — Opus / Haiku ..... 4,096 tokens
Max explicit breakpoints ............. 4
Cache reads vs ITPM limits ........... do NOT count toward the limit
PRICING (per MTok, in / out)
Haiku .... 1 / 5 Sonnet .... 3 / 15
Opus ..... 5 / 25 Fable .... 10 / 50
Output ≈ 5× input at every tier
Batch API ............................ −50%, stacks with caching
CONTEXT
Opus / Sonnet / Fable ................ 1M
Haiku ................................ 200k
Max output ........................... 128k (Opus/Sonnet5/Fable) · 64k (Sonnet4.6/Haiku)
1 token .............................. ≈ 0.75 English words
80-page doc .......................... ≈ 29k tokens
300-page doc ......................... ≈ 100–120k tokens
RETRIEVAL
Chunk size baseline .................. 512–1024 tokens
Fixed-chunk overlap .................. 10–20%
Parent-child: child .................. ~150–200 tokens
Parent-child: parent ................. ~512–1024 tokens
Reranker candidate window ............ top 50–200
Reranker cost ........................ +10–20% relevance, +100–400 ms
Contextual Retrieval gain ............ ~67% fewer top-20 failures
Anthropic's best top-k ............... top-20 (beat top-10 and top-5)
EXAM
Items ................................ 63
Time ................................. 120 minutes (~1.9 min/item)
Pass ................................. 720 / 1000 scaled
Cost ................................. $175
Retake waits ......................... 14 → 30 → 90 days, 4 per rolling 12 months
Validity ............................. 12 months
12.2 The lists (recite these)
4 AI PROPERTIES
Next-token prediction · Knowledge · Working memory · Steerability
3 LAYERS (never conflate)
Entry point · Build-time interface · Delivery route
7 PRIMITIVES
Tools · MCP · Subagents · Hooks · Skills · Agent Teams · Dynamic Workflows
3 FEASIBILITY VERDICTS
Feasible as scoped · Feasible with constraints · Not feasible (+ what would change it)
5-FACTOR PATTERN FRAMEWORK
Predictability · Error cost · Observability · Latency · Cost → tightest constraint wins
4 WORKFLOW SUB-PATTERNS
Chaining · Routing · Parallelisation · Evaluator-optimizer
5 REFERENCE ARCHITECTURES
Agent · RAG · Document pipeline · Triage/routing · Coding agent
5 CHUNKING STRATEGIES
Fixed · Recursive (default) · Semantic · Layout-aware · Parent-child
3 MCP PRIMITIVES + CONTROLLER
Tools = model-controlled · Resources = app-controlled · Prompts = user-controlled
5 INTEGRATION LAYERS (compliance first)
Compliance · Identity & SSO · Authorization · Data handling · Observability
4 OBSERVABILITY LAYERS
Request tracing · Metric aggregation · Anomaly detection · Change attribution
4 THINGS TO LOG PER REQUEST
Request · Response · Context · Outcome
3 RELIABILITY CONTROLS
Exponential backoff · Fallback chain · Circuit breaker
5-STAGE EVAL WORKFLOW
Define task · Golden dataset · Automated checks · Judge scoring · Interpret & act
GRADING LADDER
Code-based → LLM-as-judge (calibrated, different model) → Human review
4 A/B COMPONENTS
Hypothesis · Random assignment · Pre-fixed primary metric · Calculated sample size
6 FAILURE CLASSES
Prompt · Hallucination · Model mismatch · Retrieval · Context · Orchestration
4 SAFETY-STACK LAYERS
Trained behaviour (Anthropic) · System prompt · Runtime screening · Authorization
5 RISK CATEGORIES
Direct injection · Indirect injection · Token exhaustion · Tool abuse · Data exposure
3 GUARDRAIL CONTROL POINTS
Input screening · Output screening · Tool-call authorization → FAIL CLOSED
3 HITL PLACEMENTS
Pre-action approval · Post-action audit · Sampled review
4 FAIRNESS INJECTION POINTS
Retrieval corpus · Prompt framing · Few-shot examples · Downstream routing
3 EXPLANATION AUDIENCES
Affected user · Regulator · Build team
4 DISCOVERY QUESTIONS
Must DO · Must NOT do · Must COST · Must PROVE
3 TRADEOFF ELEMENTS
Gain · Give up · REVERSAL COST (+ compliance posture if regulated)
5 FEEDBACK-LOOP STAGES
Signals · Triage · Decide · Act · Review
6 OUTCOME-DOCUMENT FIELDS
Use case + scope · Metric before · Metric after · Auditable control · Owner · Reuse
5 LIFECYCLE PHASES
Discovery → Design → Handoff → Monitoring → Iteration
4 SKILLS DISTRIBUTION MECHANISMS
Org-provisioned · Plugin (rollback!) · Project Skill · API Skill
4 VERIFICATION DIMENSIONS
Correctness · Security · Maintainability · Human understanding
4 TEAM-SETUP DECISIONS
Environment · Rollout · Skills distribution · Spend posture
12.3 The rules to quote verbatim
"If you cannot write an eval for a behaviour, you have no reliable way to measure
whether that behaviour is present."
"Route to a person when low-confidence AND (irreversible OR high-cost)."
"A control named in a design document with no owner and no artifact is a claim, not proof."
"An action taken but not logged is an action that cannot be allowed."
"Instructions are guidance, not enforcement."
"Output screening judges text, not actions."
"A guardrail that silently passes traffic when it errors is worse than none."
"Retrieval is for stable knowledge. Tool calls are for live state."
"If you could have written the steps in code, use a workflow."
"The context window is a ceiling, not a target."
"BAA coverage is per-configuration, not per-vendor."
"Excluded from training ≠ not retained."
"Model the distribution, not the average. Design for p95, not the median."
"Not choosing a model is choosing the most expensive one."
"An uncalibrated judge is worse than no automated grade."
"Volume, latency, and error rate prove the system RUNS — not what it's WORTH."
"Monitoring is not a feedback loop."
"Plausibility is what makes a mid-call architecture sketch dangerous."
"The diagram shows the WHAT. Without rejected alternatives, the WHY leaves with you."
"Access is not adoption."
"If the author can't explain it, hold the merge."
12.4 The five elimination heuristics (exam-day cheat)
1. SIMPLEST SUFFICIENT PATTERN WINS
Fewer moving parts beats more, when both solve it.
2. PREVENTION > DETECTION > COMPENSATION
remove capability > authorize before action > screen output > log it > confirm prompt
3. MEASURE BEFORE YOU CHANGE
"investigate traces / run evals / analyse distribution"
beats "rewrite the prompt / upgrade the model"
4. INSTRUCTIONS ARE NOT ENFORCEMENT
If security depends on the model choosing to comply, that IS the bug.
5. THE BUSINESS DECIDES, THE ARCHITECT INFORMS
Present evidence + tradeoff (incl. reversal cost). Never comply silently,
never escalate over their head, never act secretly.
12.5 Exam-day operating procedure
Before you start
- Government photo ID matching the registration name exactly
- Clear workspace for online proctoring
- Verify the model lineup at
platform.claude.comthe day before - Reschedule/cancel cutoff is 24 hours — or you forfeit the fee
During
- Budget ~1.9 minutes per item. Flag and skip anything over 2.5 minutes; return at the end
- Multi-response items state the count — select exactly that many
- Scenario matching: options repeat. Never assume one-to-one
- On "best control" items, eliminate detective and compensating distractors first
- On "first place to investigate" items: what changed most recently + the cheapest check
- When two options both work, pick the one with fewer moving parts
- When an option relies on the prompt for a security property, eliminate it
Time checkpoints
Q16 at 30 min · Q32 at 60 min · Q48 at 90 min · Q63 at 115 min
Leaves 5 minutes for flagged items.
12.6 The 48-hour plan
T-48h
- Read Part 0 (mental models) and Part 12 (this sheet) end to end
- Write §12.1 numbers and §12.2 lists from memory. Mark what you missed
T-36h
- Re-read Part 3 (Domain 2) and Part 4 §4.4–4.5 (MCP + RAG) — your two thinnest areas
- Re-run §12.1 and §12.2 from memory
T-24h
- Work Part 9 (24 archetypes) cover-the-answer, twice
- Verify the model lineup and caching specifics at
platform.claude.com - Skim every "Domain rapid drill" table (§2.10, 3.9, 4.9, 5.12, 6.10, 7.10, 8.5)
T-12h
- §12.3 quotes and §12.4 heuristics only
- Confirm ID, environment, and start time
- Stop studying. Sleep.
T-1h
- §12.1 numbers, once
- §12.4 heuristics, once
- Nothing else
Where the pass margin actually lives
| Domain | Items | Your baseline | Attention needed |
|---|---|---|---|
| 1 — Solution Design | 11 | Strong (architecture instinct transfers) | Learn the named taxonomy |
| 2 — Models & Prompting | 8 | Weakest | Highest priority — caching, tiers, context strategies |
| 3 — Integration | 12 | Mixed — auth/observability strong, RAG + MCP new | High priority on RAG mechanics and MCP primitives |
| 4 — Evaluation | 10 | Medium — SRE instincts help | Medium-high — learn the eval vocabulary precisely |
| 5 — Governance & Safety | 9 | Strong (security layering) | Learn the exact control-point language |
| 6 — Stakeholder & Lifecycle | 9 | Strong (management experience) | Learn the named artifacts |
| 7 — Dev Productivity | 4 | Strong (platform engineering) | Learn the four distribution mechanisms |
~20 of 63 items (32%) will not come from your existing experience. They are concentrated in Domain 2, the RAG/MCP half of Domain 3, and the eval methodology of Domain 4.
Parts 3, 4, and 5 of this manual are where your pass margin lives. Read them twice.
Good luck. You already think in constraints, tradeoffs, blast radius, and evidence. This exam is that instinct, wearing new vocabulary.