CCAR-P study guide/Domain 02 of 0713% of the exam

Claude models, prompting and context engineering

Five objectives, 13% of the marks, and a shift in altitude from the Foundations treatment of the same material: here you are not asked what a technique is but when it pays. Model selection is a portfolio decision with cost and latency consequences; prompts are engineered artifacts with failure modes; the context window is a budget to be allocated, not a bucket to be filled; and reuse — caching, modular prompts, Skills — is where a working system becomes an economical one.

Fabs||12 min read

The domain opens with the decision every project gets wrong in the same direction: paying for capability the task never uses. At the professional tier, model selection, prompt design and context management are one subject — a prompt that stuffs the window forces a bigger, costlier context strategy; a well-budgeted one makes the cheap model viable. The exam will hand you workloads and ask which model, which technique, which reuse strategy — and the wrong answers will all sound diligent.

01Model selection as a trade-off decision

The Claude model family runs in three tiers, and the trade the exam wants you to articulate is capability against cost and latency. The frontiers — the Opus class — carry the hardest reasoning, agentic long-horizon work and the highest price and latency. The mid-tier — the Sonnet class — is the balanced default: near-frontier quality on most workloads at a fraction of the cost. The small tier — the Haiku class — is fast and cheap, right for classification, extraction, routing, and high-volume tasks where “good enough, immediately” beats “excellent, eventually”. Two selection facts earn marks. Fit beats prestige: the smallest model that clears your evaluation threshold is the correct model, and saying so is a mark-earning answer. And the router pattern is the professional move — Haiku-class on the easy majority, escalation to a larger model on the hard minority (Domain 1’s difficulty cut, implemented at the model layer).

TierWhat it is forReach for it whenWatch for
Frontier (Opus class)Hardest reasoning, long agentic tasks, nuanced judgment, adversarial reviewThe task is the product’s differentiator and quality on the hard tail matters mostCost on high volume; latency in interactive loops; often overkill for extraction and routing
Balanced (Sonnet class)The default tier: strong general capability, agentic work, production drafts and analysisMost workloads — start here and justify departures in either directionBlind defaulting: reroute easy bulk traffic down a tier and the bill drops materially
Small (Haiku class)Classification, extraction, routing, summarisation, high-volume lanesVolume is high, tolerance for occasional shallowness is real, latency is user-facingQuality ceiling on complex reasoning and subtle instructions — evaluate before committing the whole lane
Exam-ready phrasing: selection is justified by evaluation results on the workload’s own data, not by the model’s rank. A tier named without an eval behind it is a guess.

02System prompts, templates and guardrails

A system prompt is a job description, and the exam tests whether you can tell a finished one from a draft. The structure that holds: role (who the model is being, with what expertise and scope), task (what success looks like, in criteria a grader could check), constraints (what it must never do, say, or assume), and the shape of the output (format, schema, tone, language). XML-style tags delimit the parts; the stable material sits at the top where caching can see it (more below); volatile material arrives in user turns.

Templates turn prompts from artisanal objects into a managed asset: a parameterised system prompt with named slots for the task-specific material, version-controlled, tested like code — because it is code. The test the exam keeps returning to: could a competent temp produce the intended output from this brief alone, without asking you anything? If not, the brief is unfinished, and no model quality will finish it. Conflicting instructions inside a template — two formats for the same job, a constraint that fights an example — are a named failure mode: they produce unstable output worse than no instruction.

Guardrails, at this tier, are understood as a stack — and the prompt is the softest layer in it. Prompt-level constraints steer behaviour; they do not enforce it. The guarantees live outside the model: schema validation on output (reject and retry or reject and escalate), tool permissions that make forbidden actions impossible rather than discouraged (Domain 3), output filters for sensitive content, and human review where the stakes demand it (Domain 5). The exam’s trap: a scenario whose only safety layer is a paragraph asking the model to be safe. Defense in depth is the answer, and the prompt is one layer, not the wall.

03Techniques: zero-shot, few-shot, chain-of-thought

