Part 9b — Question Bank: Domain 2, Claude Models, Prompting & Context Engineering (Q27–Q45)

Original practice questions; not official or leaked. Objectives quoted from Exam Guide v1.0 §6 D2.


Q27 · D2 · Objective: Select appropriate Claude models based on trade-offs · Difficulty: Intermediate

Scenario: A bank labels 2M customer messages per day into 40 intents with a 500 ms latency budget. On your eval set, a small model scores 96.1%, a mid-tier model 96.8%, and the top-tier model 97.0%. Acceptance threshold is 95%. Question: Which model should you choose? A. The top-tier model, because it scores highest. B. The mid-tier model as a compromise between all three. C. The small model, because it meets the threshold with margin, fits the latency budget, and is far cheaper at this volume. D. Whichever model has the longest context window. Correct answer: C Explanation: Choose the cheapest, fastest model that clears acceptance criteria with margin; a 1-point gain rarely justifies large cost at 2M requests/day. Why not the others: A and B overpay for marginal gains; D ignores the actual constraints (context length isn't the issue). Architectural principle: Empirical selection on a quality–cost–latency Pareto frontier. Ref: Models overview (docs.claude.com); https://platform.claude.com/docs/en/test-and-evaluate/develop-tests


Q28 · D2 · Objective: Select appropriate Claude models based on trade-offs · Difficulty: Advanced

Scenario: An assistant answers many simple FAQ questions but occasionally receives complex multi-document questions. Using the top-tier model for all traffic exceeds budget; using the small model for all hurts hard cases. Question: Which design best balances cost and quality? A. A tiered design: a small model (or classifier) triages; simple cases are answered by a small/mid-tier model; hard or low-confidence cases escalate to a stronger tier, validated by evals. B. Randomly assign half the traffic to each model. C. Use the top-tier model but cap max_tokens very low. D. Use the small model and tell users to rephrase hard questions. Correct answer: A Explanation: Routing by difficulty or confidence captures most savings while preserving quality where it matters. Why not the others: B ignores difficulty; C truncates answers; D pushes the problem onto users. Architectural principle: Tiered routing across model sizes. Ref: Models overview; Building effective agents (routing)


Q29 · D2 · Objective: Select appropriate Claude models based on trade-offs · Difficulty: Advanced

Scenario: A newer, cheaper model is released. A manager asks you to switch production traffic immediately. Question: What is the best approach? A. Switch everything now; newer models are always better. B. Switch only a small share of users and wait for complaints. C. Switch only the prompts that mention the old model. D. Run the full regression, safety, cost, and latency evals on the candidate; if gates pass, canary with rollback criteria, with the model ID pinned in config. Correct answer: D Explanation: A model change is a system change. Evidence and staged rollout protect quality and safety. Why not the others: A and B skip gates (B waits for harm to surface); C misunderstands the change. Architectural principle: Eval-gated model changes with pinned versions and rollback. Ref: Prep Lesson 2; Model deprecations docs


Q30 · D2 · Objective: Select appropriate Claude models based on trade-offs · Difficulty: Expert

Scenario: A legal-reasoning workflow fails on multi-step cases. You have already clarified the prompt, added varied examples, and verified retrieval returns the right clauses. A stronger tier succeeds on the failed cases in testing. Question: What is the most likely diagnosis and next step? A. Retrieval failure; re-index. B. Model mismatch for this task's difficulty; evaluate the stronger tier (or decompose the task) and compare quality/cost. C. The temperature is too low; raise it. D. The context window has shrunk. Correct answer: B Explanation: With prompt and retrieval verified, the evidence points to capability mismatch. Why not the others: A contradicts the verification; C and D have no support in the symptoms. Architectural principle: Diagnose systematically; change the variable the evidence implicates. Ref: Exam Guide D4 (diagnose model mismatch)


Q31 · D2 · Objective: Select appropriate Claude models based on trade-offs · Difficulty: Advanced

Scenario: A team concludes "Model X is worse" after running a prompt carefully tuned for Model Y on both. Question: What is the flaw, and the fix? A. No flaw; the comparison is fair. B. The eval set is too large. C. Models should never be compared. D. The result is confounded by prompt tuning; evaluate each model with prompts reasonably tuned for it (same eval set and criteria) before deciding. Correct answer: D Explanation: A prompt tuned for one model biases the comparison. Why not the others: A ignores the bias; B is irrelevant; C is false. Architectural principle: Fair comparisons control for prompt-tuning effects. Ref: Prompt engineering overview


Q32 · D2 · Objective: Design system prompts, templates, and guardrails · Difficulty: Intermediate

Scenario: A summarizer receives user-pasted emails that sometimes contain instructions like "disregard the above." The prompt currently concatenates instructions and email text in one paragraph. Question: Which prompt change is best (as one layer)? A. Put the email at the very top without delimiters. B. Tell the user not to paste instructions. C. Increase the length of instructions. D. Separate the email with clear delimiters/tags and state that its contents are data to summarize, never instructions. Correct answer: D Explanation: Delimiting and labeling untrusted data reduces confusion; it's one layer, not a guarantee. Why not the others: A worsens separation; B is unenforceable; C doesn't separate data from instructions. Architectural principle: Separate instructions from data; treat prompts as guidance, not enforcement. Ref: https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/mitigate-jailbreaks


Q33 · D2 · Objective: Design system prompts, templates, and guardrails · Difficulty: Advanced

Scenario: A compensation assistant's system prompt says "Never reveal salary data of other employees," yet the retrieval tool returns all employees' records into context. Question: What is the correct fix? A. Strengthen the prompt with capital letters and repeat the rule. B. Add an apology template if the model slips. C. Enforce access in code so unauthorized records never enter the context; keep the prompt rule as an additional layer. D. Switch to a larger model that follows instructions better. Correct answer: C Explanation: Data the model never sees can't leak. Authorization belongs in code, not prompts. Why not the others: A, B, and D rely on model compliance for a security requirement. Architectural principle: Don't assume prompting alone enforces security or authorization. Ref: Exam Guide D5; MCP/authorization guidance


Q34 · D2 · Objective: Design system prompts, templates, and guardrails · Difficulty: Intermediate

Scenario: A downstream parser fails about 3% of the time because the model adds a sentence before the JSON. Question: What is the most robust remedy? A. Use structured outputs or a tool/JSON schema for the response and validate it in code, with a repair/retry or review path. B. Add "OUTPUT ONLY JSON!!!" to the prompt in capitals. C. Ask the model to apologize less. D. Strip the first sentence with a regex and hope. Correct answer: A Explanation: Schema-constrained output plus validation is deterministic where prompt wording is not. Why not the others: B and D are brittle; C is irrelevant. Architectural principle: Constrain and validate machine-consumed output. Ref: Structured outputs docs


Q35 · D2 · Objective: Design system prompts, templates, and guardrails · Difficulty: Intermediate

Scenario: Three teams copy-paste a shared prompt and edit it locally; behavior diverges and no one knows which version is deployed. Question: What is the best fix? A. Keep prompts as modular, versioned templates in source control with review, a changelog, and eval gates; deploy by version. B. Ask teams to coordinate in chat. C. Put the prompt in a shared document. D. Allow console edits for speed. Correct answer: A Explanation: Prompts are production artifacts; version control and gates provide auditability and rollback. Why not the others: B, C, and D lack control and traceability. Architectural principle: Prompt reuse through modular, versioned templates. Ref: Exam Guide D2 (modular prompts); D7


Q36 · D2 · Objective: Apply prompt engineering techniques (zero-shot, few-shot, chain-of-thought) · Difficulty: Intermediate

Scenario: A classifier handles common categories well but mislabels two subtle edge categories that differ by nuance. Question: Which technique most directly helps? A. Remove all examples to keep the prompt short. B. Raise max_tokens. C. Add a longer role description. D. Add few-shot examples that include those edge categories and hard negatives, then re-run the evals. Correct answer: D Explanation: Representative examples communicate nuanced boundaries that instructions struggle to describe. Why not the others: A removes signal; B and C don't target the confusion. Architectural principle: Few-shot for nuanced judgment and format. Ref: Prompt engineering overview


Q37 · D2 · Objective: Apply prompt engineering techniques (zero-shot, few-shot, chain-of-thought) · Difficulty: Advanced

Scenario: Two features: (1) a latency-critical 6-class routing step; (2) an offline multi-step financial reasoning task where accuracy matters more than speed. Question: Which application of reasoning techniques is most appropriate? A. Use step-by-step reasoning for both. B. Avoid reasoning for both. C. Skip extended reasoning for the routing step; use chain-of-thought or thinking features (where supported) for the offline reasoning task, validated by evals. D. Use reasoning only for routing. Correct answer: C Explanation: Reasoning improves multi-step tasks at the cost of tokens/latency; simple routing rarely needs it. Why not the others: A adds latency to routing; B hurts the reasoning task; D inverts the logic. Architectural principle: Spend reasoning tokens where they pay for themselves. Ref: Prompt engineering overview; extended thinking docs


Q38 · D2 · Objective: Apply prompt engineering techniques (zero-shot, few-shot, chain-of-thought) · Difficulty: Advanced

Scenario: Five few-shot examples add 3,000 tokens to every request and raise cost and latency; quality gains are real. Question: What is the best optimization? A. Delete the examples. B. Keep the examples but place them in the static prefix and use prompt caching (verifying minimum length and cache hits). C. Randomly drop two examples each request. D. Move examples to the end of the user message. Correct answer: B Explanation: Caching makes stable, reused examples cheap and fast while preserving quality. Why not the others: A loses quality; C adds variance; D prevents a stable cached prefix. Architectural principle: Cache stable prefixes; put dynamic content last. Ref: https://docs.claude.com/en/docs/build-with-claude/prompt-caching


Q39 · D2 · Objective: Optimize context windows and manage token usage · Difficulty: Advanced

Scenario: An agent degrades after about 40 turns. Logs show 90% of tokens are old tool outputs that are no longer relevant. Question: What is the best fix? A. Clear or trim stale tool results and compact the history while preserving decisions and open items. B. Move to a model with a larger context and change nothing else. C. Remove the system prompt. D. Increase temperature. Correct answer: A Explanation: Context hygiene addresses the actual cause; larger windows alone keep cost and noise. Why not the others: B postpones the problem; C removes needed instructions; D doesn't reduce noise. Architectural principle: Budget and curate context; compaction preserves what matters. Ref: Context management guidance; Prep Lesson 1


Q40 · D2 · Objective: Optimize context windows and manage token usage · Difficulty: Intermediate

Scenario: Employees query a 300-page policy manual that changes quarterly. Question: Which approach is best? A. Paste the entire manual in every request. B. Hope the model memorizes it. C. Summarize the manual to one paragraph. D. Provide an index/summaries and retrieve or load only relevant sections on demand (retrieval or progressive disclosure), citing sources. Correct answer: D Explanation: Targeted loading reduces tokens, supports citations, and handles updates. Why not the others: A is costly and noisy; B is impossible; C loses detail. Architectural principle: Retrieve or disclose progressively instead of dumping. Ref: Prep Lesson 1–2; Agent Skills (progressive disclosure)


Q41 · D2 · Objective: Optimize context windows and manage token usage · Difficulty: Advanced

Scenario: Monitoring shows rising cost per request. Tokens are: system 1,200; tool definitions 6,500; retrieved docs 3,000; history 1,500; output 400. Question: What should you examine first? A. The output length. B. The system prompt wording. C. The tool definitions — 6,500 tokens per request suggests capability bloat or overly verbose schemas; trim, scope, or discover on demand (and cache the stable portion). D. The user's typing speed. Correct answer: C Explanation: Measure the breakdown; the largest, least necessary component is the best lever. Why not the others: A and B are small; D is irrelevant. Architectural principle: Budget tokens by component and attack the biggest waste. Ref: Exam Guide D3 (capability bloat); D2 (token usage)


Q42 · D2 · Objective: Optimize context windows and manage token usage · Difficulty: Intermediate

Question (Select TWO): Which actions reduce token cost without dropping information the task needs? A. Return only the needed fields from tool results. B. Delete the system prompt. C. Cache a large static prefix reused across requests (when it meets the model's minimum cacheable length). D. Increase max_tokens to the maximum. E. Place a changing timestamp at the very start of the prompt. Correct answers: A, C Explanation: Trimming tool output and caching stable prefixes reduce billed tokens while preserving needed content. Why not the others: B removes instructions; D increases potential spend; E breaks cache prefixes. Architectural principle: Reduce waste, preserve signal. Ref: Prompt caching docs


Q43 · D2 · Objective: Implement prompt reuse strategies (caching, modular prompts, Skills) · Difficulty: Advanced

Scenario: You added cache_control after a 6,000-token static policy, but usage shows zero cache reads. The prompt begins with "Current time: " followed by the static policy. Question: What is the most likely cause and fix? A. Caching only works for tool calls. B. The policy is too long; shorten it. C. The model doesn't support text caching. D. The changing timestamp at the start breaks the identical-prefix requirement; move volatile values after the cached block. Correct answer: D Explanation: Cache hits require an identical prefix up to the breakpoint; a changing token at the front invalidates it. Why not the others: A and C are incorrect; B — long prompts are what caching is for (minimum length is a lower bound). Architectural principle: Stable content first, dynamic last. Ref: https://docs.claude.com/en/docs/build-with-claude/prompt-caching


Q44 · D2 · Objective: Implement prompt reuse strategies (caching, modular prompts, Skills) · Difficulty: Advanced

Scenario: Workload 1: an interactive chat with a long static policy and many users. Workload 2: a nightly job summarizing 500,000 documents with no one waiting. Question: Which pairing is best? A. Workload 1: prompt caching with synchronous calls; Workload 2: Batch API (asynchronous, discounted). B. Workload 1: Batch API; Workload 2: synchronous calls. C. Both: Batch API. D. Both: synchronous calls with no caching. Correct answer: A Explanation: Interactive needs low latency; batch trades latency (up to 24 hours) for a 50% cost reduction. Why not the others: B inverts; C and D ignore workload characteristics. Architectural principle: Match processing mode to the latency requirement. Ref: https://platform.claude.com/docs/build-with-claude/batch-processing


Q45 · D2 · Objective: Implement prompt reuse strategies (caching, modular prompts, Skills) · Difficulty: Intermediate

Scenario: A team has twelve occasionally needed procedures (release notes, incident reports, code review checklists). Putting all in the system prompt bloats every request. Question: What is the best approach? A. Keep everything in the system prompt. B. Package each as a Skill with a precise description so Claude loads the full instructions only when relevant (progressive disclosure). C. Ask users to paste procedures each time. D. Delete the procedures and rely on memory. Correct answer: B Explanation: Skills expose lightweight metadata up front and load details on demand. Why not the others: A bloats context; C is error-prone; D loses standards. Architectural principle: Progressive disclosure for reusable procedures. Ref: Agent Skills overview (Claude API docs)