Anthropic certification · Exam CCAR-F

CCAR-F Mock Exam Page 2

Claude Certified Architect – Foundations

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

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

Free CCAR-F questions

11–20 of 45 free
Question 11 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.

The agent verifies customer identity through a multi-step process before resetting passwords. During testing, you notice that after the customer answers the third verification question, the agent asks them to provide their name again, as if the earlier exchange never happened.

What’s the most likely cause of this behavior?
Show answerHide answer

Correct answer: B The conversation history isn’t being passed in subsequent API requests.

Explanation

Explanation:
The agent's behavior—asking for information already provided earlier in the conversation—strongly indicates a loss of conversational context. In the Claude Agent SDK, the agent's state is maintained through the conversation history passed in each API request. If this history is truncated or not passed correctly between turns, the agent will appear to have amnesia about prior exchanges, as each request is treated in isolation.

Correct Option:

B. The conversation history isn't being passed in subsequent API requests.
This is the most likely cause because the Claude Agent SDK relies on the full conversation history being included in each API call to maintain context. If the history is not properly persisted and passed back in subsequent requests, the agent loses all memory of previous turns. The behavior described—asking for the customer's name again after three verification questions—is the classic symptom of stateless request handling where each interaction is treated as a fresh conversation without prior context.

Incorrect Options:

A. The prompt lacks instructions telling Claude to remember information across multiple exchanges.
Claude does not need explicit instructions to remember information within a conversation—this is the default behavior when the full conversation history is provided. Memory is a function of the input context (the conversation history), not of prompt instructions. Adding memory-related prompts would not solve the problem if the history itself is not being passed.

C. The verification tool is clearing the agent's internal state after each successful validation step.
The verification tool (get_customer, lookup_order, etc.) does not control the agent's conversational state—the agent's state is managed by the SDK and the conversation history passed in API requests. Tools are stateless functions that return data; they cannot clear the agent's memory of previous exchanges. This explanation misunderstands the separation between tool execution and conversational memory.

D. Claude's memory retention is limited to two conversational turns by default, requiring explicit configuration to extend it.
This is incorrect. Claude has no such artificial limit on memory retention. As long as the full conversation history is provided within the context window (which is 200K+ tokens), Claude retains all information from the entire conversation. The default behavior is to retain the full history, not limit it to two turns. No explicit configuration is needed to extend memory beyond any default.

Reference:

Anthropic Claude Agent SDK Documentation – Conversation Management – Emphasizes that the conversation history must be passed in each API request to maintain state; the SDK provides built-in mechanisms for history persistence.

Anthropic API Documentation – Messages API – Clarifies that each request is stateless and requires the full conversation history to be provided for the model to maintain context across multiple turns.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Highlights the importance of audit trails and state management in automated decision-making systems to ensure consistency and transparency across interactions.
Question 12 Choose 1
Your automated review generates many findings per pull request, but developer feedback shows that roughly half are dismissed as “not worth addressing.” Analysis reveals that dismissed findings are often technically accurate but involve minor style preferences or patterns that are acceptable in your codebase. Before adding infrastructure complexity, what prompt-design change could most effectively reduce dismissals while maintaining the detection of genuine issues?
Show answerHide answer

Correct answer: A Add explicit criteria defining which issues to report, such as bugs and security defects, and which issues to skip, such as minor style preferences and accepted local patterns.

Explanation

Explanation:
The core issue is that Claude lacks clear, project-specific guidance on what constitutes a reportable finding versus a trivial or acceptable deviation. Developers are dismissing technically accurate but low-value findings because they don't align with team standards. Before adding infrastructure complexity, the simplest and most effective fix is to provide explicit criteria in the prompt that distinguish between issues that matter and those that can be skipped.

Correct Option:

A. Add explicit criteria defining which issues to report, such as bugs and security defects, and which issues to skip, such as minor style preferences and accepted local patterns.
This directly addresses the root cause by giving Claude clear, actionable guidelines. By explicitly defining "reportable" categories (bugs, security defects) and "skip" categories (minor style, accepted local patterns), you align Claude's output with developer expectations. This prompt-design change requires no infrastructure investment, is immediately testable, and preserves the detection of genuine issues while filtering out noise at the source.

