CAF

Free CAF practice questions

10 questions from our CAF practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.

Back to the CAF practice exams

Question 1 of 10, Agentic Architecture & Orchestration. Choose 2.

A team is designing the delegation prompt a coordinator sends to a web-research subagent. Which TWO elements most improve the quality and usability of the subagent's result? (Choose two.)

  1. AThe coordinator's complete raw conversation history so the subagent can infer what is needed
  2. BAn instruction to keep searching until it has exhausted every possible source on the topic
  3. CA clear objective with scope boundaries, such as which sources and time range are in or out Correct answer
  4. DA request that the subagent rewrite the coordinator's system prompt to better suit its own task
  5. EAn explicit output format, for example a list of findings each with its source URL and publication date Correct answer

Answer and explanation: Good delegation states the objective, boundaries and expected output format so subagents neither duplicate work nor return unusable prose. Dumping the whole raw history wastes context and buries the task, open-ended exhaustive searching wastes tokens with no stopping rule, and asking the subagent to rewrite the coordinator's prompt is irrelevant to its task.

Question 2 of 10, Agentic Architecture & Orchestration

A coordinator agent must research five independent sub-topics, and total latency matters. Each sub-topic is handled by the same research subagent definition. How should the coordinator dispatch the work to minimise wall-clock time?

  1. AInvoke one subagent at a time and pass each result into the next call so later subagents can build on earlier findings
  2. BEmit all five subagent invocations as separate tool calls in a single assistant response so they run in parallel Correct answer
  3. CGive a single subagent all five topics in one prompt and instruct it to interleave the searches as efficiently as possible
  4. DStart five separate coordinator sessions with the same system prompt and merge their final answers in application code

Answer and explanation: Issuing several subagent tool calls in one response lets the runtime execute them concurrently, which is the standard way to parallelise independent work. Sequential chaining only helps when tasks depend on each other, one overloaded subagent serialises the work in a single context, and duplicating coordinators loses central synthesis and multiplies cost.

Question 3 of 10, Agentic Architecture & Orchestration

A research system spawns ten subagents for every query, including simple factual questions like 'What year was the company founded?' Costs are high and simple answers are slow. What is the BEST adjustment?

  1. ARoute all simple questions to a smaller model while keeping ten subagents for every incoming query
  2. BHave the coordinator scale effort to complexity: one agent for simple facts, more subagents for broad research Correct answer
  3. CCache every subagent result for 24 hours so that repeated questions can skip the multi-agent run entirely
  4. DLower the subagent count to five for all queries so the cost of every request falls by roughly half

Answer and explanation: Anthropic's research system guidance is to embed effort-scaling rules so the orchestrator matches the number of agents and tool calls to the query's complexity. A fixed lower count still overspends on simple questions and underpowers hard ones, keeping ten subagents per query wastes cost even with a cheaper model, and caching helps only exact repeats.

Question 4 of 10, Tool Design & MCP Integration

An MCP server exposes a delete_branch tool. The team wants clients to be able to recognise that this tool modifies state irreversibly so they can require confirmation. What should the server author do?

  1. AReturn the deletion result as an MCP resource rather than a tool result
  2. BPrefix the tool name with DANGER_ so that both clients and the model notice it in the tool list
  3. CSet destructiveHint to true and readOnlyHint to false in the tool's annotations Correct answer
  4. DExpose the operation only as an MCP prompt template so users must trigger it manually

Answer and explanation: MCP tool annotations such as readOnlyHint and destructiveHint let servers describe tool behaviour so clients can apply confirmation policies; they are hints, so clients must still enforce the policy. A name prefix is not a standard signal, resources are read-oriented context and do not change who triggers the deletion, and converting the action into a prompt template changes the interaction model instead of describing the tool.

Question 5 of 10, Tool Design & MCP Integration

A developer installs an unfamiliar third-party MCP server and later discovers that one tool description contains hidden text instructing the model to send file contents to an external URL. What practice would have BEST reduced this risk?

  1. AOnly installing MCP servers from trusted sources and reviewing their tool definitions before use Correct answer
  2. BAsking the model in the system prompt to ignore any unusual instructions found in tool descriptions
  3. CIncreasing the agent's max_tokens so that it can reason more carefully about each tool description
  4. DRunning the server over Streamable HTTP rather than stdio so that its traffic is encrypted in transit

