Claude Certified Architect · Professional

Module 7 — Claude models, prompting and context engineering

Study notes written by Sanjay Shah. Not official Anthropic material. Facts marked "check before relying on it" may have changed.

Practice this module

On this page

Course: Claude Architect (Professional), "Design, ship and govern Claude in the enterprise". Study notes in our own words. This module was added on 2026-11-25 to cover the official domain Claude Models, Prompting, and Context Engineering, 13% of the updated exam from 2026-12-07 (see the README). It is written at the architect's level: what to decide and why, not every API parameter. Templates T24–T25. Model and API facts were checked on 2026-11-25. Check before relying on any of them, because they change often.

What you'll be able to do

  • Choose a model tier per step, from evidence, and record the exact model ID.

  • Decide when extra reasoning, vision or document input, tool use, structured output and citations earn their cost.

  • Write production prompts as versioned, reviewed artefacts with a clear structure.

  • Engineer the context window: what goes in, in what order, how much, and what stays out.

  • Choose between retrieval and long context, and keep long-running agents from drowning in their own history.

  • Design tool definitions that the model uses correctly and safely.

Key ideas

1. The model family and how to choose

Claude comes as a family of models at different points on the capability, speed and cost curve. At the time of checking (2026-11-25):

  • Fable 5.2 was the most capable tier, for demanding reasoning and long agentic work.

  • Opus 5.5 was recommended as the default for most work.

  • Sonnet 5.5 and Haiku 5.5 were the faster, cheaper options.

  • Every current model ID was itself a pinned snapshot.

The lineup, names, prices and which platforms carry which model all change. Look them up on the day you decide.

The architect's rules don't change with the lineup:

  1. Choose per step, from evals (Module 6), not per project or by habit.

  2. Start from the cheapest model that might pass, and move up only where the eval fails.

  3. Record the exact model ID you evaluated, per platform (Bedrock and Google Cloud use their own ID formats), and put retirement dates on the lifecycle calendar (Module 4).

  4. Keep an evaluated fallback for each critical step (Module 2).

  5. Check data terms per model. At the time of checking, some top-tier models required 30-day retention and were excluded from zero data retention. A model choice can therefore be a privacy decision too (Module 3). Check before relying on it.

2. Capabilities that change the design

CapabilityUse it whenCost of using it
Extended reasoning / effort controlMulti-step reasoning, hard analysis, planning in agentsMore latency and output tokens. Turn it down for easy steps, up for hard ones. Check per model: some recent models don't allow reasoning to be switched off entirely.
Vision and document inputScanned forms, PDFs, screenshots, chartsMore input tokens; image quality matters; still needs extraction checks
Tool useThe model must look things up or act through your systemsEvery tool is an attack surface and a test burden (section 6)
Structured outputDownstream code consumes the resultDesign the schema carefully; still validate (Module 2)
CitationsAnswers must be traceable to sources (policy, clinical, legal)Some features can't be combined in one request. Check the docs for combinations.
Prompt cachingLong stable prefixes repeat across requestsOrder the prompt so stable parts come first (section 5)
BatchLarge volumes that can waitResults come later, not interactively

Checked 2026-11-25. Check before relying on it. Parameter names, defaults and which features combine change between model versions. Read the model's page in the Claude docs before you design around a capability.

3. Production prompts are artefacts, not chat messages

A production prompt is code that happens to be written in English. Treat it like code: versioned in the repo, reviewed by pull request, tested by evals, and recorded in every audit event (Modules 3–5).

A reliable structure:

PartContentExample (complaints drafter, Module 1)
Role and goalWho the model is acting as, and the outcome"You draft first replies for a bank's complaints handlers to review."
Task and boundariesWhat to do, what never to do, and when to stop and hand to a person"Never state an outcome or amount. If the complaint mentions hardship, fraud or legal action, output route_to_senior and no draft."
ContextThe material for this request, clearly separatedComplaint text inside <complaint> tags, marked as untrusted customer text
Examples2–5 good examples, including a tricky one and a refusalA short acknowledgement letter; a hardship case routed out
Output formatExact structureJSON with topic, urgency, draft, route_to_senior
Quality barWhat "good" looks like"Plain English, under 150 words, no promises."