Incorrect Options:

B. Implement a secondary classification model that filters Claude's findings according to predicted developer acceptance.
This adds significant infrastructure complexity without addressing why Claude generates dismissible findings in the first place. A secondary model introduces additional latency, cost, and maintenance overhead. More importantly, it's a post-hoc filter that doesn't prevent Claude from generating low-value findings—it only hides them after the fact, wasting tokens and compute on issues that will never be used.

C. Ask Claude to rate every finding's confidence from 1 to 10 and include only findings rated 8 or higher.
Confidence scores do not correlate with relevance or actionability. A finding about a minor style violation might receive high confidence (the code does violate the style rule) but still be dismissed as "not worth addressing." Conversely, a complex security issue might receive lower confidence but be highly valuable. This approach also adds token overhead for scoring and doesn't address the distinction between valuable and trivial findings.

D. Append instructions telling Claude to "only report findings you are highly confident are genuine problems."
This is vague and subjective—what constitutes a "genuine problem" to Claude may not match your team's definition. Claude might still report minor style preferences if it interprets them as "problems." This instruction also risks suppressing important but nuanced findings where confidence is moderate, potentially missing genuine bugs. Without explicit criteria, this change is unlikely to meaningfully reduce dismissal rates.

Reference:

Anthropic Prompt Engineering Best Practices – Recommends providing explicit, concrete criteria rather than vague instructions to guide Claude's judgment on what to include or exclude.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of clear specifications, validation criteria, and documented standards to ensure model outputs meet quality and risk management requirements.

Software Engineering Code Review Best Practices – Highlights that effective code review processes define clear criteria for what issues should be flagged, distinguishing between mandatory fixes (bugs, security) and optional suggestions (style preferences).
Question 13 Choose 1
Your code-review prompts include both implementation changes and the corresponding test file, but the review comments fail to identify untested code paths. The model correctly flags functions that have no tests at all, but it fails to recognize when conditional branches or error-handling paths within tested functions lack coverage. What is the most effective way to improve branch-level gap detection without overcomplicating the pipeline?
Show answerHide answer

Correct answer: B Add explicit instructions requiring Claude to enumerate every conditional branch and exception path, then verify that each path has a corresponding test assertion.

Explanation

Explanation:
The model can identify completely untested functions but fails at finer-grained branch coverage because it lacks explicit guidance to perform systematic verification. The solution must provide clear, structured instructions that force the model to enumerate all conditional paths and map them to test assertions, without adding pipeline complexity like multi-pass systems.

Correct Option:

B. Add explicit instructions requiring Claude to enumerate every conditional branch and exception path, then verify that each path has a corresponding test assertion.
This is the most effective approach because it directly addresses the gap detection problem through prompt engineering alone, requiring no infrastructure changes. By instructing Claude to systematically enumerate all conditional branches (if/else, switch/case, try/catch) and exception paths, then cross-reference each against the test file, you force the model to perform branch-level coverage analysis. This structured methodology transforms a vague "check coverage" task into a concrete, verifiable checklist, dramatically improving detection without pipeline overhead.

Incorrect Options:

A. Interleave the implementation and tests in the prompt, presenting each function immediately before its test cases.
While this might help with local context, it does not force the model to systematically check branch coverage. Without explicit instructions to enumerate and verify branches, the model may still read the code and tests without performing the necessary cross-referencing. Interleaving alone does not change the model's analytical approach to the coverage problem.

C. Implement a two-pass pipeline in which one model call extracts all conditional branches and another cross-references them against test assertions.
This adds significant pipeline complexity (two API calls, orchestration logic, result merging) without providing clear benefit over a well-crafted single-pass prompt. The two-pass approach also introduces latency and cost overhead. The same systematic enumeration can be achieved with explicit instructions in a single call, making this solution overengineered for the problem.

D. Include few-shot examples showing code with an uncovered branch and the corresponding review comment identifying the missing test case.
Few-shot examples are helpful but insufficient for ensuring comprehensive branch coverage. Examples demonstrate the desired output format but do not force the model to perform systematic enumeration of every branch in every function. Without explicit instructions to enumerate and verify all branches, the model may still miss branches that don't match the pattern shown in the examples.

