Anthropic certification · Exam CCAR-F

CCAR-F Mock Exam Page 5

Claude Certified Architect – Foundations

Free CCAR-F mock exam questions 41–45, each with the answer and an explanation.

20 questions · 40 minutes · free, no sign-up

Free CCAR-F questions

41–45 of 45 free
Question 41 Choose 1
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.

The system needs to extract candidate information (name, contact details, skills, work experience, education) from uploaded resumes. The extracted data must strictly conform to a predefined JSON schema, as missing required fields or incorrect data types will cause downstream validation failures.

What is the most reliable approach to ensure Claude’s output consistently matches the schema?
Show answerHide answer

Correct answer: D Define a tool with an input schema matching your required JSON structure and extract the data from Claude’s tool_use response.

Explanation

Explanation:
The most reliable way to ensure structured output that strictly conforms to a JSON schema is to use Claude's native tool_use capability with a defined tool input schema. This approach leverages the API's built-in validation to enforce the schema at the structural level, eliminating manual parsing and reducing the risk of malformed or inconsistent outputs.

Correct Option:

D. Define a tool with an input schema matching your required JSON structure and extract the data from Claude's tool_use response.
This is the most reliable approach because it uses Claude's native structured output mechanism. By defining a tool with an input schema that exactly matches your required JSON structure (name, contact details, skills, work experience, education), you offload schema enforcement to the API. The model is forced to produce valid JSON matching the schema to successfully call the tool. This eliminates the need for manual parsing, regex extraction, or additional formatting steps, ensuring consistency and reducing the risk of downstream validation failures.

Incorrect Options:

A. Parse Claude's text response with regex patterns to extract JSON objects, using retry logic for malformed responses.
Regex parsing is brittle and error-prone, as it may fail if the response format deviates slightly. Retry logic increases latency and costs without guaranteeing a valid response. This approach does not leverage any built-in validation mechanism and relies on post-hoc fixes for malformed outputs, which is unreliable for production systems.

B. Include detailed JSON formatting instructions and a template example in the system prompt, asking Claude to output only valid JSON.
While this may work in many cases, it relies entirely on the model following instructions without any structural enforcement. The model may occasionally omit required fields, include extra fields, or produce malformed JSON, especially for complex schemas. This approach provides guidance but no guarantee, making it less reliable than tool-based schema enforcement.

C. Make two separate API calls—first extracting information as text, then asking Claude to format that text as JSON.
This approach doubles API costs and latency while still relying on instructions rather than structural enforcement. The second call could introduce formatting errors not present in the first extraction, and each call carries its own risk of inconsistency. This is inefficient and less reliable than a single tool-based call.

Reference:

Anthropic API Documentation – Tool Use – Recommends using tools with defined input schemas for reliable structured output extraction, as the API enforces schema compliance.

Anthropic Prompt Engineering Best Practices – Structured Outputs – Highlights that tool_use is the most reliable method for ensuring JSON schema compliance compared to prompting for JSON in text responses.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of validation and structured outputs in automated systems to ensure reliability and downstream integration.
Question 42 Choose 1
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.

Your extraction pipeline validates outputs against JSON schemas, but you need to implement human review given limited reviewer capacity (they can handle approximately 5% of total extraction volume).

What’s the most effective basis for selecting which extractions to route for human review?
Show answerHide answer

Correct answer: A Route extractions where the model indicates low confidence or where source documents contain ambiguous or contradictory information.

Explanation

Explanation:
With limited reviewer capacity (only 5% of total volume), the review system must prioritize extractions that are most likely to contain errors or require human judgment. Routing based on model confidence and document ambiguity targets the highest-risk cases, ensuring that limited reviewer capacity is used where it adds the most value.

Correct Option:

A. Route extractions where the model indicates low confidence or where source documents contain ambiguous or contradictory information.
This is the most effective basis for selection because it targets the cases that are most likely to contain errors. Model confidence scores (especially when calibrated) correlate with extraction accuracy—low-confidence outputs are more likely to be incorrect. Similarly, ambiguous or contradictory source documents are inherently harder for automated extraction and more likely to benefit from human judgment. This approach maximizes the value of limited reviewer capacity by focusing on the highest-risk cases, while allowing high-confidence, unambiguous extractions to proceed automatically.

Incorrect Options:

B. Route extractions containing specific high-priority entity types (e.g., financial figures, dates) for human review, regardless of extraction confidence.
While high-priority entities may deserve scrutiny, routing them all for review would likely exceed the 5% reviewer capacity, as financial figures and dates appear in many documents. This approach also wastes reviewer attention on high-confidence, straightforward extractions of these entities, reducing capacity for truly ambiguous cases. A confidence-based approach is more efficient.

C. Route extractions for review only when downstream systems report data quality issues or processing failures.
This is reactive rather than proactive—issues are only caught after they've already caused downstream failures. By the time a downstream system reports a problem, the incorrect data may have already affected decisions, reports, or integrations. This approach also provides no opportunity to catch issues before they propagate, increasing operational risk.