Principles:

  • Be explicit. State the audience, the length, the tone and the boundaries. The model can't read your organisation's unwritten rules.

  • Explain why a rule exists ("customers may be vulnerable, so…"). Models follow reasons better than bare commands.

  • Separate instructions from data. Put untrusted text in clearly labelled sections and say it is material to analyse, not instructions (Module 3). This helps, but it is not a security control on its own.

  • Use examples on purpose. Examples shape the output strongly. Vary them so the model doesn't copy one pattern.

  • One prompt, one job. A prompt that classifies, drafts, translates and checks compliance is hard to test. Split it into workflow steps (Module 1).

  • Keep a prompt spec card (T24) next to each prompt.

Prompt spec card (T24, filled)

FieldContent
Promptcomplaint-first-reply@2.1
OwnerComplaints product owner
Model ID(s) evaluatedPrimary and fallback IDs, per platform
Input contractComplaint text (redacted), product type, channel
Output contractJSON schema v3; validated in code
Hard rulesNo outcome or amount; route hardship, fraud, legal
Eval set and barcomplaints-eval@7; 95% overall; 100% on routing rules
Last change and reason2026-11-10: shorter drafts after edit-rate review

4. Context engineering: what the model sees

The context window is everything the model reads for one request: instructions, examples, retrieved documents, tool results, conversation history and the user's message. Quality depends more on what is in it than on how much fits. More context is not better context.

Rules:

  • Stable first, changing last. Instructions and reference material at the top, the per-request material at the end. That order also makes prompt caching work.

  • Retrieve fewer, better passages, with their source IDs, so answers can cite them (Module 6 showed what cutting too far does).

  • Apply permissions before anything enters the context (Module 2). Context is where leaks happen.

  • Trim tool output. A tool that returns a 2,000-line log puts noise in the context. Return the lines that matter, or a summary plus a reference.

  • Summarise long histories. For long conversations or agent runs, replace old turns with a summary of decisions and state. Keep the raw history in your own store if you need it for audit.

  • Budget the window (T25). Decide roughly how much each part may use, and alert when requests exceed it.

Context budget (T25, filled for the HR assistant)

PartBudgetRule
Instructions and rulesFixed, cachedChange only by versioned release
Policy excerptsTop 5–8 passagesFiltered by role and country
Conversation summaryShortUpdated every 5 turns
User questionAs askedRedacted for health and family details
AlertRequests over the budgetInvestigate retrieval or history growth

5. Retrieval or long context?

ApproachFits whenWatch out for
Retrieval (search an index, insert the best passages)Large or changing collections; permissions per document; need for citationsRetrieval quality is the ceiling, so evaluate it separately; index freshness and permission sync (Module 2)
Long context (put the whole document in)One or a few documents that must be read as a whole, such as a contract or a case fileCost and latency grow with length; details in the middle of very long inputs can be missed, so still ask for citations and check them
BothRetrieve the right documents, then read each one in fullMore moving parts to evaluate

6. Tools are prompts too

The model chooses and calls tools from their names, descriptions and input schemas. Treat tool definitions as part of the prompt:

  • Few, clear tools. Ten overlapping tools confuse the model and widen the attack surface. Merge or remove them.

  • Descriptive names and descriptions: what it does, when to use it, when not to, and what it returns.

  • Tight input schemas, with types, enums and required fields, and validation in your code.

  • Helpful errors. "Customer ID not found; ask the user to confirm it" lets the model recover. A stack trace doesn't.

  • Read-only by default. Any tool that changes the outside world needs human approval or a hard rule (Modules 1 and 3).

  • Scope by identity. The tool runs with the user's on-behalf-of rights or the agent's own workload identity (Module 2), never a shared admin key.

  • MCP servers package tools for reuse across apps. Review a third-party MCP server like any dependency: who maintains it, what it can reach, and what it logs. At the time of checking, MCP was an open standard governed under the Linux Foundation's Agentic AI Foundation.

7. Agents and sub-agents: keeping context clean

Long-running agents fill their context with tool results and false starts. Patterns that help:

  • Sub-agents with their own context. A coordinator gives a focused task to a sub-agent, which returns a short result instead of its whole working history.

  • External memory. Write notes, decisions and progress to a file or store, and read them back when needed, instead of carrying everything in the context.

  • Step and token budgets (Module 2), and a clean stop that hands the task to a person.

