40 practice questions for the Claude Certified Architect (Foundations) exam, in the same scenario style. Pick an answer to see if you are right and why.
Independent practice questions written to the exam’s reported domains and scenarios. They are not real exam questions, and Samir GenAI Academy is not affiliated with Anthropic.
Agentic architecture and orchestration · 27% · 11 questionsClaude Code configuration and workflows · 20% · 8 questionsPrompt engineering and structured output · 20% · 8 questionsTool design and MCP integration · 18% · 7 questionsContext management and reliability · 15% · 6 questions
Score: 0 right of 0 answered · 40 in total
Scenario: Customer support agent
Agentic architecture and orchestrationQuestion 1
A support agent resolves billing disputes. When a refund is above a set amount, it must not act alone. What is the best design?
Show the answer
Answer: B (Give the refund tool a fixed amount check in code that returns a 'needs approval' result and hands the case to a person). Business limits belong in code, not only in the prompt. The tool enforces the limit every time, and the agent escalates with the case details. Prompt-only rules can be ignored or talked around.
Agentic architecture and orchestrationQuestion 2
Your support agent sometimes loops, calling the same order-lookup tool again and again. Which fix addresses the cause and protects cost?
Show the answer
Answer: D (Add a step limit and repeat detection to the agent loop, and return a clear error when a call repeats with the same input). Agent loops need explicit stop conditions: a maximum number of steps, detection of identical repeated calls, and a clear message back to the model. A bigger model or lower temperature does not guarantee the loop ends.
Agentic architecture and orchestrationQuestion 3
A customer asks something the support agent's tools cannot answer, and the policy is unclear. What is the right behaviour for an 80% first-contact-resolution target?
Show the answer
Answer: D (Escalate to a human with a summary of the case, what was tried and what is missing). Resolution targets do not justify guessing. A good escalation passes the context so the human does not start again, which keeps the overall experience fast and correct.
Agentic architecture and orchestrationQuestion 4
Your agent loop calls Claude with tools. How does your code know Claude wants to use a tool rather than give a final answer?
Show the answer
Answer: B (The response has stop_reason "tool_use" and a tool_use content block with the tool name and input). With the Messages API, a tool call ends the turn with stop_reason "tool_use". Your code runs the tool and sends the output back as a tool_result block, then calls Claude again.
Agentic architecture and orchestrationQuestion 5
Which task split is best for a support system that handles billing, returns and account security?
Show the answer
Answer: D (A router that classifies the request and hands it to a focused agent with only the tools for that area). Focused agents with fewer, clearer tools choose correctly more often, and a security-related request never reaches billing tools. The router keeps each context small.
Prompt engineering and structured outputQuestion 6
Your classifier keeps confusing 'billing dispute' with 'refund request'. What prompt change helps most?
Show the answer
Answer: C (Add clear definitions for each category and a few labelled examples of the confusing cases (few-shot)). Explicit criteria and a few examples of the borderline cases show the model exactly where the line is. Emphasis or vague encouragement does not.
Prompt engineering and structured outputQuestion 7
Your instructions say 'keep answers short and helpful', but replies vary wildly in length. What is better?
Show the answer
Answer: C (State the exact target, for example 'at most 3 sentences, then one next step', and show one example). Explicit, measurable instructions beat vague ones. The model can follow '3 sentences and a next step' consistently; it cannot guess what 'short' means to you.
Tool design and MCP integrationQuestion 8
A tool call fails because the payment service timed out. What should the tool return to Claude?
Show the answer
Answer: B (A structured error with the category (for example a timeout), whether it is retryable, and a clear human-readable message). Structured, honest errors let the agent decide well: retry a temporary timeout, or stop and explain a permanent failure. Empty or fake results lead to wrong actions.
Tool design and MCP integrationQuestion 9
A tool that looks up an order returns 3,000 lines of raw database output. What is better?
Show the answer
Answer: B (Return only the fields the agent needs (status, date, amount), in a small structured form). Tool output fills the context window. Returning only what the task needs keeps the agent fast, cheap and focused.
Context management and reliabilityQuestion 10
In a very long support conversation, the agent forgets the order number given at the start. What helps most?
Show the answer
Answer: A (Keep key facts (order number, customer ID, decisions made) in a short structured summary that is carried into every call). Important facts can get lost in long histories. A compact case summary that is always included keeps them in view without resending everything.
Context management and reliabilityQuestion 11
Your system prompt and tool definitions are long and identical on every request. How do you cut cost and latency?
Show the answer
Answer: D (Use prompt caching on the stable prefix (system prompt and tools), and put the changing user message last). Prompt caching reuses a prefix that has not changed. Keeping stable content first and changing content last lets the cache hit on every request.
Context management and reliabilityQuestion 12
When should a support agent hand over to a human, rather than keep trying?
Show the answer
Answer: A (When the request is outside its policy or tools, when the customer asks for a person, or when a risky action needs approval). Good escalation rules are clear and early: out of scope, explicit request for a human, or a high-risk action. Late escalation wastes the customer's time.
Scenario: Code generation with Claude Code
Claude Code configuration and workflowsQuestion 13
Your team wants every developer's Claude Code to follow the same build commands and coding rules for one repository. Where do these instructions belong?
Show the answer
Answer: D (In a CLAUDE.md at the project root, committed to the repository). A project CLAUDE.md is checked into the repository and loaded for everyone working in it. A user-level file only applies to one person, across all their projects.
Claude Code configuration and workflowsQuestion 14
A developer wants their own preferences (shorter answers, a favourite test command) without changing the team's shared files. What should they use?
Show the answer
Answer: D (Their user-level settings and memory under ~/.claude, which apply only to them). Claude Code has layers: user-level files in ~/.claude apply to one person, project files apply to everyone in the repository, and personal project overrides can stay out of version control.
Claude Code configuration and workflowsQuestion 15
Before a large refactor across 30 files, you want Claude Code to show its plan and wait for your approval before it edits anything. What do you use?
Show the answer
Answer: A (Plan mode, so Claude explores and proposes a plan without making changes until you approve). Plan mode separates thinking from doing: Claude reads and plans, you review, then it executes. That is the safe pattern for big or risky changes.
Claude Code configuration and workflowsQuestion 16
Every time Claude Code edits a Python file, you want the formatter and linter to run automatically, without relying on the model to remember. What do you configure?
Show the answer
Answer: D (A hook that runs after file-edit tool calls (a PostToolUse hook)). Hooks are deterministic: they run your command on events such as after a tool is used. Instructions in CLAUDE.md are guidance the model may forget; a hook always runs.
Claude Code configuration and workflowsQuestion 17
Your team repeats the same multi-step instruction ('write tests, run them, fix failures') many times a day. How do you make it one command?
Show the answer
Answer: B (Save it as a custom slash command in the project's .claude/commands folder). Custom slash commands are prompt files stored with the project, so everyone can run the same workflow with one short command.
Scenario: Multi-agent research system
Agentic architecture and orchestrationQuestion 18
A coordinator agent sends research tasks to subagents. Subagents keep returning long raw web pages, and the coordinator runs out of context. What should change?
Show the answer
Answer: B (Have each subagent return a short structured summary with key facts and source links, not raw pages). A key reason to use subagents is context isolation: each does the heavy reading in its own context and returns only what the coordinator needs. Passing raw pages back defeats the purpose.
Agentic architecture and orchestrationQuestion 19
One of five research subagents fails because a source site is down. What should the coordinator do?
Show the answer
Answer: D (Retry the failed subagent's task a limited number of times, then continue with the other results and state clearly in the report which part is missing). Partial failures should be handled, not hidden: bounded retries for temporary errors, then carry on and report the gap honestly. Silent drops produce confident but incomplete reports.
Agentic architecture and orchestrationQuestion 20
When is it worth splitting a task across subagents instead of one agent doing it all?
Show the answer
Answer: C (When parts of the task are independent and each needs a lot of reading or exploration that would fill one agent's context). Subagents help when work can run in parallel and each part would otherwise flood a single context. For small or tightly linked tasks they only add cost and coordination overhead.
Agentic architecture and orchestrationQuestion 21
The coordinator must write a final report from the subagents' findings, which sometimes disagree. What is the best approach?
Show the answer
Answer: C (Ask the writing step to compare the findings, keep sources for each claim, and flag disagreements instead of hiding them). Synthesis should be traceable. Keeping sources per claim and naming conflicts lets a reader trust the report, and avoids an agent quietly picking the wrong source.
Tool design and MCP integrationQuestion 22
Your research system has 25 tools, and agents often pick the wrong one. What design helps?
Show the answer
Answer: B (Give each agent only the few tools its role needs). Fewer, role-specific tools per agent make the choice easier and safer, and keep each agent's context smaller.
Context management and reliabilityQuestion 23
A subagent hits an error, but the coordinator reports 'research complete'. What design problem is this?
Show the answer
Answer: B (Error propagation: subagent failures must be returned to the coordinator in a structured way and reflected in the final result). In multi-agent systems, errors must travel up the chain. If a subagent's failure is swallowed, the final answer looks complete but is wrong.
Scenario: Developer productivity tools
Agentic architecture and orchestrationQuestion 24
You build an agent with the Claude Agent SDK that edits files in a repository. How do you keep it from running dangerous shell commands?
Show the answer
Answer: D (Restrict its allowed tools and permissions, and deny or require approval for risky commands). Least privilege: allow only the tools the agent needs, and block or require approval for destructive actions. Safety comes from configuration, not from hoping the model behaves.
Agentic architecture and orchestrationQuestion 25
A long-running agent task must survive a crash halfway through. What makes it resumable?
Show the answer
Answer: D (Saving the task state (steps done, results, next step) to durable storage at each step, so a new run can continue). Session state belongs outside the model. Checkpoints after each step let you resume without repeating expensive or side-effecting work.
Claude Code configuration and workflowsQuestion 26
You want to block Claude Code from ever running commands that delete files or push to the main branch. What is the most reliable control?
Show the answer
Answer: D (Deny rules in the permission settings (or a hook that blocks those commands)). Permission deny rules and blocking hooks are enforced by the tool, not by the model's judgement, so the action cannot happen even if the model tries.
Tool design and MCP integrationQuestion 27
Claude keeps choosing the wrong one of two similar tools, search_tickets and search_orders. What is the first fix?
Show the answer
Answer: C (Rewrite the tool descriptions to say clearly what each searches, when to use it, and what it returns). Claude picks tools from their names and descriptions. Clear, distinct descriptions that say when to use each tool are the main lever for correct tool choice.
Tool design and MCP integrationQuestion 28
Your team wants Claude Code to use the same internal MCP server (ticket system) in one repository. Where do you configure it so everyone gets it?
Show the answer
Answer: B (In a project-scoped MCP configuration file (.mcp.json) committed to the repository). Project-scoped MCP configuration lives with the repository, so every developer gets the same servers. User-scoped servers are only for one person.
Tool design and MCP integrationQuestion 29
What does the Model Context Protocol (MCP) give you?
Show the answer
Answer: C (A standard way to connect Claude to tools, data and prompts through servers, so one integration works across MCP clients). MCP standardises how AI applications connect to external tools and data. You build a server once and any MCP-compatible client, such as Claude Code, can use it.
Tool design and MCP integrationQuestion 30
Which built-in Claude Code tools are designed for finding code in an unfamiliar repository?
Show the answer
Answer: D (Grep and Glob, then Read for the files found). Glob finds files by name pattern, Grep searches file contents, and Read opens the files found. Searching first keeps the context small instead of reading everything.
Context management and reliabilityQuestion 31
Claude Code is exploring a huge codebase and the context keeps filling up with file contents. What is a good practice?
Show the answer
Answer: D (Send exploration to a subagent that reports back only what it found, and write key notes to a scratchpad file). Subagents explore in their own context and return a summary, and notes in a file survive even when the conversation is compacted. The main context stays clean.
Context management and reliabilityQuestion 32
A tool returns a long, verbose log. The agent only needs the failing test names and error lines. What should you do?
Show the answer
Answer: C (Extract the key facts (failing tests and error lines) into a short structured result before passing it on). Pulling structured facts out of verbose output keeps the context small and makes the next step more accurate.
Scenario: Claude Code in CI/CD
Claude Code configuration and workflowsQuestion 33
You want Claude Code to review every pull request in your CI pipeline and post results your script can parse. How do you run it?
Show the answer
Answer: A (Run it non-interactively with -p (print mode) and --output-format json, then parse the output). Headless mode (-p) runs one prompt without the interactive interface, and JSON output gives your pipeline a stable structure to read and turn into PR comments.
Claude Code configuration and workflowsQuestion 34
Your automated review comments on far too many lines, and developers start ignoring it. What is the best way to cut false positives?
Show the answer
Answer: C (Give explicit criteria for what counts as a real issue, ask for a confidence level, and only post findings above a threshold). Vague instructions produce noisy reviews. Clear criteria plus a confidence filter keep the comments few and useful, so developers keep trusting them.
Prompt engineering and structured outputQuestion 35
A single review pass misses some bugs. Which design catches more without flooding the output?
Show the answer
Answer: C (A multi-pass review: one pass finds candidate issues, a second pass checks each one and keeps only confirmed problems). Separating 'find' from 'verify' raises recall in the first pass and precision in the second, so the final list is both fuller and cleaner.
Scenario: Structured data extraction
Prompt engineering and structured outputQuestion 36
You extract invoice fields from messy PDFs, and your code needs valid JSON every time. What is the most reliable approach?
Show the answer
Answer: B (Define a tool (or structured output) with a JSON schema, have Claude fill it, and validate the result in code). A schema-defined tool or structured output gives a fixed shape, and validation in code catches anything wrong. Free text plus parsing breaks on unusual documents.
Prompt engineering and structured outputQuestion 37
Some invoices have no purchase-order number, and the model invents one. How do you reduce this?
Show the answer
Answer: C (Make the field nullable and tell the model to return null when the value is not in the document). A required field pushes the model to fill it with something. Allowing null, with a clear instruction, gives it an honest option when the data is missing.
Prompt engineering and structured outputQuestion 38
Validation fails because a date came back in the wrong format. What is a good pattern?
Show the answer
Answer: B (Send the validation error back to Claude with the original output and ask for a corrected version, with a retry limit). A validation-retry loop uses the exact error message as feedback, which usually fixes the issue in one more call. The retry limit stops endless loops.
Prompt engineering and structured outputQuestion 39
You must process 200,000 documents overnight and results are not needed in real time. How do you cut cost?
Show the answer
Answer: A (Use the Message Batches API, which runs requests asynchronously at a lower price). The Batches API is designed for large, non-urgent workloads: you submit many requests and collect results later, at a discounted price.
Prompt engineering and structured outputQuestion 40
You want Claude to always call your extract_invoice tool, never reply in plain text. Which setting forces that?
Show the answer
Answer: B (tool_choice set to that specific tool (type "tool" with its name)). tool_choice controls tool use: auto lets Claude decide, any forces some tool, and naming a specific tool forces that one. Forcing it guarantees structured output for extraction.
want the full prep?
The full Claude Certified Architect exam prep course
Ten sessions, two per domain, each with a narrated video and a hands-on lab, 120 more scenario questions and two full 60-question mock exams with a timer.