D. Randomly sample 5% of extractions for review.
Random sampling provides broad but shallow coverage. It will review many correctly extracted, high-confidence cases while missing most of the truly problematic extractions. This is inefficient use of limited reviewer capacity, as it does not target the cases most likely to contain errors. This approach has low return on review effort.

Reference:

Anthropic Prompt Engineering Best Practices – Confidence Scores – Recommends using confidence scores and ambiguity indicators to triage outputs for human review, focusing capacity on highest-risk cases.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes that human review should be targeted based on model uncertainty, data ambiguity, and materiality to maximize oversight value.

NIST AI Risk Management Framework – Highlights that risk-based triage of model outputs (focusing on high-risk, low-confidence cases) is more effective than random sampling or reactive monitoring.
Question 43 Choose 1
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.

An engineer asks your agent to identify untested code paths in a legacy payment processing module spanning 45 files. After reading the first 8 source files, the agent’s responses are becoming noticeably less accurate—it’s forgetting previously discussed code patterns and hasn’t yet located all test files or traced critical payment flows.

What’s the most effective approach to complete this investigation?
Show answerHide answer

Correct answer: A Spawn subagents to investigate specific questions (e.g., “find all test files for payment processing,” “trace refund flow dependencies”) while the main agent coordinates findings and preserves high-level understanding.

Explanation

Explanation:
The agent is losing accuracy due to context pressure—8 source files plus associated test files and flow tracing exceed the available context window, causing the model to forget earlier patterns. The solution must distribute the investigative work across specialized subagents, each with a narrower focus, while the main agent coordinates and preserves high-level understanding.

Correct Option:

A. Spawn subagents to investigate specific questions (e.g., "find all test files for payment processing," "trace refund flow dependencies") while the main agent coordinates findings and preserves high-level understanding.
This is the most effective approach because it distributes the investigative workload across multiple specialized subagents, each with a narrower context requirement. The main agent can coordinate efforts, synthesize findings, and maintain the overall investigation strategy without being overwhelmed by 45 files worth of code. Subagents can each read and analyze specific portions (test files, refund flow, etc.) without context overload, and return structured findings to the coordinator. This approach preserves accuracy and scalability while completing the investigation efficiently.

Incorrect Options:

B. Clear context with /clear, then selectively re-read only the most critical files discovered so far, writing key findings to a scratchpad file that persists between context resets.
Clearing context discards valuable findings and understanding already built, forcing the agent to redo work. Relying on a scratchpad file for state introduces complexity and still requires re-reading files. This approach loses the cumulative understanding the agent has developed and risks omitting important patterns that were captured earlier.

C. Switch to using Grep to search for specific function names instead of reading full files, reducing the content loaded into context for remaining exploration.
While Grep can reduce context usage, it sacrifices depth of understanding—the agent would need to read the actual code to understand logic, dependencies, and potential untested paths. Grep searches are complementary to reading, not a replacement. This approach would likely yield incomplete or inaccurate analysis of untested code paths.

D. Document all current findings in a summary report, clear context completely, then use that report as the sole reference for continuing the investigation.
Summarizing all findings risks losing critical details and patterns discovered earlier. The summary would be lossy, and the agent would need to work from incomplete information. This approach also prevents the agent from recalling specific code patterns, variable names, or nuanced relationships that are essential for a thorough investigation.

Reference:

Anthropic Claude Agent SDK Documentation – Subagent Coordination – Recommends spawning subagents for large-scale investigations to distribute workload and manage context constraints.

Anthropic Claude Code – Context Management – Highlights that subagents are more effective than context clearing or scratchpads for maintaining accuracy in large codebase explorations.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of robust investigation methods that maintain accuracy and completeness in complex systems.
Question 44 Choose 1
Your pipeline reviews every pull request using a single API call with a static prompt containing the diff and the full text of each changed file; unchanged files are not included. Reviews are posted asynchronously and do not block pull-request creation. Developers report that reviews consistently miss bugs involving cross-file interactions—for example, a pull request renames a function’s parameters, but the review does not flag callers in other files that still use the old parameter names. Post-release analysis shows that cross-file bugs account for 35% of production incidents from reviewed pull requests. What is the most effective change to your review design?
Show answerHide answer

Correct answer: A Redesign the review as a turn-limited agentic task in which the model can read files and search the codebase through tools, following references to verify cross-file findings.

Explanation

Explanation:
The root cause is that a single static prompt with only changed files cannot identify cross-file impacts because it lacks visibility into calling code. The solution must enable the review process to dynamically explore the codebase, following references to verify how changes affect other parts of the system. This transforms the review from static analysis into adaptive exploration.

Correct Option:

A. Redesign the review as a turn-limited agentic task in which the model can read files and search the codebase through tools, following references to verify cross-file findings.
This is the most effective approach because it enables dynamic, adaptive exploration of the codebase. The agentic task can use Grep to find callers of changed functions, Read to inspect their usage, and trace dependencies to verify compatibility. This directly addresses the 35% cross-file bug rate by allowing the model to follow the dependency graph naturally, reading only files that are actually relevant to the specific changes. Unlike static prompts, the agent can adapt its search based on what it discovers, ensuring comprehensive cross-file analysis without overwhelming the context window.

