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

Anthropic CCAR-F - Claude Certified Architect – Foundations

Page: 5 / 5
Total 152 questions

During testing, when a customer says, “I need a refund for my recent purchase,” the agent immediately invokes process_refund but populates the required order_id parameter with a plausible-looking fabricated value instead of first calling lookup_order. The refund fails because the invented order identifier does not exist. Which change directly addresses the root cause of the fabricated order_id?

A.

Update the process_refund tool description to state explicitly that order_id must come from a successful lookup_order result and must never be assumed, inferred, or invented.

B.

Change tool_choice from auto to any so Claude must call a tool on every turn.

C.

Add server-side validation that checks whether order_id exists before attempting the refund and returns an error when it does not.

D.

Preprocess customer messages to extract any mentioned order identifiers and inject them into the conversation before sending the request to Claude.

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 deployment, you find that 12% of extractions contain semantic errors that pass JSON Schema validation—for example, a duration such as “30 minutes” is incorrectly placed in an ingredient-quantity field. Human reviewers have the capacity to check only 20% of extractions.

Which approach most effectively allocates reviewer attention?

A.

Have the model output field-level confidence scores, and then calibrate review thresholds using a labeled validation set.

B.

Review all extractions from documents with formatting anomalies, such as unusual layouts or mixed content types.

C.

Randomly sample 20% of extractions for review, using corrections to track accuracy and identify error patterns.

D.

Prioritize the review of all extractions where required fields are empty or explicitly marked as not found.

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.

In addition to your CI pipeline, your organization has enabled Claude’s managed Code Review through the Claude GitHub App on this repository, and reviews run automatically on every pull request. Reviews average 18 findings per pull request. Developer feedback reveals three categories of unwanted noise: (1) style and formatting issues already enforced by your linter in CI, (2) findings on automatically generated template code under src/gen/, and (3) rendering-helper patterns that are intentional project conventions but get flagged because they resemble common anti-patterns. Only approximately four findings per pull request are genuine logic bugs.

What is the most effective way to reduce this noise while preserving the detection of genuine issues?

A.

Create a REVIEW.md file at the repository root containing skip rules for CI-enforced checks and generated files, together with a verification requirement that rendering-related findings cite a specific line demonstrating incorrect behavior.

B.

Add custom review instructions to a GitHub Actions workflow file, using the action’s prompt parameter to suppress duplicate lint findings, ignore generated template code, and apply stricter evidence requirements to rendering-related issues.

C.

Add detailed explanations to the project’s CLAUDE.md describing which patterns are intentional, that linting is handled separately by CI, and that the src/gen/ directory contains automatically generated template code.

Your pipeline runs:

PROMPT= " You are a code reviewer. "

PROMPT= " $PROMPT Analyze the provided diff "

PROMPT= " $PROMPT for bugs, security issues, "

PROMPT= " $PROMPT and style violations. "

claude -p \

--dangerously-skip-permissions \

--system-prompt " $PROMPT " < diff.txt

The reviews complete and return feedback, but Claude comments only on the piped diff—it never reads surrounding files in the checked-out repository to understand broader context, even when the diff modifies a function called by many other modules. Which change to the invocation will cause Claude to read related repository files while still applying your custom review instructions?

A.

Keep --system-prompt and add --allowedTools " Read, Glob, Grep " because non-interactive -p mode otherwise disables filesystem tools.

B.

Replace --system-prompt with --append-system-prompt so the review instructions are added to Claude Code’s default prompt instead of overwriting its built-in file-reading and code-navigation guidance.

C.

Remove --system-prompt entirely and place the review instructions in a root-level CLAUDE.md because --system-prompt is incompatible with tool use under -p.

D.

Stop piping the diff through standard input and embed it in the prompt string so Claude Code treats the invocation as an agentic session rather than a stream-processing operation.

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, and Glob—and integrates with Model Context Protocol (MCP) servers.

An engineer asks the agent to understand how the caching layer works before adding a new cache-invalidation trigger. Initial Grep searches show that caching logic spans 15 files containing decorators, middleware, and service classes—approximately 8,000 lines in total.

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

A.

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

B.

Use Glob to find files matching common caching patterns such as *cache*.py or caching/ , read the largest files first, and inspect smaller files afterward.

C.

Use Read to load all 15 files sequentially and build a complete understanding of the caching implementation.

D.

Use Grep to search for invalidate and expire , and then read only the matching line ranges with minimal surrounding context.