Reference:

Anthropic Prompt Engineering Best Practices – Recommends using explicit, structured instructions to guide Claude through multi-step reasoning tasks, especially for verification and analysis workflows.

Testing Best Practices – Branch Coverage – Emphasizes that branch coverage requires systematic identification of all conditional paths and explicit validation that each path is exercised by test cases.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Highlights the importance of systematic validation processes and explicit verification criteria to ensure model outputs meet quality standards.
Question 14 Choose 1
After deploying automated code review, developers report that approximately 35% of flagged findings are false positives falling into consistent patterns: style suggestions contradicting team conventions, security warnings for patterns that are safe in your deployment context, and performance suggestions that would degrade your specific use case. You want to reduce false positives while maintaining the ability to catch genuine issues. Which approach best enables the model to generalize its judgment to novel code patterns it has not seen before?
Show answerHide answer

Correct answer: B Include few-shot examples in your prompt showing annotated code snippets that distinguish acceptable patterns from genuine issues in each category.

Explanation

Explanation:
False positives arise because the model lacks examples that illustrate the boundary between acceptable patterns (given your team conventions and deployment context) and genuine issues. Few-shot examples enable the model to learn the reasoning heuristics for distinguishing these categories, allowing it to generalize to novel patterns not explicitly covered in the prompt.

Correct Option:

B. Include few-shot examples in your prompt showing annotated code snippets that distinguish acceptable patterns from genuine issues in each category.
This is the most effective approach because examples teach the model the decision boundary rather than just listing rules. By providing concrete annotated snippets—e.g., "This pattern is safe in our deployment context because X, but this similar pattern is a genuine security issue because Y"—the model learns the contextual reasoning needed to generalize. Unlike exhaustive rule lists, few-shot examples help Claude recognize that the same pattern may be acceptable or problematic depending on context, enabling accurate judgment on novel code.

Incorrect Options:

A. Implement post-processing that uses keyword matching to filter out findings containing terms such as "convention," "context-dependent," or "trade-off."
This is a crude filter that will miss nuanced false positives and may filter out genuine issues that legitimately involve conventions or trade-offs. Keyword filtering cannot distinguish between a false positive where the pattern is acceptable and a genuine issue where the same terminology appears. This approach adds complexity without improving the model's reasoning capability.

C. Create a comprehensive written specification of all patterns that should not be flagged, and then include the full documentation in the system prompt.
This is impractical because the universe of acceptable patterns is unbounded—you cannot enumerate every safe pattern. A comprehensive specification would be too long for the context window and would still fail to cover novel patterns not anticipated. Rules also lack the contextual nuance that examples provide; the model may struggle to apply abstract rules to concrete code.

D. Add instructions to your system prompt to "be conservative," "only flag definite issues," and "consider that some patterns may be intentional."
These instructions are vague and subjective. Claude's interpretation of "conservative" or "definite" may not align with your team's standards, and this approach does not provide the concrete, contextual guidance needed to distinguish acceptable patterns from genuine issues. Without examples illustrating the boundary, the model may still produce the same false positives or, worse, become overly conservative and miss genuine issues.

Reference:

Anthropic Prompt Engineering Best Practices – Recommends using few-shot examples to teach nuanced decision boundaries, as examples are more effective than abstract rules for contextual judgment tasks.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of validation and calibration using representative examples to ensure model outputs meet quality standards and reduce false positives.

NIST AI Risk Management Framework – Highlights that AI systems should be trained and validated using diverse, representative examples to ensure generalization and reduce systematic errors.
Question 15 Choose 1
You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.

Your automated reviewer uses a single prompt covering security issues, API design, and business-logic correctness. Your evaluation suite shows strong recall for API-design findings at 82% but poor recall for business-logic edge cases in quiz scoring at 34%. When you add few-shot examples of logic bugs to the prompt, logic recall improves to 41%, but API-design recall drops to 68%.

How should you address this trade-off to improve detection across both categories?
Show answerHide answer

Correct answer: A Split the review into separate focused prompts—one for security and API design and another for business logic—each with dedicated examples, and then consolidate the findings before posting.

Explanation

