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 system implements automatic retries when validation fails. On each retry, the specific validation error is appended to the prompt. This retry-with-error-feedback approach resolves most failures within 2-3 attempts. For which failure pattern would additional retries be LEAST effective?
Correct Answer: B
Retry-with-error-feedback is effective when the required information is available and the defect concerns representation. Options A, C, and D are correctable formatting failures: the model can flatten an object into an array, remove thousands separators and emit an integer, or convert a datetime into the required date-only format. The validation message supplies enough information to revise the output. Option B is fundamentally different. The complete co-author list is absent from the model's input and exists only in an external document. No number of retries can recover evidence that was never supplied. Repeated attempts may instead increase the probability of fabrication. Anthropic's hallucination guidance recommends restricting responses to available documents, allowing the model to acknowledge missing information, and withholding or retracting claims that cannot be grounded in the source. ( https://docs.anthropic.com/en/docs /test-and-evaluate/strengthen-guardrails/reduce-hallucinations ) The correct response is therefore to return an explicit missing-data state, retrieve the external document through a tool, or route the record for enrichment. Retrying without changing the information boundary cannot solve the problem. Current Anthropic Structured Outputs can eliminate many shape-related failures by guaranteeing JSON Schema conformance, but they still cannot create unavailable source facts. ( https://platform.claude.com/docs /en/build-with-claude/structured-outputs ) This distinction-format failure versus evidence failure-is central to reliable extraction architecture. Official references/topics: Retry Boundaries; Missing Context; Grounded Extraction; Structured Outputs; External Data Retrieval.
CCAR-F Exam Question 17
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. You're implementing a new payment processing module that must follow your project's established patterns for database transactions, error handling, and audit logging. You've identified three existing modules that exemplify these patterns: db_utils.py , error_handlers.py , and audit_logger.py . This is a one-off integration task-these patterns are well-documented in your team wiki and don't need additional project-level documentation. What's the most effective approach?
Correct Answer: A
Direct @ references provide Claude with the exact implementations it must imitate. Anthropic documents that referencing a file with @ includes the full file content in the conversation, and multiple files can be referenced in one message. This gives Claude immediate access to the real transaction boundaries, exception structures, audit fields, naming conventions, and helper APIs used by the project. ( https://code.claude.com/docs/en /common-workflows ) Option B is inappropriate because the task is explicitly one-off and the conventions are already documented elsewhere. CLAUDE.md is loaded into every session and should contain concise information that broadly applies to the project. Adding detailed implementation material for a single integration would consume context unnecessarily. Anthropic recommends moving occasional procedures to skills and keeping CLAUDE. md limited to persistent, widely applicable guidance. ( https://code.claude.com/docs/en/memory ) Option C loses precision because a natural-language summary may omit subtle but important code behavior. Option D asks Claude to rediscover files that have already been identified, increasing exploration time and context usage. The most effective prompt should reference all three modules, identify which pattern each demonstrates, specify the new module's required behavior, and request focused tests proving that the established conventions were followed. Official references/topics: @ file references, rich prompt context, CLAUDE.md scope, pattern-based implementation.
CCAR-F Exam Question 18
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 add comprehensive tests to a legacy codebase with 200 files and minimal existing test coverage. The engineer hasn't specified which modules to prioritize. How should the agent decompose this open-ended task?
Correct Answer: B
The task is open-ended because neither the critical modules nor the required testing sequence is known in advance. The agent should first use lightweight discovery tools to map the repository, locate existing tests, identify central modules, and determine which components have high fan-in, business significance, complex branching, or extensive external dependencies. It can then produce an initial risk-based testing plan and refine it as new dependency information appears. Anthropic distinguishes predefined workflows from agents that dynamically control their processes and tool usage. Agents are appropriate when the required steps cannot be reliably hardcoded and must adapt to environmental evidence. During execution, they should obtain ground truth through tool results and use that feedback to determine subsequent actions. ( https://www.anthropic.com/research/building-effective-agents ) Anthropic also identifies orchestrator-worker designs as suitable for complex coding and search tasks where the necessary subtasks depend on what the investigation reveals. ( https://www.anthropic.com/research /building-effective-agents ) Option A assigns effort using directory boundaries rather than risk. Option C exhausts context before delivering value. Option D uses alphabetical order, which has no relationship to impact or coverage priority. Option B establishes an evidence-driven decomposition: discover, prioritize, test high-impact paths, measure results, and revise the plan as dependencies and uncovered risks emerge. Official references/topics: Dynamic Task Decomposition; Adaptive Agent Loops; Orchestrator-Workers; Risk-Based Test Planning.
CCAR-F Exam Question 19
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. You're tasked with adding real-time updates to the application. This could be implemented using WebSockets, Server-Sent Events, or polling, each with different complexity, browser support, and infrastructure requirements. What's the most effective way to begin this task?
Correct Answer: C
The implementation approach is unresolved and carries architectural consequences. WebSockets, Server-Sent Events, and polling differ in connection lifecycle, bidirectional communication, proxy compatibility, scaling requirements, deployment topology, reconnection behavior, and operational complexity. Claude should therefore inspect the existing application and infrastructure before modifying code. Anthropic recommends separating exploration and planning from implementation when the approach is uncertain, the work affects multiple files, or the developer is unfamiliar with the relevant architecture. In plan mode, Claude can read files and analyze the system without making changes, produce a detailed proposal, and allow the developer or team to review the plan before execution. ( https://code.claude.com/docs/en/best- practices ) Option A commits to polling before determining whether its latency and load characteristics meet the requirement. Option B delegates a consequential architectural decision and immediate implementation to a single execution step without a review checkpoint. Option D prematurely selects the most infrastructure- sensitive option and assumes later refactoring will be inexpensive. Option C creates the correct sequence: examine the frontend and backend architecture, document requirements, compare alternatives, identify infrastructure constraints, obtain approval, and only then implement the selected design with appropriate tests and observability. Official references/topics: Plan mode, explore-plan-implement workflow, architectural trade-off analysis, review checkpoints.
CCAR-F Exam Question 20
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 system extracts event metadata (date, location, organizer, attendee_count) from news articles using a JSON schema with all nullable fields. During evaluation, you observe the model frequently generates plausible but incorrect values for fields not mentioned in the article-for example, outputting "500" for attendee_count when the source contains no attendance information. What's the most effective way to reduce these false extractions?
Correct Answer: C
The schema already supports the correct representation of missing evidence: null . The remaining defect is behavioral. Claude must be explicitly instructed that absence of information is a valid outcome and that values may be populated only when directly supported by the supplied article. Anthropic's hallucination-reduction guidance recommends explicitly permitting Claude to express uncertainty, grounding outputs in the source, and retracting claims that lack supporting evidence. It also recommends restricting the model to the provided documents rather than allowing unsupported external knowledge. ( https://docs.anthropic.com/en/docs/test-and-evaluate/strengthen-guardrails/reduce-hallucinations ) Option C translates those controls directly into the extraction contract: when no source evidence exists, the model returns null . Option A may improve baseline performance but does not remove the architectural ambiguity that encourages completion of missing fields. Option B is counterproductive because non-nullable required fields force the model to provide values even when the article contains none. Structured validation would confirm that the response is syntactically valid while accepting fabricated content. Option D adds cost, latency, and another probabilistic model decision; a second model can repeat or endorse the original hallucination. A robust implementation should supplement the instruction with source spans or quotations for populated fields and automated checks where feasible. Nevertheless, among the options, explicit null behavior is the direct and most effective correction. Official references/topics: Reduce Hallucinations; External-Knowledge Restriction; Nullable JSON Schema Fields; Grounded Extraction.