The three named techniques are an escalation, and each rung has a price. Zero-shot — instructions only — is the correct starting point: cheapest, easiest to maintain, and modern models are startlingly good at following a clear brief. Few-shot — worked examples in the prompt — pays when the specification is easier to show than to tell: exact output format, edge-case handling, house style. Its costs are real: examples are tokens on every request (a caching decision — below), conflicting examples poison the well, and weak examples teach the wrong lesson harder than no examples. Chain-of-thought — letting the model reason before answering, in its visible thinking or via extended thinking budgets — pays on multi-step reasoning, mathematics, and tasks where the answer should follow from stated steps; it is wasted latency on classification and extraction, where it buys nothing a schema cannot.

04The context window as a budget

Foundations taught what the window is; Professional asks you to allocate it. A well-budgeted window has four accounts: the stable scaffolding (system prompt, tool definitions, standing policy — cache it), the task material (retrieved documents, the user’s input — the reason the call exists), working space (tool results and reasoning that accumulate mid-task), and output room (the answer plus its headroom). The failure the exam tests is window starvation in either direction: material crowded out by scaffolding, or a window filled with everything “just in case” — tokens paid for on every request, slowing every response, for retrieval nobody asked the model to use.

Management levers, in the order a professional applies them. Do not send it: the cheapest token is the one never placed in context — retrieve narrowly (Domain 3), prune boilerplate, summarise stale history. Cache it: stable prefixes behind cache breakpoints (below). Compress it: when conversations or files overflow, context editing and summarisation keep the operative material and retire the rest. Choose the right vessel: small stable corpora can simply live in the window; large or volatile ones belong to retrieval, not to the prompt. And measure it: the usage object on every response — input, output, cache reads and writes — is the ground truth that turns “the context feels bloated” into a number you can defend.

05Reuse: caching, modular prompts, Skills

The economics the exam quotes. Prompt caching reuses a stable prefix across requests: mark the prefix with cache breakpoints, and after the first write, repeated runs read that prefix at about a tenth of the base input cost instead of paying full price every request. The default cache lifetime is five minutes from last use; a one-hour TTL option covers material consulted less often, at a premium on the write. The design rules follow from the mechanism: order stable-before-volatile (a timestamp or per-request variable at the top of the prompt defeats the cache by changing byte one), keep the cacheable prefix byte-identical across requests of the same shape, and remember that caching composes with the Batch API’s half price for asynchronous workloads — a cached batch is the cheapest square inch in the platform.

Modular prompts are the maintainability half of reuse: compose system prompts from named, tested parts — a role module, a policy module, a format module — so a policy change is one edit, not forty pasted copies drifting apart. The failure mode has a name worth remembering: prompt drift, the moment when the copies disagree and behaviour differs by route for no reason anyone can find.

Skills are the newest instrument in this domain and the exam guide names them: packaged capability directories whose metadata (name, description) is always loaded while the body — instructions, scripts, reference files — is read on demand. That is progressive disclosure: a library of procedures costs almost nothing until invoked, then expands the context with exactly the material the task needs. At design level, Skills are the answer to “how do we let the model do fifty specialised procedures without paying for all fifty on every request”. The same principle, applied to everything, is Domain 3’s progressive-discovery-versus-monolithic-context question — the pattern to know cold.

06The traps

  • —“Frontier model by default.” Selection without an evaluation is the domain’s most common wrong answer; the correct default is the cheapest tier that clears the bar, with escalation for the hard tail.
  • —“More examples, more quality.” Three well-chosen boundary-teaching examples beat twenty variations of the easy case — and cost a fraction of the tokens.
  • —“Temperature will fix it.” Sampling knobs are not repair tools: format problems want a schema, accuracy problems want better context or a bigger model, consistency problems want caching and deterministic settings.
  • —“Cache-friendly by accident.” A timestamped greeting at the top of the system prompt quietly re-prices the whole application; cache-busting prefixes are a named exam scenario.
  • —“The prompt is the guardrail.” Instructions steer; validation, permissions and review enforce. A safe-sounding paragraph is the softest layer of a stack the exam expects you to build.
↳Check yourself
Q1

An internal policy assistant sends the same 12,000-token system prompt and policy pack on every request, followed by a short, varying user question. Latency and cost are both complaints. Which change most directly addresses both?

  1. ATruncate the policy pack to the first 2,000 tokens
  2. BSwitch the whole application to the smallest model regardless of task fit
  3. CKeep the static prompt and policy ahead of the dynamic question and enable prompt caching
  4. DMove the policy pack into a few-shot example block
