Exclusive Black Friday Deal: 75% Off All Exam Bundles! Use coupon code below to unlock your savings! - Ends in 0d 00h 00m 00s - Coupon code: e4s75best

Free Claude Certified Architect – Foundations Practice Questions

Question # 31

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 pipeline occasionally receives responses that don't parse 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?

Options:

A.  

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

B.  

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

C.  

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

D.  

Define the expected structure as a JSON schema and provide it in output_config.format so the API constrains Claude's output to that structure.

Discussion 0
Question # 32

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.

In production, you observe that simple fact-checking queries, such as “In what year was the Paris Climate Agreement signed?”, traverse all four subagents sequentially, consuming more than 40 seconds and significant tokens per query. Complex comparative research benefits from the complete pipeline. Your query distribution is diverse and continues to evolve as users discover new applications.

What is the most effective approach to optimize for varying query complexity?

Options:

A.  

Create a fast path for factual questions that bypasses subagents entirely, routing every other query through the complete pipeline.

B.  

Train a query-complexity classifier using labeled historical data to predict the optimal subagent combination, retraining it periodically.

C.  

Implement pattern-based routing that classifies queries as single-fact, comparative, or analytical and maps each category to a predefined subagent combination.

D.  

Have the coordinator analyze each query and dynamically determine which subagents are required.

Discussion 0
Question # 33

A customer sends: “This is frustrating. I’ve explained my issue twice and nothing is being resolved. I want to talk to a real person NOW.” The agent has not yet called any tools to investigate the customer’s account. What should the agent do?

Options:

A.  

Briefly explain what the agent can help with and offer to resolve the issue quickly, escalating only if the customer repeats the request.

B.  

First call get_customer and lookup_order to gather account context, and then escalate to a human agent.

C.  

Immediately call escalate_to_human with the conversation history.

D.  

Acknowledge the frustration and ask one targeted question to understand the specific issue before escalating.

Discussion 0
Question # 34

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?

Options:

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.

Discussion 0
Question # 35

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?

Options:

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.

Discussion 0
Question # 36

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 review calls the Claude API for each pull request, using tool_use with a report_findings tool that returns a JSON array of finding objects. Each object contains file_path, line_number, severity, category, and description. During testing on a large pull request touching more than 30 files, the response reaches the max_tokens limit and is truncated in the middle of the JSON, causing your pipeline’s parser to fail.

What is the most effective way to handle this?

Options:

A.  

Split the review into multiple API calls that each analyze a subset of the changed files, and then merge the resulting findings arrays.

B.  

Increase max_tokens to the model’s maximum and instruct Claude to keep each finding description under 50 words.

C.  

Switch from tool_use to prompting Claude to return findings as a Markdown list.

D.  

Add retry logic that detects truncated JSON and resends the request with instructions to report only critical and high-severity findings.

Discussion 0
Question # 37

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 used Claude Code yesterday to investigate authentication flows in a legacy monolith, building up significant context over a 2-hour session. Today she wants to continue that specific investigation. She’s worked on three other codebases since then and knows the session was named “auth-deep-dive”.

How should she resume?

Options:

A.  

Use --session-id with the UUID from yesterday’s session transcript file

B.  

Use --continue to pick up where the most recent conversation left off

C.  

Start fresh and re-read the same files

D.  

Use --resume auth-deep-dive to load that specific session by name

Discussion 0
Question # 38

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.

After deploying automated code review, developers report that approximately 35% of findings are false positives following consistent patterns: style suggestions that contradict team conventions, security warnings for patterns that are safe in the deployment environment, and performance suggestions that would degrade this particular use case.

You want to reduce false positives while enabling the model to generalize its judgment to novel code patterns it has not seen before.

Which approach is most effective?

Options:

A.  

Create a comprehensive specification of every pattern that must not be flagged and include the complete document in the system prompt.

B.  

Include few-shot examples containing annotated code snippets that distinguish acceptable project patterns from genuine issues in each category.

C.  

Use keyword-based post-processing to remove findings containing terms such as “convention,” “context-dependent,” or “trade-off.”

D.  

Add general instructions telling Claude to be conservative and report only definite issues.

Discussion 0
Question # 39

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 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?

Options:

A.  

The AgentDefinition objects are configured correctly, but the coordinator’s system prompt does not explicitly list the available subagent types.

B.  

The coordinator’s allowedTools configuration does not include "Agent"—called "Task" in older SDK releases—so it cannot invoke the tool required to spawn subagents.

C.  

Subagent context isolation prevents task descriptions from reaching subagents unless explicit context forwarding is configured in ClaudeAgentOptions.

D.  

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

Discussion 0
Question # 40

In production, you observe that simple fact-checking queries—for example, “What year was the Paris Climate Agreement signed?”—traverse all four subagents sequentially, consuming more than 40 seconds and significant tokens per query. Complex comparative research benefits from the full pipeline. Your query distribution is diverse and evolving as users discover new applications. What is the most effective approach to optimize for varying query complexity?

Options:

A.  

Create a fast path for factual questions that bypasses subagents entirely, routing all other queries through the complete pipeline to ensure research thoroughness.

B.  

Train a query-complexity classifier on labeled historical data to predict optimal subagent combinations, retraining it periodically as query patterns evolve.

C.  

Have the coordinator analyze each query and dynamically decide which subagents to invoke based on its assessment of the query requirements.

D.  

Implement pattern-based routing that categorizes queries by structure—single-fact, comparative, or analytical—and maps each category to a predefined subagent combination.

Discussion 0

CCAR-F PDF

CCAR-F PDF (Printable)
$41.25
$164.99

CCAR-F Testing Engine

CCAR-F PDF (Printable)
$45
$179.99

CCAR-F PDF + Testing Engine

CCAR-F PDF (Printable)
$55.75
$222.99

Free Exams Sample Questions