Incorrect Options:

B. Add chain-of-thought instructions asking the model to list all external references in the diff and then reason step by step about how each change might affect callers in other files.
Instructions alone cannot overcome the fundamental limitation of not having the actual code to analyze. The model can only guess about potential callers based on naming patterns or conventions, which is unreliable and prone to false positives or missed issues. Without the ability to read actual caller code, the model cannot verify compatibility.

C. Use static analysis to build a dependency graph of changed code, and then expand the prompt to include every file within two dependency hops of any changed file.
This risks including too many files (exponential growth), overwhelming the context window and increasing costs. A two-hop dependency graph for a core utility function could include hundreds of files. It also lacks precision—many included files may be irrelevant, while some critical callers might be more than two hops away. Static inclusion cannot adapt to the specific nature of each change.

D. Run parallel review passes for each changed file with its direct dependents included, and then aggregate and deduplicate the findings through a final summarization call.
This is inefficient and still incomplete—including only direct dependents may miss transitive callers or indirect usages. Running multiple passes increases token usage and latency significantly. The aggregation step also adds complexity and potential for lost or duplicated findings. An agentic approach is more elegant and efficient because it reads only what's needed based on the specific changes.

Reference:

Anthropic Claude Agent SDK Documentation – Agentic Code Review Patterns – Recommends using agentic tasks with tool access for reviews that require cross-file analysis, enabling dynamic exploration of the codebase.

Software Engineering Code Review Best Practices – Highlights that cross-file impacts require understanding of call graphs and usage patterns, which is best achieved through interactive exploration rather than static analysis.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of comprehensive testing and validation that accounts for interactions across system components.
Question 45 Choose 1
You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests like returns, billing disputes, and account issues. It has access to your backend systems through custom Model Context Protocol (MCP) tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.

Compliance requires that refunds exceeding $500 must automatically escalate to a human agent—this rule cannot be left to model discretion. Despite clear system prompt instructions, production logs show the agent occasionally processes high-value refunds directly (3% failure rate).

How should you achieve guaranteed compliance?
Show answerHide answer

Correct answer: D Implement a hook to intercept tool calls, when the refund process amount exceeds $500, block it and invoke human escalation.

Explanation

Explanation:
The agent occasionally violates the $500 refund escalation policy despite clear prompt instructions, indicating that relying solely on model instructions is insufficient for regulatory compliance. The solution must enforce the rule at the system/backend level rather than depending on the model's discretion. A pre-execution hook provides guaranteed enforcement.

Correct Option:

**D. Implement a hook to intercept tool calls, when the refund process amount exceeds $500, block it and invoke human escalation.**
This is the most effective approach because it enforces the compliance rule at the infrastructure level, not through model instructions. By intercepting tool calls to process_refund, you can inspect the amount parameter before the tool executes. If the amount exceeds $500, the hook blocks the call and triggers human escalation. This eliminates the 3% failure rate entirely because the enforcement is deterministic and not subject to model judgment or prompt adherence issues. This approach provides guaranteed compliance.

Incorrect Options:

A. Add few-shot examples to the prompt showing correct escalation behavior at various refund amounts ($400, $500, $600).
Few-shot examples may improve instruction following but cannot guarantee compliance. The model can still fail to apply the rule consistently, especially in ambiguous contexts or edge cases. The 3% failure rate shows that even with clear instructions, model discretion is not reliable for regulatory compliance.

B. Strengthen the system prompt with emphatic language: "CRITICAL POLICY: Refunds over $500 MUST trigger human escalation. NEVER process these directly."
While stronger language may help, it still relies on model judgment. The 3% failure rate demonstrates that even explicit system prompt instructions can be violated. Without structural enforcement, there is no guarantee of compliance, regardless of how emphatic the prompt language is.

C. Modify the refund tool to return an error with message "Amount exceeds policy limit—please escalate" when the threshold is exceeded.
This would prevent the refund from being processed but would not automatically trigger escalation. The agent would need to handle the error and then call escalate_to_human. This still relies on the model's behavior to correctly respond to the error message, leaving room for compliance gaps. A hook that both blocks the call and triggers escalation provides guaranteed compliance.

Reference:

Anthropic Claude Agent SDK Documentation – Tool Call Interception – Recommends using pre-execution hooks for policy enforcement that must be guaranteed, such as compliance rules and authorization checks.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes that compliance and regulatory rules should be enforced through deterministic controls rather than relying solely on model judgment.

Financial Services Compliance Best Practices – Highlights that monetary thresholds and regulatory rules require structural enforcement through system-level controls, not model instructions.

That's the last free question

You've seen the free 30% (45 of 152 questions). Full access unlocks every question and full-length CCAR-F mock exams (60 questions, 120 minutes), a different mock on every attempt.

Unlock full mock exam
Full mock exam

Sit the CCAR-F exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real CCAR-F exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full CCAR-F mock exam
  • 60questions per mock
  • 120 mintime limit
  • 152questions in the bank
  • Newmock on every attempt