Worked case 1 — Contract review: retrieval or long context?

A legal team wants clause-by-clause risk notes on supplier contracts of 40–120 pages. The first design retrieved "relevant passages" by search, and missed a liability cap that was defined in an annex and referred to elsewhere.

The redesign:

  1. Read each contract in full (long context), because the document must be understood as a whole.

  2. Require a citation (section and page) for every risk note, and have a code check that each cited section exists.

  3. Send any clause the model marks "uncertain" to a lawyer.

  4. Use a fixed clause checklist in the prompt as examples.

  5. Cache the stable instructions and checklist.

The eval set includes contracts with cross-references and annexes. The pass bar on "every material clause found" is set by the legal lead.

Worked case 2 — Support agent drowning in tool output

A customer-support agent on a multi-tenant SaaS platform I build called a "get ticket history" tool that returned every event in full. On long tickets the agent lost track of the customer's actual question and repeated earlier steps. The fixes were all context engineering:

  • The tool now returns the last 10 events plus a summary of older ones, with a reference to fetch more.

  • Tool errors explain what to do next.

  • The agent writes a short "state so far" note every few steps, and the context carries that note instead of the full transcript.

  • The task has a step budget.

Quality on long tickets rose on the eval set, and cost per ticket fell. Tenant isolation stayed in the tool layer, so none of these changes touched it.

Worked case 3 — Bank complaints prompt, version 1 to version 2

Version 1 of the complaints drafter was one paragraph: "Write a polite reply to this complaint." Review found three problems: drafts sometimes promised refunds, ignored hardship signals, and varied wildly in length.

Version 2 used the structure in section 3:

  • hard rules with reasons

  • untrusted complaint text in tags

  • three varied examples, including a routed hardship case

  • a JSON output schema validated in code

  • a length bar

It was released through the eval gate: routing rules at 100%, edit rate down in the shadow run. The prompt spec card records the change and the reason.

Trade-offs to weigh

Trade-offLean one way when…Lean the other way when…
Bigger vs smaller modelThe eval fails on the smaller one for this stepIt passes; latency and cost matter
More vs less reasoning effortHard analysis, planning, high-stakes judgementSimple extraction or classification
Retrieval vs long contextLarge, changing, permissioned collectionsA few documents that must be read whole
More examples vs fewerOutput format or tone is hard to describeExamples start being copied too literally
Many specific tools vs few general toolsEach tool needs different permissionsTools overlap and confuse the model
Full history vs summaryShort conversations; audit needs the raw text (keep it outside the context)Long agent runs where history crowds out the task

Common mistakes

  • One giant prompt doing five jobs, impossible to test.

  • Prompts edited in a console, not versioned or evaluated (Module 4).

  • Mixing instructions and untrusted data with no separation.

  • "More context is better": stuffing 50 passages and the whole history in.

  • Changing parts at the top of the prompt, which breaks caching.

  • Raw tool output flooding the context.

  • Overlapping, vaguely described tools, or tools that run with admin rights.

  • Choosing the model by reputation, not by eval per step.

  • Assuming a feature works on every model and platform without checking the docs.

Remember

  • Choose the model per step, from evals. Pin and record the exact ID per platform, and keep an evaluated fallback.

  • Use reasoning, vision, tools, structured output and citations where they earn their cost, and check what each model and platform supports.

  • A prompt is a versioned artefact: role, task and boundaries, separated context, examples, output format, quality bar, plus a spec card.

  • Context: stable first, per-request last, permissions applied, fewer and better passages, trimmed tool output, summarised history.

  • Retrieval for large, changing, permissioned collections. Long context for documents that must be read whole. Cite and check either way.

  • Tools are prompts too: few, clear, tightly typed, read-only by default, scoped to an identity.

Self-check (no answers; talk it through with a peer)

  1. For one system you know, which step could move to a smaller model, and what evidence would you need?

  2. What is in that system's context window that doesn't need to be there?

  3. Would its main documents be better served by retrieval or by long context?

  4. Which of its tools has the vaguest description, and what would you change?

Practice questions for this module: mcq/module-07.md.

↑ ↓ navigate · ↵ select · esc close