Weekend Special - 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: newyear

Anthropic CCAR-F - Claude Certified Architect – Foundations

Page: 3 / 5
Total 152 questions

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?

A.

Interleave the implementation and tests in the prompt, presenting each function immediately before its test cases.

B.

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

C.

Implement a two-pass pipeline in which one model call extracts all conditional branches and another cross-references them against test assertions.

D.

Include few-shot examples showing code with an uncovered branch and the corresponding review comment identifying the missing test case.

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 the agent to find all callers of a function before removing it. The function is defined in a core library but is also exposed through wrapper modules that rename the function for domain-specific use (e.g., calculateTax in the library becomes computeOrderTax in the orders module).

What exploration strategy will most reliably identify all callers?

A.

Use Grep to find all files that import from the library or wrapper modules, then read each file to check whether it uses the function.

B.

Use Grep to search for the function’s original name across the codebase.

C.

Read the library and wrapper modules to identify all exposed names for the function, then Grep for each name across the codebase.

D.

Search for the function name in project documentation to understand intended usage patterns and navigate to documented integration points.

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.

1.5An engineer asks the agent to understand how the caching layer works before adding a new cache invalidation trigger. After initial Grep searches, the agent has identified that caching logic spans 15 files including decorators, middleware, and service classes (~6,000 lines total).

What’s the most effective next step for building understanding while managing context constraints?

A.

Use Grep to search for “invalidate” and “expire” patterns across all files, then Read only those specific line ranges with minimal surrounding context.

B.

Use the Read tool to sequentially load all 15 files, building complete understanding across the full caching implementation.

C.

Use Glob to find files matching common caching patterns ( cache*.py , caching/ ), prioritize the largest files by reading them first, then check smaller files for gaps.

D.

Analyze imports and class hierarchies to identify the base cache class. Read that file to understand the interface, then trace specific invalidation implementations.

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.

Your process_refund tool returns two types of errors: technical errors (“503 Service Unavailable”, “Connection timeout”) that are transient (~5% of calls), and business errors (“Order exceeds 30-day return window”, “Item already refunded”) that are permanent (~12% of calls). Monitoring shows the agent wastes 3–4 turns retrying business errors that can never succeed. Currently, both error types return only a plain text message to Claude.

What’s the most effective way to reduce wasted retries while improving customer-facing response quality?

A.

Implement automatic retry logic at the tool layer for technical errors only, passing business errors to Claude without retries.

B.

Add few-shot examples showing how to distinguish retriable from non-retriable errors by parsing error message text.

C.

Add a check_refund_eligibility tool that must be called before process_refund to prevent business rule violations.

D.

Return structured error responses with " retriable " : false for business errors and a customer-friendly explanation for Claude to use.

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?

A.

Use @ references to include the three modules directly in your prompt, giving Claude concrete code examples of the patterns to follow.

B.

Add documentation of each pattern to your CLAUDE.md file, establishing them as project conventions that Claude will apply automatically.

C.

Describe the patterns from the three modules in natural language in your prompt, explaining the transaction handling approach, error format, and logging conventions Claude should follow.

D.

Ask Claude to explore your codebase to find and understand the transaction, error handling, and logging patterns before generating the new module.

After the web-search agent finds 25 sources containing 120,000 tokens of raw content, the document-analysis agent extracts 15,000 tokens of key insights, and the synthesis agent produces a coherent 3,000-token narrative draft, the coordinator must pass context to the report-generation agent for the final output with proper source citations. What context-passing strategy provides the best balance of completeness and efficiency?

A.

Pass a condensed summary of all prior stages that preserves the main findings and attributes them to sources by name only.

B.

Pass the synthesis draft together with a structured source index that maps key claims to their source URLs and relevant excerpts.

C.

Pass only the synthesis draft and use a separate post-processing pipeline to match claims to sources and insert citations after report generation.

D.

Pass the complete accumulated context from all prior agents.

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 pipeline occasionally receives responses that cannot be parsed as valid JSON, causing downstream processing failures. The current implementation prompts Claude to return JSON in the response text and then parses it.

What is the most reliable approach to ensure Claude returns valid, schema-compliant structured data?

A.

Add explicit formatting instructions to the prompt with JSON examples, emphasizing that Claude must return only valid JSON with no surrounding text.

B.

Use regular expressions to locate and extract JSON from the response text, handling cases where Claude includes explanatory text around the JSON block.

C.

Define a tool with a JSON schema specifying the expected structure, using tool use to constrain Claude’s output to schema-compliant JSON.

D.

Implement a retry loop that catches JSON parsing errors and re-prompts Claude with the error details, asking it to correct the malformed output.

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 code review is missing genuine bugs in pull requests. Investigation reveals that your review prompt includes the instruction: “Only flag critical issues that would definitely cause production failures. Ignore minor concerns and anything you are uncertain about.” Developers confirm that some missed bugs are genuine logic errors that the model investigated but chose not to report. The team requires the review output to remain structured, with each finding tagged with metadata, and actionable.

Which prompt change both removes the cause of the suppressed findings and preserves structured, tagged output for downstream filtering?

A.

Add a second review pass that rereads the diff using the same prompt, looking for anything the first pass may have missed.

B.

Instruct the model to report all findings with confidence and severity tags, deferring filtering to a downstream step.

C.

Remove all severity-related instructions from the prompt and let the model use its default judgment about what to report.

D.

Enable extended thinking and instruct the model to reason step by step about every code change before producing its review.

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?

A.

Set the temperature to 0 to eliminate randomness and ensure deterministic outputs.

B.

Switch to a more capable model tier because inconsistent extraction indicates insufficient model capability.

C.

Make the materials field required instead of optional in the schema to force the model to always extract a value.

D.

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

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?

A.

Use direct execution to implement polling first, then evaluate whether to upgrade to WebSockets later.

B.

Use direct execution with a prompt asking Claude to analyze all approaches and implement the one it determines is best.

C.

Enter plan mode to explore the architecture, evaluate trade-offs, and present options for team approval before implementing.

D.

Start direct execution with WebSockets, then refactor if infrastructure issues arise.