→Check your answer
Answer: C

This is the official sample question’s shape, and the reasoning transfers: stable content first plus caching lets repeated prefixes be reused — lower time-to-first-token and lower per-request cost without discarding required context. Truncation (A) silently deletes policy; blind downsizing (B) risks quality where the eval has not spoken; few-shot blocks (D) do not create a cacheable, reusable prefix.

Q2

A high-volume ticket classifier (six labels, well-specified) runs on a frontier-tier model at uncomfortable cost. Evaluation shows a small-tier model scores within a point of the frontier on the live sample. What is the professional move?

  1. AKeep the frontier model; the accuracy difference is a principled stand
  2. BReduce the frontier model’s output length to cut cost
  3. CAlternate between tiers to hedge
  4. DRoute the lane to the small model, keep an escalation path for ambiguous cases, and gate the switch on the evaluation
→Check your answer
Answer: D

Cheapest tier that clears the evaluated threshold, with escalation for the hard tail — the router pattern. The point of difference (A) is not worth the bill when the eval says otherwise; alternating (C) is engineering folklore; shorter outputs (B) shave the wrong term of the cost equation when input volume dominates.

Q3

A team’s summarisation prompt contains: a role paragraph, a style rule from last quarter, a newer style rule that contradicts it, and three examples in an older format. Outputs are unstable. First fix?

  1. ALower the temperature and raise top-p until outputs stabilise
  2. BSwitch to a larger model that can reconcile conflicting instructions
  3. CResolve the conflicts — one style rule, examples in the exact target format — as a version-controlled template change
  4. DAdd a fourth example in the current format and hope the majority wins
→Check your answer
Answer: C

Conflicting instructions and inconsistent examples produce instability worse than no instructions — and no sampling knob or model upgrade repairs a self-contradicting brief. Fixing the template (and testing it like code) is the durable answer; outvoting bad examples (D) is not a specification.

Q4

Which workload should use chain-of-thought or extended thinking?

  1. ADeciding whether a refund request meets a multi-condition policy with exceptions that interact
  2. BExtracting fifteen named fields from invoices into JSON
  3. CRouting customer emails to one of six queues
  4. DGenerating a one-line title for a support ticket
→Check your answer
Answer: A

Reasoning before answering pays where conditions interact and the answer should follow from stated steps — policy adjudication is the archetype. Extraction and classification (B, C) want schemas and speed; a one-liner (D) wants nothing but a clear brief. CoT on those lanes is pure latency.

Q5

A Claude Code team wants the model to follow fifty specialised release, incident and compliance procedures, but not pay fifty procedures’ worth of tokens on every request. Which mechanism is designed for exactly this?

  1. APaste all fifty procedures into the system prompt and enable prompt caching
  2. BRoute each request to a subagent that memorised the procedures during a long session
  3. CPackage each procedure as a Skill, so metadata is always loaded and the body is read on demand
  4. DStore the procedures in a database the model queries with a tool every turn
→Check your answer
Answer: C

Skills are progressive disclosure for procedural knowledge: descriptions always in context, bodies loaded when invoked — fifty procedures cost a handful of tokens until one is needed. Caching (A) pays for the whole pack on every cache refresh; a memorising agent (B) fights the stateless API; querying a database every turn (D) burns context and latency on a solved problem.

Q6

A batch job rewrites product descriptions nightly: 50,000 items, identical system prompt and style guide per request, no user waiting. Which combination is the cost floor?

  1. AInteractive API at frontier tier for quality, streamed
  2. BInteractive API with the style guide moved into each user turn
  3. CBatch API with a rotating system prompt to avoid staleness
  4. DBatch API with the stable system prompt and style guide as a cached prefix
→Check your answer
Answer: D

Batch is half price for asynchronous work, and prompt caching applies inside it: a byte-identical prefix across requests reads at about a tenth of input cost. The two compose. Rotating prompts (C) deliberately bust the cache, and per-turn style guides (B) re-price what should have been the stable prefix.

Fabs
Founder, The Third Way Company
Work with us