Explanation:
The recall trade-off occurs because a single prompt with mixed examples forces the model to divide its attention across multiple concern types, diluting focus on each category. Adding examples for one category creates interference that reduces performance on others. The solution is to separate concerns into focused prompts, each optimized for its specific domain, and then aggregate results.

Correct Option:

A. Split the review into separate focused prompts—one for security and API design and another for business logic—each with dedicated examples, and then consolidate the findings before posting.
This is the most effective approach because it eliminates cross-category interference. Each prompt is now narrowly focused with dedicated examples, allowing the model to apply specialized reasoning without distraction. Security/API design receives its own optimized prompt with relevant examples, while business logic gets its own prompt with logic-bug examples. This separation enables each prompt to achieve higher recall in its domain. Consolidation before posting ensures developers receive a unified, actionable review.

Incorrect Options:

B. Replace the few-shot examples with a detailed checklist of specific logic edge cases to verify, such as division by zero in score calculations and boundary conditions in grading thresholds.
While checklists can help, they are less effective than examples for teaching nuanced detection. More importantly, this approach does not address the root cause—cross-category interference in the single prompt. The security/API design categories would still compete for attention, and logic recall might improve modestly while API-design recall continues to suffer from the diluted focus.

C. Upgrade to a more capable model tier because its stronger reasoning will handle both concern types in one prompt and eliminate the recall trade-off.
This is an expensive and unproven assumption. Even the most capable models suffer from context dilution when asked to perform multiple complex reasoning tasks simultaneously. Upgrading models does not guarantee elimination of the trade-off; it may shift the balance but not resolve the fundamental interference problem. Without addressing prompt architecture, you may incur higher costs without achieving the desired recall improvements.

D. Provide the full repository as context instead of only the changed files and surrounding code, giving the model deeper visibility into business-logic patterns.
While additional context might help business-logic detection, it does not address the cross-category interference problem. More context also increases token usage and latency, potentially introducing new challenges without fixing the core architectural issue. The model would still need to divide attention across security, API design, and business logic within a single prompt, maintaining the trade-off.

Reference:

Anthropic Prompt Engineering Best Practices – Recommends splitting complex tasks into focused prompts, each optimized for a specific domain, to reduce interference and improve overall performance.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of targeted validation and specialized approaches for different model outputs to ensure quality and reliability.

Software Engineering – Modular Design Principles – Highlights that separation of concerns (e.g., specialized review categories) improves quality by allowing focused attention on each aspect rather than attempting to address all concerns simultaneously.
Question 16 Choose 1
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.

Your extraction system parses e-commerce product descriptions to extract specifications such as dimensions, weight, and materials into JSON. Despite having a well-defined schema, the model inconsistently extracts the materials field—sometimes returning “cotton blend,” other times “Cotton/Polyester mix,” and occasionally omitting the field when material information is clearly present in the source.

What is the most effective way to improve extraction consistency?
Show answerHide answer

Correct answer: D Add few-shot examples showing two or three complete input-output pairs with standardized material-description formats.

Explanation

Explanation:
The inconsistency stems from the model lacking a clear, standardized representation of how to format material information. The schema defines the field but does not specify normalization rules for variations like "cotton blend" vs. "Cotton/Polyester mix." Few-shot examples teach the model the expected format and normalization conventions, providing concrete patterns to follow.

Correct Option:

D. Add few-shot examples showing two or three complete input-output pairs with standardized material-description formats.
This is the most effective approach because examples teach the model the specific formatting and normalization conventions you expect. By showing standardized outputs (e.g., always "Cotton/Polyester" instead of "Cotton/Polyester mix"), you provide concrete patterns that the model can generalize to new inputs. Few-shot examples are particularly effective for formatting consistency because they demonstrate the desired level of detail, terminology normalization, and field presence rules in context.

Incorrect Options:

A. Set the temperature to 0 to eliminate randomness and ensure deterministic outputs.
While temperature 0 reduces randomness, it does not address the underlying ambiguity about what constitutes a correctly formatted material description. The model may still produce variations like "cotton blend" vs. "Cotton blend" or omit the field entirely, as the core issue is normalization and standardization, not stochastic variation. Temperature controls creativity, not formatting consistency when the expected format is underspecified.

