Module 5 practice: Make it reusable
15 questions · Applications and Integration · Security and Safety · Model Selection and Optimization · Claude Code
Practice questions written by Sanjay Shah. Not exam questions, not affiliated with or endorsed by Anthropic.
Question 1
Three teams have copied
triage.tsinto their own repos, and each copy now has a different bug. What is the best way forward?- A) Ask each team to review the other teams' copies once a month.
- B) Extract one package with a stable, typed interface that every team installs, and fix bugs there.
- C) Merge all three repos into one.
- D) Add a comment to each copy pointing to the others.
Show answer
Answer: B
- A: Reviews keep the copies, and copies drift.
- B: One package means one place to fix bugs, and every team gets the fix on update.
- C: Drastic, and it still doesn't create a reusable interface.
- D: Comments don't stop the drift.
Question 2
Your shared triage library calls
new Anthropic()internally and readsANTHROPIC_API_KEYitself. Two teams complain: one runs on Amazon Bedrock, and the other wants to add tracing around every call. What is the best change?- A) Add a
providerstring parameter and read every platform's credentials inside the library. - B) Tell both teams to fork the library.
- C) Hard-code the Bedrock client instead.
- D) Have the caller pass in the client (or a
createfunction), so each team controls credentials, provider and tracing.
Show answer
Answer: D
- A: The library would end up owning every platform's credentials.
- B: Forks are copies, and copies drift.
- C: That breaks every team not on Bedrock.
- D: Passing the client in lets each team choose the provider, credentials, retries and tracing.
- A) Add a
Question 3
Your package's output gains a new required field,
language, and one existing field is renamed. Under semantic versioning applied to behaviour, which bump is right?- A) Major, because callers' code may break.
- B) Minor, because it adds a feature.
- C) Patch, because it's a small change.
- D) No bump; schemas aren't code.
Show answer
Answer: A
- A: A rename and a new required field can break callers, so this is a major bump.
- B: Minor is for compatible changes.
- C: Patch is for fixes with no behaviour change.
- D: The output schema is part of the public interface.
Question 4
A prompt change raises your eval score from 92% to 96%. The schema and the interface stay the same. Which version bump fits best?
- A) Major
- B) Patch, because only text changed
- C) Minor, because behaviour changed but the interface didn't
- D) No bump, because the score went up
Show answer
Answer: C
- A: Nothing breaks callers.
- B: Patch suggests no behaviour change.
- C: Behaviour changed while the interface stayed compatible, so it's a minor bump.
- D: Behaviour changes always need a version.
Question 5
On Amazon Bedrock, this call fails with a model-not-found error:
const c = new AnthropicBedrockMantle({ awsRegion: "us-east-1" }); await c.messages.create({ model: "claude-opus-5-5", max_tokens: 1024, messages });What is the most likely fix?
- A) Add an Anthropic API key to the client.
- B) Use the Bedrock model ID,
anthropic.claude-opus-5-5. - C) Use a dated ID,
claude-opus-5-5-20260101. - D) Switch to
new Anthropic({ baseURL: "bedrock" }).
Show answer
Answer: B
- A: Bedrock uses AWS credentials, not an Anthropic key.
- B: Bedrock model IDs carry the
anthropic.prefix. - C: Current IDs are dateless pinned snapshots, and that dated ID doesn't exist.
- D: Bedrock needs its own client for request signing.
Question 6
You plan to move the help-desk service to Claude Models on Google Cloud (Google managed). As of 2026-11-25, which two features that it uses today are *not* available there? (Choose TWO.)
- A) The Message Batches API for the nightly backlog.
- B) Prompt caching of the system prompt.
- C) Server-side refusal fallback (
fallbacks). - D) Structured outputs.
- E) Tool use.
Show answer
Answer: A, C
- A: Message Batches isn't available on Google Cloud (Google managed).
- B: Prompt caching is supported there.
- C: Server-side
fallbacksisn't available there; use client-side fallback. - D: Structured outputs are supported there.
- E: Tool use is supported there.
Question 7
How should the Claude credential get into your triage service's container in production?
- A) Injected at runtime from a secret store, never baked into the image or logged.
- B) Copied into the image as a
.envfile. - C) Hard-coded in
server.ts, because the image is private. - D) Passed in the body of each
/triagerequest.
Show answer
Answer: A
- A: Inject secrets at runtime from a secret store.
- B: A
.envin the image is visible in its layers. - C: Hard-coded keys leak through the image and the repo.
- D: Clients must never handle your provider key.
Question 8
The service now runs through
AnthropicBedrockMantle. Which credentials does it use?- A) An Anthropic API key in
ANTHROPIC_API_KEY. - B) A Google Application Default Credentials file.
- C) AWS credentials (IAM, signed requests) or a Bedrock bearer token; no Anthropic API key.
- D) No credentials; Bedrock is public.
Show answer
Answer: C
- A: An Anthropic API key is for the Claude API.
- B: Application Default Credentials are for Google Cloud.
- C: Bedrock signs requests with AWS credentials or uses a Bedrock bearer token.
- D: Bedrock requires authentication.
- A) An Anthropic API key in
Question 9
A new Claude model is released and looks better. What is the right way to adopt it for the triage route?
- A) Change the model ID in every file today; newer is better.
- B) Run the full eval on the new model ID, compare cost per completed task, then switch through config with a release note.
- C) Wait until the old model is retired, then switch without testing.
- D) Switch only the judge model.
Show answer
Answer: B
- A: "Newer" isn't measured "better for this route".
- B: Measure with evals, compare cost per completed task, and switch through config.
- C: Switching untested at the last minute is risky.
- D: It changes your measuring tool, not the route.
Question 10
A draft reply produced by the model contains a link, which your system puts into an HTML email. Which treatment fits the trust-boundary principle?
- A) Trust it, because the model is ours.
- B) Trust it if the system prompt said "only include safe links".
- C) Remove the system prompt so the model can't be confused.
- D) Treat it as untrusted: validate or strip links, escape the HTML, and keep a human approval step.
Show answer
Answer: D
- A: Model output may have been steered by untrusted input.
- B: A prompt instruction is not enforcement.
- C: Removing the system prompt makes behaviour worse and fixes nothing.
- D: Validate, escape and keep a human approval step for anything sent to customers.
Question 11
Where is tenant isolation enforced most robustly? (Choose TWO.)
- A) In the tool code, where the server sets the tenant from the session.
- B) In the system prompt, with a clear rule.
- C) In the database itself, for example row-level security by
tenant_id. - D) In the model's thinking.
- E) In the customer's browser.
Show answer
Answer: A, C
- A: The server sets the tenant in tool code, out of the model's reach.
- B: A prompt guides behaviour but doesn't enforce anything.
- C: The database enforces isolation again, even if the code has a bug.
- D: Reasoning is not enforcement.
- E: The browser is the least trusted place.
Question 12
You're writing the one-page requirements doc for the triage feature. Which addition is the most valuable for safety and for the release gate?
- A) A history of how the feature was designed.
- B) A list of every model you tried.
- C) An explicit "never does" list (never sends to customers, never moves money, never reads another tenant's data).
- D) The full system prompt.
Show answer
Answer: C
- A: History doesn't constrain behaviour.
- B: The list of models tried doesn't constrain behaviour.
- C: The "never" list becomes the trust boundaries, the Stop items and must-pass eval cases.
- D: The prompt changes with every version.
Question 13
Team B finds that Hinglish tickets are misclassified. What is the best way for them to contribute the fix?
- A) Fix it in their own copy and post a message about it.
- B) Add a failing eval case, make the fix (with a new prompt version), run the full eval, add a changelog entry, and open a PR that shows the result.
- C) Change the shared prompt in place on
main. - D) Raise effort to
maxfor all tickets.
Show answer
Answer: B
- A: The fix stays in one copy.
- B: An eval case, a new version, a changelog entry and a PR make the fix traceable and permanent.
- C: Editing in place skips versioning, the eval and review.
- D: It's a blunt, costly change that doesn't address the cause.
Question 14
You are designing CI for the triage package. Which two choices are best for the paid eval? (Choose TWO.)
- A) Run it on every commit to every file, with the production key.
- B) Run it only on pull requests that touch prompts, schema or model config; run free unit tests on every commit.
- C) Run it only after release, in production.
- D) Give it its own API key, in a separate workspace with a low spend limit.
- E) Never run evals in CI; do them by hand once a quarter.
Show answer
Answer: B, D
- A: It wastes money and exposes the production key.
- B: Run paid evals only where behaviour can change, and free tests everywhere.
- C: Regressions reach customers first.
- D: An isolated key with a spend limit stops a broken job from running up a bill.
- E: Regressions go unnoticed for months.
Question 15
You want the tenant-SQL hook, the secret-file hook and the review skill from Module 3 in every repo the company owns. What fits best?
- A) Package them as a Claude Code plugin (with a
.claude-plugin/plugin.jsonmanifest) and share it through a plugin marketplace. - B) Email the hook files to every team.
- C) Put them in your personal
~/.claude/settings.json. - D) Paste them into each repo's
CLAUDE.md.
Show answer
Answer: A
- A: Plugins bundle hooks, skills and subagents, and marketplaces distribute them.
- B: Emailed copies drift.
- C: User settings apply only to you.
- D:
CLAUDE.mdcan't define hooks.
- A) Package them as a Claude Code plugin (with a