15 Models, Prompting & Context Engineering Practice Questions & Answers
Every Models, Prompting & Context Engineering practice question from the Claude Certified Architect – Professional Practice Test, with the correct answer and a short explanation.
Start practice test →1. A document-processing pipeline has two stages: (1) high-volume extraction of simple fields from millions of short documents, and (2) low-volume synthesis of complex cross-document analysis reports. Which model assignment best balances cost, latency, and capability?
- A.Use the most capable (Opus-class) model for both stages to maximize accuracy everywhere
- B.Use the fastest, most cost-efficient (Haiku-class) model for the high-volume extraction stage and reserve the most capable (Opus-class) model for the complex synthesis stage✓ Answer
- C.Use a single mid-tier model for both stages to simplify operations
- D.Use the most capable model for extraction and the smallest model for synthesis, since extraction handles more data
Model selection should match task complexity to model capability per pipeline stage: simple, high-volume extraction is well within a small fast model's ability, so paying premium per-token rates and latency there wastes budget, while complex multi-document synthesis genuinely needs the top-tier model's reasoning. Matching tiers to stages minimizes total cost and latency without sacrificing quality where it matters.
Source: Anthropic docs — About Claude: Models overview (choosing a model: capability vs. speed vs. cost); CCAR-P Exam Guide Domain 2 (select appropriate Claude models based on trade-offs)Report a problem with this question
2. A customer-support product sends every request — from simple FAQ lookups to complex multi-step troubleshooting — to the largest available model. Latency and cost are now unacceptable. Which architectural change best addresses this with minimal quality loss?
- A.Route requests by complexity: a fast, low-cost model handles routine queries, and complex or low-confidence cases escalate to the larger model✓ Answer
- B.Lower max_tokens on the large model so every response finishes sooner
- C.Disable streaming so responses arrive in a single payload
- D.Cache every full response so the model never has to answer the same category of question twice
A tiered routing (triage-and-escalate) pattern works because most production traffic is routine and well within a smaller model's capability; sending only the hard minority to the expensive model preserves quality where it is needed while cutting average cost and latency. Capping max_tokens truncates answers rather than speeding up per-token generation, disabling streaming worsens perceived latency, and response caching cannot serve the long tail of distinct user questions.
Source: Anthropic docs — Models overview (matching model tier to task; cost/latency/capability trade-offs); CCAR-P Exam Guide Domain 2Report a problem with this question
3. An application caches an 8,000-token static system prompt and policy document with a cache_control breakpoint, yet usage.cache_read_input_tokens is zero on every request. The system prompt begins with the line "Current time: {timestamp}" rendered per request. What is the most likely cause?
- A.The prompt exceeds the maximum length that can be cached
- B.Prompt caching only applies to user messages, not to system prompts
- C.The per-request timestamp at the start of the prompt changes the prefix bytes on every request; caching is an exact prefix match, so everything after the change is invalidated✓ Answer
- D.cache_control requires that the entire conversation history also be marked as cacheable
Prompt caching keys on the exact bytes of the rendered prompt prefix up to each breakpoint; any change anywhere in the prefix invalidates everything after it. A timestamp interpolated at the very start makes every request's prefix unique, so no request can ever read a prior request's cache entry — the fix is to freeze the prefix and move volatile values after the cached content.
Source: Anthropic docs — Build with Claude: Prompt caching (cache invalidation; caching is an exact prefix match); CCAR-P Exam Guide Domain 2Report a problem with this question
4. A request includes tool definitions, a large static system prompt, and varying user messages. The architect wants a single cache breakpoint that covers both the tool definitions and the system prompt. Where should it go?
- A.On the first tool definition, since tools must be cached before anything else
- B.On the last block of the system prompt — the prompt is assembled in the order tools → system → messages, so a breakpoint there caches tools and system together✓ Answer
- C.On the first user message, because caching always starts from the messages array
- D.No breakpoint is needed; the API always caches tools and system prompts automatically
The prompt is rendered in a fixed order — tools first, then system, then messages — and a cache breakpoint caches the entire prefix up to its position. Placing the breakpoint on the final system block therefore captures everything before it (all tool definitions plus the full system prompt) in one cached prefix, while leaving the varying messages uncached.
Source: Anthropic docs — Prompt caching (prompt structure order: tools → system → messages; breakpoint covers the full preceding prefix); CCAR-P Exam Guide Domain 2Report a problem with this question
5. Prompt cache writes are billed at a premium over base input tokens, while cache reads are billed at a steep discount, and entries expire after a time-to-live. Given these mechanics, which workload would INCREASE total cost if caching were enabled?
- A.A chatbot that reuses the same large system prompt across thousands of requests per hour
- B.A multi-turn agent that resends its growing conversation history on every turn
- C.A workload of unique one-off prompts where no prefix is ever sent twice✓ Answer
- D.A RAG application that sends the same knowledge-base document with a different question each time
Caching pays off only when a written prefix is read back at least once before its TTL expires: the discounted reads must offset the write premium. With unique one-off prompts, every request pays the cache-write premium and no request ever produces a cache read, so total cost strictly increases. The other three workloads all reuse a stable prefix repeatedly and are the canonical beneficiaries of caching.
Source: Anthropic docs — Prompt caching (pricing model: write premium vs. discounted reads; TTL); CCAR-P Exam Guide Domain 2Report a problem with this question
6. For a multi-turn conversational agent that resends the full conversation history on each request, what is the recommended cache breakpoint strategy?
- A.Cache only the first user message, since it never changes
- B.Place one breakpoint in the middle of the conversation and never move it
- C.Do not cache multi-turn conversations, because history changes every turn
- D.Place a breakpoint on the last content block of the most recent turn, so each new request reads the entire prior conversation as a cached prefix✓ Answer
Conversation history only grows by appending — the prior turns are a stable, byte-identical prefix of the next request. Marking the last block of the newest turn caches the whole conversation so far; on the next turn the previous breakpoint serves as a read point and the new content is written incrementally. This yields cache hits that grow with the conversation instead of reprocessing the full history at full price each turn.
Source: Anthropic docs — Prompt caching (continuing a multi-turn conversation: breakpoint on the most recent turn); CCAR-P Exam Guide Domain 2Report a problem with this question
7. A zero-shot classification prompt has detailed written instructions, but the model still formats labels inconsistently and mishandles ambiguous edge cases. Which prompt engineering technique most directly fixes this?
- A.Rewrite the instructions in all capital letters to increase their force
- B.Add a small set of few-shot examples demonstrating the exact input-to-output format, including examples of the ambiguous edge cases✓ Answer
- C.Remove the instructions entirely so the model relies on its own judgment
- D.Repeat the same instruction three times in the system prompt
Few-shot (multishot) prompting works because concrete examples communicate format and decision boundaries more precisely than prose descriptions: the model imitates the demonstrated input→output pattern, and edge-case examples show exactly how ambiguity should be resolved. Louder or repeated instructions do not add the missing information, and removing guidance makes consistency worse.
Source: Anthropic docs — Prompt engineering: Use examples (multishot prompting); CCAR-P Exam Guide Domain 2 (zero-shot vs. few-shot)Report a problem with this question
8. Which task benefits MOST from chain-of-thought prompting (asking the model to reason step by step before answering), and what is the primary trade-off an architect accepts by using it?
- A.Extracting a single keyword from a sentence; the trade-off is reduced accuracy
- B.Converting a date string between two fixed formats; the trade-off is higher accuracy
- C.A multi-step financial calculation that depends on intermediate results; the trade-off is more output tokens and higher latency✓ Answer
- D.Echoing structured data back unchanged; the trade-off is lower cost
Chain-of-thought improves accuracy specifically on tasks that require sequential reasoning, because writing out intermediate steps lets the model carry partial results forward and catch its own errors before committing to an answer. The cost is that all that reasoning is generated as output tokens, increasing both spend and response time — which is why CoT should not be applied to trivial lookups or mechanical transformations where it adds latency without accuracy gains.
Source: Anthropic docs — Prompt engineering: Let Claude think (chain of thought prompting); CCAR-P Exam Guide Domain 2Report a problem with this question
9. A prompt mixes instructions, retrieved documents, few-shot examples, and the user's question as one undifferentiated block of text. The model sometimes treats sentences inside the retrieved documents as if they were instructions. What is the recommended structural fix?
- A.Wrap each component in clearly labeled XML-style tags (e.g., <instructions>, <document>, <examples>, <question>) so the model can distinguish instructions from data✓ Answer
- B.Merge everything into a single long paragraph so nothing is visually separated
- C.Duplicate the instructions both before and after the documents
- D.Split every component into its own separate API call and combine the answers
Anthropic's prompt engineering guidance recommends XML-style tags to delimit distinct parts of a prompt because explicit boundaries tell the model which text is authoritative instruction and which is passive data to be analyzed. This prevents content inside documents from being executed as directions — a structural defense that also makes templates easier to maintain and reduces prompt-injection risk from retrieved content.
Source: Anthropic docs — Prompt engineering: Use XML tags to structure your prompts; CCAR-P Exam Guide Domain 2 (design system prompts, templates, and guardrails)Report a problem with this question
10. A RAG-based support assistant confidently invents policy details that do not appear in the retrieved documents. Which guardrail design most directly reduces these hallucinations?
- A.Increase max_tokens so the model has room to explain its reasoning
- B.Add more tools to the request so the model has more options
- C.Add the sentence "be accurate" to the end of the user message
- D.Instruct the model to answer only from the provided documents and give it an explicit out — permission to say it does not know and escalate when the answer is not in the context✓ Answer
Hallucinations in RAG systems are reduced by grounding: constraining answers to the supplied context and explicitly authorizing an "I don't know / escalate" path removes the implicit pressure to always produce an answer, which is what drives fabrication. Anthropic's guidance lists allowing the model to say it doesn't know and requiring answers to be grounded in provided material as primary anti-hallucination techniques; token limits, extra tools, and vague accuracy pleas do not change the model's incentive to fill gaps.
Source: Anthropic docs — Prompt engineering: Reduce hallucinations (allow "I don't know"; ground answers in provided context); CCAR-P Exam Guide Domain 2 (guardrail design)Report a problem with this question
11. A team placed the assistant's role, tone rules, and safety constraints inside the first user message. Later user messages routinely override those rules. What is the correct architectural placement for this content?
- A.Repeat the rules inside every user message so they are always fresh
- B.Move the role, rules, and constraints into the system prompt, which defines persistent behavior on a channel separate from untrusted user content✓ Answer
- C.Append the rules to the end of every assistant reply
- D.Shorten the rules so users are less likely to notice and override them
The system prompt is the designated channel for operator-defined role, behavior, and guardrails: the model treats it as standing configuration with higher authority than conversational user turns, so user messages cannot simply supersede it the way they supersede earlier user text. Placing stable rules there also keeps them in the fixed prompt prefix, which is exactly what prompt caching needs.
Source: Anthropic docs — Prompt engineering: Giving Claude a role with a system prompt; system prompts define persistent behavior; CCAR-P Exam Guide Domain 2Report a problem with this question
12. A long-running agent session is approaching the model's context window limit, but decisions made early in the session must remain available to the model. What is the best context management strategy?
- A.Increase max_tokens, which enlarges the total context available
- B.Delete the system prompt to free up space for conversation history
- C.Compact the conversation: summarize older turns and clear stale tool results, preserving key decisions in condensed form while keeping recent turns intact✓ Answer
- D.Silently drop the oldest half of the messages and continue
Compaction/summarization works because most of the token weight in a long agent transcript is stale detail (old tool outputs, resolved sub-discussions) while the information that must survive — decisions, constraints, current state — compresses well into a summary. This preserves task continuity within the fixed window. max_tokens caps output, not the window size; deleting the system prompt removes the agent's standing instructions; and blind truncation loses exactly the early decisions the scenario requires.
Source: Anthropic docs — Build with Claude: Context windows / context management (compaction and context editing for long conversations); CCAR-P Exam Guide Domain 2 (optimize context windows and manage token usage)Report a problem with this question
13. A response ends mid-sentence with stop_reason "max_tokens" even though the total input is nowhere near the model's context window. What does the max_tokens parameter actually govern?
- A.It caps only the generated output tokens; raising it allows longer responses as long as input plus output still fit within the context window✓ Answer
- B.It caps the combined total of input and output tokens for the request
- C.It is ignored whenever prompt caching is enabled
- D.It controls the size of the context window, which expands automatically when exceeded
max_tokens is a hard ceiling on output generation only: when the model reaches it, generation stops immediately and the response reports stop_reason "max_tokens", regardless of how much context window remains. The context window is a separate, fixed budget that input and output share. The correct remediation for truncated answers is to raise max_tokens (streaming for very large values), not to shrink the input.
Source: Anthropic docs — Build with Claude: Context windows (max_tokens caps output; context window covers input + output); CCAR-P Exam Guide Domain 2 (token management)Report a problem with this question
14. An organization has 30 task-specific procedure guides (spreadsheet formatting, brand style, legal review steps, etc.). Loading all of them into every request's system prompt wastes tokens, since each request needs at most one or two. Which prompt reuse mechanism fits best?
- A.Concatenate all 30 guides into the system prompt and rely on prompt caching to make the tokens free
- B.Send all 30 guides as attachments in every user message
- C.Maintain 30 separate applications, one per guide
- D.Package each guide as a Skill: a short description sits in context by default, and the full instructions are loaded only when the current task requires them✓ Answer
Skills implement progressive disclosure: only each skill's brief description occupies the context window by default, and the model pulls in the full instructions on demand when the task matches. This keeps the fixed context small while making all 30 procedures available. Caching makes repeated tokens cheaper but they still occupy the context window and dilute the model's attention; resending everything per message is the same problem worse; and 30 applications multiplies operational burden without solving context bloat.
Source: Anthropic docs — Agents and tools: Agent Skills (progressive disclosure; description in context, full SKILL.md loaded on demand); CCAR-P Exam Guide Domain 2 (prompt reuse: Skills)Report a problem with this question
15. A team maintains 12 nearly identical prompts for related tasks; each shares the same 3,000-token core instructions plus a small task-specific section and per-request user data. Updates are error-prone because the core must be edited in 12 places. Which redesign best improves maintainability AND cache efficiency?
- A.Keep 12 independent prompts and update each one manually whenever the core changes
- B.Factor the shared instructions into one stable core module placed first in every prompt, then append the task-specific module and the variable user data after it — one place to update and a common cacheable prefix✓ Answer
- C.Put the task-specific content first in each prompt so it is most salient to the model
- D.Assemble the prompt dynamically with the sections in a randomized order on each request
Modular prompt design follows the same rule as caching: order content by stability, most stable first. Factoring the shared core into a single module eliminates the 12-way duplicate-maintenance problem, and because every request now begins with byte-identical core text, that prefix can be cached and read across all 12 task variants. Putting variable content first, or randomizing order, would place changing bytes at the start of the prefix and destroy cache reuse entirely.
Source: Anthropic docs — Prompt caching (structure prompts with static content first, dynamic content last) and prompt engineering (prompt templates and variables); CCAR-P Exam Guide Domain 2 (prompt reuse: caching with static-prefix ordering, modular prompts)Report a problem with this question
Practice questions based on the official Claude Certified Architect – Professional (CCAR-P) exam guide and Anthropic's public documentation. This is an independent study tool, not affiliated with or endorsed by Anthropic, and does not grant certification. The real exam is 63 questions, 120 minutes, passing at a scaled 720/1000, delivered via Pearson VUE ($175). Official certification page →