B. Switch to a more capable model tier because inconsistent extraction indicates insufficient model capability.
This is an expensive assumption. Formatting consistency is not primarily a capability issue—even the most capable models need clear guidance on formatting conventions. A less capable model with good examples can outperform a more capable model with ambiguous instructions. Upgrading models without addressing prompt design is unlikely to resolve the inconsistency and increases operational costs.

C. Make the materials field required instead of optional in the schema to force the model to always extract a value.
Making the field required does not address the formatting inconsistency—the model may still extract different formats or populate the field with incorrect or partially extracted information. This approach could actually increase errors by forcing extraction in ambiguous cases, leading to hallucinated or inaccurate material descriptions rather than consistent, accurate ones.

Reference:

Anthropic Prompt Engineering Best Practices – Recommends using few-shot examples to teach formatting conventions, normalization rules, and output structure, especially for extraction and structured output tasks.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of standardization and consistency in data extraction processes to support downstream integration and ongoing monitoring.

JSON Schema Best Practices – Suggests that schema validation ensures structure but does not enforce content normalization; additional guidance (examples, rules) is needed for consistent formatting of field values.
Question 17 Choose 1
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.

After implementing tool use with strict schema definitions, JSON syntax errors are eliminated, but 5% of extractions still contain empty arrays or null values for required fields such as citations and methodology. Spot-checking reveals that the source documents contain this information, but in varied formats—inline citations versus bibliographies, and methodology sections versus details embedded in introductions.

What is the most effective way to address these failures?
Show answerHide answer

Correct answer: B Add few-shot examples demonstrating extractions from documents with varied structures, showing how to identify citations in different formats and locate methodology details across section types.

Explanation

Explanation:
The 5% failure rate occurs because the model lacks exposure to the full variety of document structures where required information can appear. While strict schemas enforce output structure, they do not teach the model how to locate information when it appears in non-standard formats or sections. The solution must provide examples that demonstrate the necessary flexibility in information location.

Correct Option:

B. Add few-shot examples demonstrating extractions from documents with varied structures, showing how to identify citations in different formats and locate methodology details across section types.
This is the most effective approach because it directly addresses the root cause by teaching the model to recognize required information regardless of where or how it appears in the source document. Examples showing citations in inline format, footnotes, and bibliographies, as well as methodology in dedicated sections, introductions, or embedded in other sections, train the model to be flexible in its information location strategy. This improves generalization without requiring brittle regex patterns or post-processing.

Incorrect Options:

A. Implement retry logic that resends requests when validation detects empty required fields.
Retrying without changing the prompt or providing additional guidance is unlikely to succeed. The model will make the same errors repeatedly because it lacks the knowledge of where to find the information in varied document structures. Retry logic simply wastes tokens and increases latency without addressing the underlying pattern recognition failure.

C. Build a regex-based post-processing layer that scans source documents for citation patterns and methodology keywords, populating empty fields when the model fails to extract them.
Regex-based extraction is brittle and cannot handle the wide variety of citation formats and methodology presentations found in real-world documents. This approach duplicates the model's task but with less intelligence, and may introduce incorrect or out-of-context data. It also adds significant pipeline complexity and maintenance overhead without improving the model's ability to extract information.

D. Modify the schema to make citations and methodology optional, and flag incomplete records for manual review instead of failing validation.
This accepts the 5% failure rate rather than addressing it, shifting the burden to manual reviewers. Making required fields optional reduces data quality and breaks downstream integration expectations (systems expecting complete records). This approach masks the problem without solving it and increases operational costs through manual review.

Reference:

Anthropic Prompt Engineering Best Practices – Recommends few-shot examples with varied input structures to teach models to handle diverse formats and edge cases.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of robust validation and handling of varied data formats to maintain model accuracy and reliability.

Data Extraction Best Practices – Highlights the need for flexible extraction strategies that can handle varied document structures rather than rigid approaches that assume consistent formatting.
Question 18 Choose 1
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.

After your daily batch of 10,000 documents completes, 300 documents (3%) fail with context_length_exceeded errors. The results file identifies each failure by custom_id.

What is the most cost-effective approach to process these failures?
Show answerHide answer