Answer and explanation: Tool descriptions go into the model's context, so a malicious server can inject instructions; vetting sources and reviewing definitions is the main defence, along with least-privilege permissions. Transport encryption does not stop malicious content, max_tokens is irrelevant, and a prompt instruction is not a reliable control.

Question 6 of 10, Claude Code Configuration & Workflows

A team wants a shared, reusable /review-pr workflow that every developer gets automatically when they clone the repository. Where should it be defined?

  1. AIn the project's .claude/settings.local.json file under a commands key
  2. BAs a skill or command under the repository's .claude directory, committed to git Correct answer
  3. CIn each developer's ~/.claude/commands directory, copied over by an onboarding script
  4. DAs a section in each developer's personal ~/.claude/CLAUDE.md memory file

Answer and explanation: Project-scoped skills and commands live in the repository's .claude directory, so committing them shares the workflow with everyone who clones the repo. Home-directory commands are personal and drift when copied, settings.local.json is a personal, git-ignored settings file rather than a place for workflows, and personal memory files are not shared.

Question 7 of 10, Claude Code Configuration & Workflows

A developer must refactor authentication across roughly 40 files in an unfamiliar codebase and is unsure how the pieces fit together. Which Claude Code workflow is MOST appropriate?

  1. AStart in plan mode so Claude explores and proposes an approach for review before changing any file Correct answer
  2. BRun claude -p with the refactor request in CI so the change happens without interactive prompts
  3. CAsk Claude to edit one file at a time and approve each edit manually without an overall plan
  4. DAsk Claude to make the changes directly with acceptEdits mode so the whole refactor completes in a single pass

Answer and explanation: Plan mode is designed for large, multi-file or ambiguous changes: Claude reads and analyses without editing and presents a plan the developer can correct cheaply. Direct auto-accepted edits risk a wrong approach across many files, headless CI runs suit well-defined automation, and piecemeal edits without a plan miss cross-file design issues.

Question 8 of 10, Prompt Engineering & Structured Output

A financial-analysis prompt asks Claude for a buy, hold or sell rating. Ratings are often poorly justified. The team wants to see the reasoning and parse the final rating automatically. Which prompt design fits BEST?

  1. AAsk for the rating first and then a short justification in the same sentence
  2. BAsk Claude to reason inside <analysis> tags and then give the rating inside <rating> tags Correct answer
  3. CAsk Claude to output only the rating word so that the result is easy to parse
  4. DAsk Claude to keep its reasoning hidden and report a confidence percentage

Answer and explanation: Structured chain of thought, with reasoning and answer in separate tags, improves quality and keeps the final answer easy to extract. Answer-only output removes the reasoning that improves quality, rating-first means the reasoning cannot inform the answer, and a self-reported confidence does not add analysis.

Question 9 of 10, Prompt Engineering & Structured Output

A ticket-triage schema has a category field with an enum of eight values. New issue types that fit none of them are being forced into the closest wrong category. What is the BEST schema change?

  1. AAdd an 'other' enum value plus a category_detail string to describe it Correct answer
  2. BMake the category field optional so the model can leave it out
  3. CAdd a ninth value 'misc' and instruct the model to use it rarely
  4. DRemove the enum and accept any free-text category the model wants

Answer and explanation: An 'other' value paired with a detail field gives an honest escape hatch while keeping the enum for known categories, and the detail text helps the team find new categories. Free text breaks downstream grouping, a rarely-used misc bucket still loses information, and an optional field produces silent gaps.

Question 10 of 10, Context Management & Reliability

A nightly job generates summaries for 40,000 archived support tickets. Results are needed by the next morning and cost is the main concern. Which approach is MOST cost-effective?

  1. ASend all 40,000 requests concurrently through the Messages API with streaming enabled
  2. BSubmit the requests through the Message Batches API and collect the results when the batch completes Correct answer
  3. CProcess the tickets sequentially with a single synchronous worker to stay under rate limits
  4. DUse Priority Tier capacity so the job finishes as quickly as possible overnight

Answer and explanation: The Message Batches API processes large asynchronous workloads at a 50% discount, with results available within 24 hours and usually much sooner, which fits an overnight job. Streaming concurrent requests pays full price and risks rate limits, Priority Tier buys availability rather than savings, and a single sequential worker pays full price and may not finish.