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

Anthropic CCAR-F - Claude Certified Architect – Foundations

Page: 2 / 5
Total 152 questions

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?

A.

Upgrade to a more capable model tier with improved instruction-following to reduce hallucination tendencies.

B.

Make all schema fields required (non-nullable) with strict validation rules to ensure the model only outputs verifiable data.

C.

Add prompt instructions to return null for any field where information is not directly stated in the source.

D.

Add a post-processing step using a second LLM call to verify each extracted value exists in the source document.

You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.

After the web-search and document-analysis subagents complete their tasks, the coordinator needs to spawn the synthesis subagent to synthesize the findings.

What is the correct approach for providing the synthesis subagent with the information it needs?

A.

Provide the subagent with tool definitions that allow it to request outputs from other subagents through callbacks.

B.

Include the complete findings from both subagents directly in the synthesis subagent’s prompt.

C.

Spawn the subagent with only a brief task description, relying on automatic context inheritance from the coordinator.

D.

Pass reference identifiers and configure the subagent with read access to a shared memory store where the other subagents deposited their results.

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 pipeline runs:

PROMPT= ' You are a code reviewer. Analyze the provided diff for bugs, security issues, and style violations. '

claude -p \

--dangerously-skip-permissions \

--system-prompt " $PROMPT " \

< diff.txt

The reviews complete and return feedback, but Claude only comments on the piped diff text—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 inspect related repository files while still applying your custom review instructions?

A.

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

B.

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

C.

Stop piping the diff through standard input and embed it inside the prompt, so Claude Code treats the invocation as an agentic session.

D.

Replace --system-prompt with --append-system-prompt and explicitly instruct Claude to inspect related repository files whenever broader context is needed.

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.

When the agent calls lookup_order and receives order details showing the item was purchased 45 days ago, how does the agentic loop determine whether to call process_refund or escalate_to_human next?

A.

The order details are added to the conversation and the model reasons about which action to take.

B.

The orchestration layer automatically routes to the next tool based on the order’s status field.

C.

The agent follows a pre-configured decision tree mapping order attributes to specific tool calls.

D.

The agent executes the remaining steps in a tool sequence planned at the start of the request.

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.

Your agent has analyzed a complex service module—reading 23 source files, tracing request flows, and identifying error handling patterns. A developer wants to compare two testing strategies before committing to one: end-to-end tests with mocked external services vs. snapshot tests capturing expected outputs. They need to independently develop both approaches to evaluate trade-offs.

How should you manage the sessions?

A.

Resume the analysis session with fork_session enabled, creating a separate branch for each testing strategy.

B.

Start two fresh sessions, having each re-read the relevant source files before beginning.

C.

Continue in the original session, developing end-to-end tests first, then snapshot tests sequentially.

D.

Export the analysis session’s key findings to a file, then create two new sessions that reference this file.

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.

You are building a security-scanning workflow.

When engineers need to locate every occurrence of a dangerous function such as eval() across a large codebase, which tool should the agent use for content searching?

A.

Use Glob with a pattern such as **/eval* to locate files, and then read each matching file.

B.

Use Grep to search for the regular-expression pattern eval\( across all files in the codebase.

C.

Read the project’s main entry file and follow import statements to trace where eval() might be used.

D.

Use Bash to run ls -R | grep eval and search the recursively listed filenames.

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?

A.

Resubmit the entire 10,000-document batch using a model tier with a larger context window.

B.

Reprocess the entire batch with prompt caching enabled to reduce the cost of retrying requests with identical system prompts.

C.

Increase the max_tokens parameter for the 300 failed documents and resubmit them in a new batch.

D.

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

The document-analysis agent has a single analyze_document tool that accepts a document and a free-text instruction parameter. During evaluation, requests such as “extract the key financial metrics” often return narrative summaries, while “summarize the methodology” sometimes returns raw data tables. The synthesis agent reports that 35% of analysis results require new requests with clarified instructions. What is the most effective way to improve reliability?

A.

Split the generic tool into purpose-specific tools—extract_data_points, summarize_content, and verify_claim_against_source—each with defined input and output contracts.

B.

Retain the single tool but add an analysis_type enum requiring explicit selection among extraction, summarization, and verification modes.

C.

Have the coordinator preclassify each analysis request before passing instructions to the document-analysis agent.

D.

Enhance the tool description with detailed examples showing how different instruction phrasings should map to different output formats.

You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.

The coordinator agent has AgentDefinition objects configured for all four specialized subagents, each with appropriate descriptions, prompts, and tool restrictions. During testing, you notice that the coordinator correctly reasons about when to delegate—it generates messages such as, “I’ll ask the web-search agent to find sources on this topic”—but no subagent execution ever occurs. The coordinator then proceeds as if the delegation happened and continues with incomplete information. Logs show no errors.

What is the most likely cause?

A.

The AgentDefinition objects are configured correctly, but the coordinator’s system prompt does not explicitly list the available subagent types, preventing the model from knowing that they can be invoked.

B.

Subagent context isolation means task descriptions from the coordinator do not automatically reach subagents; you must configure explicit context forwarding in ClaudeAgentOptions.

C.

The coordinator’s allowedTools configuration does not include Agent—formerly named Task—so it cannot invoke the tool required to spawn subagents.

D.

The coordinator’s max_tokens setting is too low, causing the subagent tool invocation to be truncated before the subagent type can be specified.

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.

During testing, you find that when a customer says “I need a refund for my recent purchase,” the agent calls process_refund immediately—but populates the required order_id parameter with a plausible-looking but fabricated value instead of first calling lookup_order to retrieve the actual order ID. The refund call fails because the fabricated ID doesn’t exist.

Which change directly addresses the root cause of the agent fabricating the order_id value?

A.

Update the process_refund tool description to explicitly state that order_id must be obtained from a prior lookup_order call and must never be assumed or invented.

B.

Switch tool_choice from " auto " to " any " to force the agent to make a tool call on every turn.

C.

Add server-side validation that checks whether the order_id exists in your database before executing the refund, returning an error to the agent if not found.

D.

Pre-parse incoming customer messages to extract any order IDs mentioned, and inject them into the conversation context before passing to Claude.