Correct answer: D Resubmit only the 300 failed documents after chunking them into smaller pieces, and then combine the partial extractions.

Explanation

Explanation:
The 3% failure rate is due to documents exceeding the model's context window. The most cost-effective solution is to process only the failed documents with a chunking strategy. This avoids reprocessing the 9,700 successful documents and addresses the root cause (excessive document length) through segmentation, where each chunk stays within the context limit.

Correct Option:

D. Resubmit only the 300 failed documents after chunking them into smaller pieces, and then combine the partial extractions.
This is the most cost-effective approach because it targets only the 3% of documents that failed, avoiding unnecessary reprocessing costs for the 9,700 successful documents. Chunking directly addresses the context_length_exceeded error by breaking each long document into smaller segments that fit within the context window. While combining partial extractions requires some additional logic, this is a one-time implementation that handles the failure scenario efficiently without recurring cost overhead.

Incorrect Options:

A. Resubmit the entire 10,000-document batch using a model tier with a larger context window.
This is extremely costly and inefficient, as 97% of the documents would be reprocessed unnecessarily. Switching to a more expensive model tier for the entire batch (instead of only the 300 failures) increases costs significantly without providing any benefit for the documents that already succeeded. This approach ignores the cost-efficiency principle of handling only the failures.

B. Reprocess the entire batch with prompt caching enabled to reduce the cost of retrying requests with identical system prompts.
While prompt caching reduces token costs, reprocessing all 10,000 documents still incurs substantial costs and latency for documents that already succeeded. Prompt caching is a general optimization, not a targeted solution for context-length errors. The caching benefit is marginal compared to the cost of reprocessing 9,700 successful documents, making this approach inefficient.

C. Increase the max_tokens parameter for the 300 failed documents and resubmit them in a new batch.
The context_length_exceeded error occurs because the input document exceeds the model's context window, not because the output (max_tokens) is too long. Increasing the max_tokens parameter controls output length, not input capacity. This approach misunderstands the error and would not resolve the failures; the same documents would still exceed the context window on resubmission.

Reference:

Anthropic API Documentation – Error Handling – Clarifies that context_length_exceeded errors indicate the input exceeds the model's context window; the solution is to reduce input length through chunking or truncation.

Anthropic Prompt Engineering Best Practices – Handling Large Documents – Recommends chunking long documents into smaller pieces and combining results for extraction tasks, as this is more cost-effective than upgrading to larger context models for all requests.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of cost-effective risk management and targeted remediation, focusing resources on failures rather than reprocessing successful operations.
Question 19 Choose 1
The automated review consistently flags patterns your team uses intentionally—forceunwrapping optionals in test files, using large coordinator classes that follow your established architecture, and importing internally maintained modules marked as deprecated in the public SDK. Developers are dismissing approximately 30% of all findings as project-specific false positives. Which approach prevents the model from generating these findings in the first place by supplying the project’s conventions as persistent context during every review?
Show answerHide answer

Correct answer: D Document the team’s accepted patterns and intentional conventions in the project’s CLAUDE.md file so the model receives this context during every review.

Explanation

Explanation:
The 30% false positive rate stems from the model lacking awareness of your team's established conventions, architectural patterns, and internal tooling context. The model applies generic best practices without understanding that certain patterns are intentionally accepted in your codebase. The solution must provide project-specific context that overrides generic heuristics for these known acceptable patterns.

Correct Option:

D. Document the team's accepted patterns and intentional conventions in the project's CLAUDE.md file so the model receives this context during every review.
This is the most effective approach because CLAUDE.md provides persistent, project-wide guidance that Claude will reference for every review. By documenting explicit exceptions with contextual explanations (e.g., "force-unwrapping is acceptable in test files because test failures should crash fast and clearly"), you teach the model to recognize and accept these intentional patterns. This eliminates false positives at the source without requiring post-processing or manual filtering, and the guidance applies consistently across all future reviews.

Incorrect Options:

A. Build post-processing keyword filters that suppress findings containing terms such as "force unwrap," "large class," or "deprecated import" before results reach developers.
This is a crude, keyword-based approach that will filter out legitimate findings that happen to mention these terms in other contexts. For example, a genuine bug involving incorrect force-unwrap usage in production code would be incorrectly filtered out. This approach masks the symptom without addressing the model's lack of contextual understanding and risks missing real issues.

