Claude Models, Prompting & Context Engineering
13% of examSelect a Claude model against explicit quality/latency/cost tradeoffs, design system prompts and guardrails, apply the right prompting technique, and curate the context window and prompt-reuse strategy that make these designs affordable at scale.
5
task statements
12
concepts
48
practice questions
Domain Mastery
Select Claude models and apply model-choice tradeoffs
Choosing among Claude's model tiers and reasoning levers against the quality-latency-cost tradeoff triangle, and designing mixed-model pipelines.
Knowledge of
- The three model tiers -- Haiku (fastest/cheapest), Sonnet (balanced), Opus (most capable) -- and the typical task profile each tier fits
- The quality vs. latency vs. cost tradeoff triangle as the frame for resolving model choice against a specific requirement, not in the abstract
- Mixed-model designs that route cheap, well-defined steps to Haiku and hard reasoning/orchestration steps to Sonnet or Opus
- Extended (adaptive) thinking as a capability lever that trades billed output tokens and latency for better performance on hard reasoning tasks
- The risk that a new model release can change behavior, requiring pinned versions and re-run evals before upgrading
Skills in
- Right-sizing model selection to task complexity instead of defaulting to the most capable model
- Designing mixed-model pipelines that assign each step to the tier that fits its difficulty and latency/cost budget
- Reserving extended thinking for steps whose reasoning depth genuinely pays for the added tokens and latency
- Pinning model versions and re-running evaluations before adopting a new model release
Concepts
Model Tiers & the Tradeoff Triangle
✎CoreHaiku = fastest/cheapest for high-volume, well-defined steps; Sonnet = balanced workhorse; Opus = most capable for hard reasoning/orchestration
Extended Thinking & Model-Version Pinning
✓AdvancedExtended/adaptive thinking trades billed output tokens and latency for better performance on hard reasoning tasks
The `effort` Parameter: Why budget_tokens Is Being Retired
✓Advancedbudget_tokens (a fixed token ceiling you pre-guess) is being retired in favor of a qualitative effort parameter (e.g. low/medium/high) that lets the model manage its own token spend within a stated depth level
The Batches API: A Distinct Cost Lever With a Hard Latency Tradeoff
✎CoreThe Batches API is a distinct cost lever from prompt caching, model right-sizing, context trimming, and output capping -- it reduces cost through async, bulk processing rather than by reducing the amount of work per request
Design system prompts, templates, and guardrails
Structuring system prompts and reusable templates, and layering prompt guardrails with deterministic controls for destructive or high-stakes actions.
Knowledge of
- The separation of stable rules/role/tone/constraints (system prompt) from the specific request and per-request data (user message)
- Why this system/user separation also keeps the stable prefix cacheable
- Templates as a way to parameterize variable parts while keeping the scaffold constant, improving consistency and cache hit rates
- Prompt-level guardrails as probabilistic behavioral boundaries, distinct from deterministic controls (hooks, permission scoping, output validation) that sit around the model
- The need to delimit and sanitize untrusted input so injected text is not read as an instruction
Skills in
- Placing stable rules, role, and constraints in the system prompt and per-request specifics in the user message
- Building parameterized prompt templates that keep the scaffold constant across requests
- Writing guardrail instructions that set behavioral boundaries (refusals, content policy, escalation to a human) while recognizing their probabilistic nature
- Pairing prompt-level guardrails with deterministic controls for destructive or high-stakes actions rather than relying on the prompt alone
- Delimiting and sanitizing untrusted input passed into a prompt
Concepts
System vs. User Placement & Prompt Templates
✎CoreStable rules, role, tone, and constraints belong in the system prompt; the specific request and data belong in the user message
Prompt Guardrails vs. Deterministic Controls
✓AdvancedPrompt-level guardrails (refusals, content policy, escalation) shape behavior probabilistically, not deterministically
Apply prompt engineering techniques matched to the task
Selecting zero-shot, few-shot, or chain-of-thought techniques and applying instruction-clarity and deliberate-iteration principles.
Knowledge of
- Zero-shot, few-shot, and chain-of-thought as distinct techniques suited to different task profiles
- Instruction clarity and specificity as more effective than generic instruction lists
- Positive framing of instructions (e.g., 'respond only in JSON matching this schema') over long negative lists
- Placement effects: with long inputs, the key instruction is more effective near the end, after the material
- Deliberate iteration against an eval set as the mechanism for improving a prompt over time
Skills in
- Matching zero-shot, few-shot, or chain-of-thought technique to task difficulty and ambiguity
- Writing positively framed, specific instructions instead of long negative constraint lists
- Placing the key instruction after long input material rather than before it
- Iterating on prompts one change at a time and measuring against an eval set
- Avoiding reflexive addition of few-shot examples or chain-of-thought when the task does not warrant the added tokens/latency
Concepts
Zero-Shot, Few-Shot & Chain-of-Thought Selection
✎CoreZero-shot suits simple, unambiguous tasks; few-shot locks in format/edge-case behavior; chain-of-thought suits multi-step reasoning
Instruction Clarity, Positive Framing & Iterative Refinement
✎CoreSpecific, clear instructions beat clever or terse ones for consistent output
Optimize the context window and manage token budgets
Curating the shared context-window budget across system prompt, history, tools, and results to prevent context rot, and tracking token usage.
Knowledge of
- The context window as a shared budget across system prompt, conversation history, tool definitions, tool results, retrieved documents, and the response
- Context rot/drift: bloated context degrading quality as the model loses the thread among low-signal tokens
- Pruning, compaction, and isolation as curation techniques for dropping stale output, summarizing older turns, and moving heavy subtasks into a subagent's own window
- Progressive disclosure: loading information as needed rather than front-loading everything
- The usage field (input/output/cache tokens) as the mechanism for tracking cost and catching context bloat before it hits the budget
Skills in
- Curating the context window to the smallest set of high-signal tokens rather than relying on raw capacity
- Pruning large or stale tool output that no longer informs the task
- Compacting older conversation turns into a summary recap instead of carrying the full transcript
- Isolating heavy subtasks into a subagent with its own context window to keep the main context clean
- Tracking the usage field to model cost and detect context bloat before hitting the budget
Concepts
Context Window as Shared Budget & Context Rot
✎CoreThe context window is one shared budget across system prompt, history, tools, results, retrieved docs, and the response
Pruning, Compaction, Isolation & Progressive Disclosure
✓AdvancedPruning drops stale tool output; compaction summarizes older turns; isolation moves heavy subtasks into a subagent's own window; progressive disclosure loads information only as needed
Design for prompt reuse through caching, modular prompts, and Skills
Using prompt caching, modular prompt composition, and Agent Skills to make prompt designs affordable and maintainable at production scale.
Knowledge of
- Prompt caching: reusing a large stable prefix (system prompt + policy document + few-shot block) across requests, where cache reads are cheap and writes carry a slight premium
- The ordering principle: stable content first, dynamic content last, to maximize the cacheable prefix length
- Modular prompts: composing prompts from reusable, independently versioned fragments (role, policy, format spec) instead of duplicating text
- Agent Skills as reusable instructions/procedures authored once and reused across apps and teams without a running service
- The distinction between prompt caching (reusing a stable prefix within a model call) and retrieval (fetching external documents)
Skills in
- Ordering prompts so stable content comes first and dynamic content last to maximize the cacheable prefix
- Composing prompts from independently versioned, reusable fragments rather than duplicating text
- Packaging reusable capabilities as Agent Skills for reuse across applications and teams
- Avoiding truncation of a needed policy document to save tokens when caching would preserve both correctness and savings
- Distinguishing when to reach for prompt caching versus retrieval based on whether content is a stable prefix or an externally fetched document
Concepts
Prompt Caching & Stable-Prefix Ordering
✎CoreA stable prefix (system prompt + policy + few-shot block) can be cached: reads are cheap, writes carry a slight premium
Modular Prompts & Agent Skills
✎CoreModular prompts compose reusable, independently versioned fragments (role, policy, format spec) instead of duplicating text