B. Configure the review to analyze only the changed lines in the diff without surrounding file context, reducing the amount of code the model evaluates during each review.
This does not address the false positive problem—the model will still flag the same intentional patterns based on the changed lines alone. Reducing context may actually worsen accuracy, as the model will have less information to understand the intent behind patterns. This approach also undermines the review's ability to catch issues that require broader context.

C. Have developers add inline suppression comments at flagged lines and preprocess diffs to exclude suppressed lines before sending code to the model.
This shifts burden to developers to manually annotate every intentional pattern in the codebase, which is unsustainable and defeats the purpose of automation. Developers would need to add suppression comments preemptively or retroactively, creating significant overhead. Preprocessing also risks excluding lines that contain both intentional patterns and genuine issues in adjacent code.

Reference:

Anthropic Claude Documentation – CLAUDE.md Best Practices – Recommends documenting project-specific conventions, exceptions, and context to guide Claude's behavior and reduce false positives in code review.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of context-aware model validation and the need to incorporate domain-specific knowledge to reduce false positives and improve output reliability.

Google's Code Review Guidelines – Highlights that effective code reviews should be context-aware, respecting team conventions and established architectural patterns rather than applying generic rules uniformly.
Question 20 Choose 1
You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution.

Your team wants Claude to follow a detailed code review checklist (8 items covering API changes, test coverage, documentation, security, etc.) when reviewing pull requests. The team also uses Claude extensively for other tasks: writing new features, debugging production issues, and generating documentation. Currently, developers paste the checklist at the start of each review session.

Which approach best addresses this workflow need?
Show answerHide answer

Correct answer: A Create a /review slash command containing the checklist, invoked when starting reviews.

Explanation

Explanation:
The team needs an efficient way to apply the checklist consistently during reviews while avoiding manual repetition. The solution should make the checklist easily accessible for review sessions without interfering with other tasks like feature development or debugging. The approach should also support the team's existing workflow of using Claude for multiple purposes.

Correct Option:

A. Create a /review slash command containing the checklist, invoked when starting reviews.
This is the most effective approach because slash commands provide an on-demand, task-specific activation mechanism. Developers can simply type /review to trigger the checklist workflow, making it easy and consistent to apply during review sessions. The slash command encapsulates the checklist so it doesn't interfere with other use cases like debugging or feature development. This maintains the team's existing workflow while streamlining the review process.

Incorrect Options:

B. Create a dedicated review subagent with the checklist embedded in its configuration.
While a dedicated subagent could work, it adds unnecessary architectural complexity for what is essentially a prompt-engineering need. Subagents are better suited for tasks that require specialized tool access or isolation from the main agent's context. The checklist alone does not require a separate subagent—a slash command or CLAUDE.md section would be simpler and more maintainable. This approach over-architects the solution.

C. Add the checklist to the project's CLAUDE.md file under a "Code Review" section.
CLAUDE.md provides persistent context across all interactions, which means the checklist would be included even when developers are using Claude for debugging or feature development (tasks where the checklist is irrelevant). This would consume context window space unnecessarily and could distract the model during unrelated tasks. The checklist should be applied only during reviews, not universally across all use cases.

D. Configure plan mode as the default for code review sessions.
Plan mode controls whether Claude executes actions directly or proposes a plan first—it does not address the need to apply a specific checklist during reviews. This approach misunderstands the purpose of plan mode and would not help the team consistently apply the 8-item checklist. Plan mode is orthogonal to the checklist delivery mechanism.

Reference:

Anthropic Claude Code Documentation – Custom Slash Commands – Recommends using slash commands to encapsulate task-specific instructions, making them easily invocable and reusable without affecting other use cases.

Anthropic CLAUDE.md Documentation – Advises using CLAUDE.md for universal, always-applied context rather than task-specific instructions that should only apply in certain scenarios.

Software Engineering Workflow Best Practices – Emphasizes task-specific automation that integrates seamlessly into existing workflows without interfering with other tasks or adding unnecessary complexity.
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