Summer Sale Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

Anthropic CCAR-F Claude Certified Architect – Foundations Exam Practice Test

Page: 1 / 15
Total 152 questions

Claude Certified Architect – Foundations Questions and Answers

Question 1

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.

Question 2

The coordinator provides detailed step-by-step instructions to the web-search subagent, specifying exact search queries, source priorities, and date filters. Production monitoring reveals three issues: (1) the subagent reports “insufficient results” instead of trying alternative approaches when the specified searches fail, (2) research quality drops for emerging topics that do not match expected patterns, and (3) the subagent rarely surfaces valuable tangential sources. What is the most effective way to improve subagent adaptability?

Options:

A.

Specify research objectives and quality criteria—such as coverage breadth, source diversity, and recency—rather than prescribing procedural steps, allowing the subagent to determine its search strategy.

B.

Remove procedural details entirely and delegate using simple goals such as “research this topic thoroughly,” relying on the subagent’s general capabilities.

C.

Add fallback directives requiring alternative query formulations whenever the specified searches produce fewer than a predetermined number of results.

D.

Classify each topic as either “well-defined” or “exploratory” and use a different instruction style for each category.

Question 3

After deploying automated code review, developers report that approximately 35% of flagged findings are false positives falling into consistent patterns: style suggestions contradicting team conventions, security warnings for patterns that are safe in your deployment context, and performance suggestions that would degrade your specific use case. You want to reduce false positives while maintaining the ability to catch genuine issues. Which approach best enables the model to generalize its judgment to novel code patterns it has not seen before?

Options:

A.

Implement post-processing that uses keyword matching to filter out findings containing terms such as “convention,” “context-dependent,” or “trade-off.”

B.

Include few-shot examples in your prompt showing annotated code snippets that distinguish acceptable patterns from genuine issues in each category.

C.

Create a comprehensive written specification of all patterns that should not be flagged, and then include the full documentation in the system prompt.

D.

Add instructions to your system prompt to “be conservative,” “only flag definite issues,” and “consider that some patterns may be intentional.”

Question 4

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.

You’ve configured your Claude agent with three MCP servers: one for git operations, one for Jira ticket management, and one for documentation search.

When a user asks the agent to “create a branch for JIRA-123 and add documentation links to the ticket,” how does the agent access tools across these servers?

Options:

A.

Tools from all configured MCP servers are discovered at connection time and available simultaneously to the agent.

B.

The agent queries each server sequentially to determine which handles each tool, routing calls based on tool name prefixes.

C.

The agent automatically selects the most relevant server based on the request and loads only that server’s tools.

D.

You must specify which MCP server to use for each turn, and the agent can only access one server’s tools at a time.

Question 5

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?

Options:

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.

Question 6

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 find every file in a monorepo that imports the @company/auth package to understand how authentication is used across services.

Which built-in tool is most appropriate for this task?

Options:

A.

Read, beginning with package.json files to trace dependency declarations.

B.

Glob, to find files containing auth in their filename or path.

C.

Grep, to search file contents for the import-statement pattern.

D.

Bash, to execute find . -type d -name " *auth* " and explore matching directories.

Question 7

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 reviewer uses a single prompt covering security issues, API design, and business-logic correctness. Your evaluation suite shows strong recall for API-design findings at 82% but poor recall for business-logic edge cases in quiz scoring at 34%. When you add few-shot examples of logic bugs to the prompt, logic recall improves to 41%, but API-design recall drops to 68%.

How should you address this trade-off to improve detection across both categories?

Options:

A.

Split the review into separate focused prompts—one for security and API design and another for business logic—each with dedicated examples, and then consolidate the findings before posting.

B.

Replace the few-shot examples with a detailed checklist of specific logic edge cases to verify, such as division by zero in score calculations and boundary conditions in grading thresholds.

C.

Upgrade to a more capable model tier because its stronger reasoning will handle both concern types in one prompt and eliminate the recall trade-off.

D.

Provide the full repository as context instead of only the changed files and surrounding code, giving the model deeper visibility into business-logic patterns.

Question 8

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 who recently joined the team asks the agent to explain the authentication and authorization architecture before making security improvements. The codebase contains more than 800 files across multiple services.

What exploration strategy will most effectively build understanding while respecting context limits?

Options:

A.

Launch parallel subagents to explore every service simultaneously, and then synthesize their findings into an architectural overview.

B.

Read all files containing auth , login , permission , or token in their filenames or contents.

C.

Read all CLAUDE.md and README files first, and then ask the engineer to identify the 10–15 most important authentication files.

D.

Use Grep to locate authentication entry points, read those files, and then follow imports and function calls incrementally to map the authentication flow.

Question 9

Production reviews reveal inconsistent handling of uncertainty in final reports. Sometimes conflicting subagent findings are synthesized into a single confident statement, losing important nuance, while other reports over-hedge with excessive qualifications and become unhelpful. The web-search agent returns, “Industry analysts estimate a $50 billion market size, although methodologies vary.” The document-analysis agent returns, “A peer-reviewed study estimates $35 billion, with a ±$7 billion 95% confidence interval.” The coordinator either selects one estimate arbitrarily or produces a vague $35–$50 billion range. What systematic approach best addresses this?

Options:

A.

Instruct the synthesis agent to structure reports with explicit sections distinguishing well-established findings from contested findings while preserving each source’s characterization and methodological context.

B.

Add a verification subagent that passes only claims corroborated by at least two independent sources to synthesis.

C.

Normalize every subagent’s uncertainty statements to probability scores between 0.0 and 1.0, then calculate a confidence-weighted average.

D.

Configure subagents to report only findings that meet a high-confidence threshold.

Question 10

A user expands the research system beyond its original web-search agent by adding specialized data sources. A financial API agent returns structured JSON containing revenue, margins, and growth rates. A news-monitoring agent returns prose summaries of recent developments. A patent-analysis agent returns structured lists of technology areas. The synthesis agent combines these results into executive briefings. Currently, it converts everything into bullet points, causing financial comparisons to lose tabular clarity and news summaries to lose their narrative flow. What change would most improve briefing quality?

Options:

A.

Standardize all subagent outputs as prose summaries with inline citations.

B.

Standardize all subagent outputs as JSON containing fields for claim, evidence, source, and confidence.

C.

Update the synthesis agent to render each content type appropriately—financial data as tables, news as prose, and technology areas as structured lists.

D.

Add a format-conversion layer that transforms every subagent result into a common intermediate representation before synthesis.

Question 11

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.

Engineers frequently ask the agent to cross-reference code changes with Jira tickets during reviews—checking ticket descriptions, acceptance criteria, and recent comments. This currently requires manually copying and pasting content into conversations. The team wants the agent to access this standard Jira ticket data directly.

What is the most effective approach?

Options:

A.

Use the Bash tool with curl to call Jira’s REST API, including authentication headers and parsing JSON responses inline.

B.

Build a custom MCP server wrapping Jira’s API with tools designed specifically for this team’s code-review workflow.

C.

Export Jira tickets to Markdown files in the repository that the agent accesses using the Read tool.

D.

Integrate an existing Jira MCP server that exposes tickets, comments, and metadata through discoverable tool interfaces.

Question 12

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.

Question 13

Your automated reviewer uses a single prompt covering security issues, API design, and business-logic correctness. Your evaluation suite shows strong recall for API-design findings at 82% but poor recall for business-logic edge cases in quiz scoring at 34%. When you add few-shot examples of logic bugs to the prompt, logic recall improves to 41%, but API-design recall drops to 68%. How should you address this trade-off to improve detection across both categories?

Options:

A.

Provide the full repository as context instead of only the changed files and surrounding code, giving the model deeper visibility into business-logic patterns.

B.

Replace the few-shot examples with a detailed checklist of specific logic edge cases to verify, such as division by zero in score calculations and boundary conditions in grading thresholds.

C.

Split the review into separate focused prompts—one for security and API design and another for business logic—each with dedicated examples, and then consolidate the findings before posting.

D.

Upgrade to a more capable model tier because its stronger reasoning will handle both concern types in a single prompt and eliminate the recall trade-off.

Question 14

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.

A developer uses Claude Code to refactor a function during a development session. Before committing, the developer asks the same Claude session to review the code for issues. Later, a separate automated CI review catches several bugs that the same-session review missed.

What best explains this discrepancy?

Options:

A.

Claude retains the implementation context and prior decisions in the session, making it less likely to challenge assumptions underlying its own changes.

B.

The session’s context window necessarily became full, leaving insufficient capacity for meaningful review.

C.

The CI review must have used a more specific prompt, while the developer’s review request was too general.

D.

The CI environment can access the full repository, while a local Claude Code session can access only the current file.

Question 15

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.

Your multi-agent research pipeline crashes after processing 12 of 28 documents. The web-search agent had identified relevant sources, the document analyzer had partially completed extraction, and the synthesizer had begun identifying patterns. You need to resume processing without repeating work or losing fidelity in the prior findings.

What state-management approach best balances information fidelity with context efficiency when restoring agent state?

Options:

A.

Index all agent outputs in a shared vector store. When resuming, each agent queries the store using semantic search to retrieve relevant prior findings.

B.

Have each agent persist a structured export to a known location. On resumption, the coordinator loads the manifest and injects relevant state into agent prompts.

C.

Have each agent maintain its own persistent state file and reload it independently at the beginning of every session.

D.

Persist the coordinator’s conversation log containing all task delegations and responses, providing this log to agents when resuming.

Question 16

During initial testing of the automated review pipeline, you notice that reviews of large pull requests containing more than 50 changed files sometimes take over 20 minutes and cost $8–$12 per run because of extensive agentic loops—Claude reads files, runs analysis tools, and iterates many times. Your team needs each invocation to abort after reaching either a fixed iteration count or a fixed dollar amount. Both limits must be enforced by Claude Code itself rather than by the surrounding job runner. Which configuration change directly enforces both per-invocation limits?

Options:

A.

Add --max-turns 10 --max-budget-usd 2.00 to the claude -p invocation to cap agentic turns and expenditure.

B.

Set --permission-mode dontAsk to automatically deny tool-permission requests that are not in the explicitly allowed set.

C.

Set timeout-minutes: 5 on the GitHub Actions step and monitor per-run costs through the Anthropic Console usage dashboard.

D.

Use the --model flag to select a smaller, less expensive model so that every iteration uses fewer tokens and costs less.

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.

Your infrastructure-as-code repository includes Terraform modules ( /terraform/ ), Kubernetes manifests ( /kubernetes/ ), and CI/CD pipeline scripts ( /pipelines/ ). Each requires different conventions, but your single root CLAUDE.md has grown to 500+ lines. When developers work on Kubernetes files, Terraform-specific rules load into context unnecessarily, consuming tokens.

What is the best approach to reorganize so only relevant guidance loads when editing specific file types?

Options:

A.

Create files in .claude/rules/ with YAML frontmatter path-scoping (e.g., paths: [ " terraform/**/*.tf " ] ), loading rules only when editing matching files.

B.

Restructure the root CLAUDE.md into clearly labeled sections with headers (e.g., “## Terraform Conventions”), improving organization and readability.

C.

Split content into subdirectory CLAUDE.md files ( /terraform/CLAUDE.md , /kubernetes/CLAUDE.md ), so Claude loads directory-specific guidance.

D.

Keep the root CLAUDE.md and use @path/to/import syntax to modularly include tool-specific guidance files from separate documents.

Question 18

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 processes restaurant menus and must output structured JSON with fields for item names, descriptions, prices, and dietary tags. Some menus use inconsistent formatting—prices as “$12” vs “12.00”, dietary info as icons vs text.

What’s the most reliable approach?

Options:

A.

Use separate extraction calls for each field to ensure consistent handling of each type.

B.

Define a strict output schema and include format normalization rules in your prompt.

C.

Request multiple extraction attempts per document and select the most common format.

D.

Extract data as-is and normalize formats in post-processing code after Claude returns.

Question 19

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 submits two requests:

    Request A: “Rename the getUserData function to fetchUserProfile everywhere it’s used.”

    Request B: “Improve error handling throughout the data processing module—add try/catch blocks, meaningful error messages, and ensure failures don’t silently corrupt data.”

For which request does specifying an explicit multi-phase workflow (such as analyze → propose → implement with review) most improve outcome quality?

Options:

A.

Neither request benefits significantly

B.

Request A, the function rename task

C.

Both requests benefit equally

D.

Request B, the error handling task

Question 20

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 uses tool use with a JSON schema containing 12 fields and detailed descriptions, totaling approximately 2,500 tokens for the complete tool definition. Processing documents under 150,000 tokens yields 98% accuracy. For documents between 175,000 and 190,000 tokens, accuracy drops to 71%, with information from the final third consistently missed. The model’s context window is 200,000 tokens.

What is the most likely cause?

Options:

A.

Schemas exceeding eight to ten fields increase decision complexity during parameter generation, reducing extraction accuracy independently of document length.

B.

The model distributes attention proportionally across the input length, causing fields mentioned only once near the document’s end to receive insufficient processing focus.

C.

Very long documents exceed the model’s effective attention span regardless of context limits, causing accuracy degradation for content farther from the prompt instructions.

D.

Tool definitions consume input-context tokens. Combined with system prompts and document content, the total approaches the context limit, degrading end-of-document processing.

Question 21

In production, final reports frequently contain claims without proper source attribution. Investigation shows that the web-search and document-analysis agents correctly attach citations to their outputs, but the synthesis agent loses track of which sources support which conclusions when combining findings. What is the most effective architectural change?

Options:

A.

Add a verification step in which the report generator uses semantic-similarity matching against the original sources to reconstruct claim provenance.

B.

Have the coordinator insert source-identifier prefixes into prose before every handoff and parse those prefixes during report generation.

C.

Require every subagent to return structured claim-to-source mappings that the synthesis agent must preserve and merge when combining findings.

D.

Retain complete transcripts of every subagent interaction and add a citation-resolution agent that analyzes those logs before report generation.

Question 22

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’ve asked Claude to write a data migration script, but the initial output doesn’t correctly handle records with null values in required fields.

What’s the most effective way to iterate toward a working solution?

Options:

A.

Add “think harder about edge cases” to your prompt and request a complete rewrite of the migration logic.

B.

Manually edit the generated code to fix the null handling, then continue working with Claude on other parts.

C.

Describe the null value problem in detail and ask Claude to regenerate the entire script with improved edge case handling.

D.

Provide a test case with example input containing null values and the expected output, then ask Claude to fix it.

Question 23

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 CI pipeline performs security-focused code reviews on approximately 50 pull requests daily, currently costing $150 per day using the synchronous API. Reviews are non-blocking—developers merge after tests pass and address findings in follow-up commits. You are evaluating the Message Batches API for its 50% cost reduction.

What factor most determines whether batch processing is appropriate for this use case?

Options:

A.

Whether reducing per-review latency from 30–60 seconds to near-instant matters for your workflow.

B.

Whether your result-processing system can handle reviews arriving in a different order from the order in which they were submitted.

C.

Whether review feedback arriving up to 24 hours after pull-request creation remains actionable.

D.

Whether you can structure each review as a single request without multi-turn refinement.

Question 24

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.

Question 25

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.

Your team is configuring MCP servers in Claude Code. You want to add a shared venue lookup server that all team members should have access to, and you personally want to add an experimental music playlist server that only you are testing.

Which configuration approach correctly applies MCP server scopes?

Options:

A.

Add both servers to your local ~/.claude.json .

B.

Add the venue server to .mcp.json and the playlist server to ~/.claude.json .

C.

Add the venue server to ~/.claude.json and the playlist server to .mcp.json .

D.

Add both servers to the project-level .mcp.json file.

Question 26

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.

Production logs show that when the agent handles complex billing disputes requiring 6+ tool calls, it sometimes exhausts its max_turns limit after gathering data but before completing resolution or escalating. The team’s goal is to guarantee that every customer interaction ends with either a completed resolution or a human handoff, regardless of how the agent loop terminates.

Which approach achieves this guarantee?

Options:

A.

Implement a pre-tool-use hook that counts tool invocations and terminates the loop with an automatic escalation once the agent reaches 80% of its max_turns limit.

B.

Split the workflow into two sequential agent invocations—a first agent gathers information via get_customer and lookup_order, then a second agent receives that data and handles process_refund or escalate_to_human, each with separate turn budgets.

C.

Add orchestration-layer code that checks the agent’s outcome after each loop termination—if the loop ended without a completed resolution or escalation, programmatically call escalate_to_human with the accumulated conversation context and tool results.

D.

Add system prompt instructions telling the agent to call escalate_to_human with a summary of its findings whenever it determines it cannot complete resolution within its remaining actions.

Question 27

The synthesis agent completes its initial pass but flags that three key research questions remain unanswered because the web-search and document-analysis agents did not find relevant information on those specific subtopics. The coordinator currently proceeds directly to report generation, producing reports with incomplete coverage. What change would most effectively improve research completeness?

Options:

A.

Have the coordinator evaluate the synthesis output for gaps, then redelegate targeted queries to the web-search and document-analysis agents before invoking synthesis again.

B.

Have the report-generation agent identify unanswered research questions so users understand the limitations of the final output.

C.

Increase the initial breadth of queries sent to the web-search and document-analysis agents to reduce the probability of missing relevant information.

D.

Give the synthesis agent direct access to web-search tools so it can autonomously fill knowledge gaps without returning control to the coordinator.

Question 28

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.

The system routes documents with extraction confidence below 85% to human review. A quarterly audit reveals that 12% of high-confidence extractions (≥85%) also contain errors—cases where the model finds plausible-but-incorrect values. Error sources vary: comparison tables showing competitor specs, appendices referencing different product variants, and ambiguous phrasing the model misinterprets. You need a sustainable strategy to catch these high-confidence errors and measure whether improvements reduce the error rate over time.

What approach is most effective?

Options:

A.

Add a verification pass that re-extracts from each high-confidence document, flagging cases where the two extraction attempts produce different results.

B.

Implement heuristic rules that flag documents containing comparison tables or appendices for review regardless of confidence score.

C.

Lower the confidence threshold from 85% to 70%, routing a larger volume of extractions to human review.

D.

Implement stratified random sampling reviewing a fixed percentage of high-confidence extractions weekly, enabling error rate measurement and novel pattern detection.

Question 29

Your pipeline reviews approximately 200 database-migration scripts daily using the Message Batches API. Each request includes a shared 8,000-token system prompt containing migration-review guidelines and schema documentation, followed by an individual migration script. You added cache_control breakpoints to the shared system prompt in every request, but monitoring shows cache-hit rates of only 32%, with misses concentrated among requests processed later in the batch window. Which change addresses the root cause without adding sequential-processing latency?

Options:

A.

Split the 200 requests into ten sequential batches of 20, submitting each batch only after the previous batch completes.

B.

Add cache-prewarming requests with max_tokens: 0 at the beginning of every batch.

C.

Move the cache_control breakpoint from the shared system prompt to each migration script so similar code patterns can be reused.

D.

Configure the cache breakpoints to use the extended one-hour TTL instead of the default five-minute TTL.

Question 30

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.

After adding an MCP server with specialized code-refactoring tools—extract_function, rename_variable, and inline_function—you notice that the agent still uses basic text manipulation through Write and Bash sed commands for refactoring tasks. The MCP server is connected and healthy. Examining the configuration, you find that each MCP tool has a minimal description such as, “extract_function: Extracts a function from code.”

What is the most effective way to improve adoption of the MCP refactoring tools?

Options:

A.

Implement a request classifier that detects refactoring intent and automatically routes those requests to the MCP server before the agent processes them.

B.

Accept this as expected behavior because simpler tools such as sed are more predictable than specialized refactoring tools.

C.

Enhance the MCP tool descriptions to explain when each tool is preferable to text manipulation and clarify expected inputs and outputs.

D.

Remove the Write tool from the agent’s configuration for refactoring sessions so it must use the MCP tools for code modifications.

Question 31

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.

A customer contacts the agent about a warranty claim on a power drill. Resolving this requires multiple sequential tool calls: get_customer to look up their account, lookup_order to find the purchase details, and then either process_refund or escalate_to_human depending on warranty eligibility. You’re implementing the agentic loop that orchestrates these steps using the Claude API.

What is the primary mechanism your application uses to determine whether to continue the loop or stop?

Options:

A.

You check whether Claude’s response contains a text content block—if text is present, the agent has produced its final answer and the loop should exit.

B.

You manually set the tool_choice parameter to " none " after the final expected tool call to force Claude to stop requesting tools.

C.

You check the stop_reason field in each API response—the loop continues while it equals " tool_use " and exits when it changes to " end_turn " or another terminal value.

D.

You track the number of tool calls made and exit the loop once a preconfigured maximum is reached.

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.

The synthesis agent receives summarized findings from the web-search and document-analysis agents, then passes a consolidated summary to the report generator. During testing, you discover that the generated reports make factual claims without proper citations. The report generator cannot attribute statements to their original sources because that metadata was lost during the summarization steps.

What is the most effective approach to ensure proper source attribution in the final reports?

Options:

A.

Have each agent output structured data separating content summaries from source metadata such as URLs, document names, and page numbers.

B.

Skip summarization and pass the complete raw outputs from web search and document analysis directly to the report generator.

C.

Instruct the synthesis agent to embed source references inline within its summary text using a consistent citation format.

D.

Have the report generator query the web-search agent to relocate sources for claims in the final report.

Question 33

You are building a structured data-extraction system using Claude. The system extracts information from unstructured documents, validates output against JSON schemas, and integrates the results with downstream systems.

Monitoring reveals that specifications sometimes appear inconsistently within source documents. For example, a summary section might state “Battery: 4000 mAh,” while the detailed specifications table states “Battery: 4200 mAh.” Your current schema contains a single battery_capacity field.

This inconsistency occurs in approximately 15% of documents, and historical analysis confirms that the detailed specifications table is accurate 90% of the time.

What is the most effective approach?

Options:

A.

Change the field to an array that captures every discovered value and its source location, leaving downstream systems to apply precedence rules.

B.

Reject every extraction containing conflicting values and require the source document to be corrected before processing continues.

C.

Add extraction instructions specifying that values from the detailed specifications table take precedence when conflicting values exist, while retaining the single-value schema.

D.

Add a conflict_detected Boolean field and route every affected document for manual review.

Question 34

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.

Production monitoring shows that follow-up queries such as “summarize what we learned about market trends” consistently take more than 40 seconds. Investigation reveals that the coordinator spawns the synthesis subagent for each summarization request, passing more than 80,000 tokens of accumulated findings. The coordinator already has these findings in its context from orchestrating the research.

What is the most effective way to improve response time for these follow-up summaries?

Options:

A.

Spawn the synthesis subagent with reduced context and have it request specific findings from the coordinator on demand.

B.

Have the coordinator handle straightforward summarization requests directly using its existing context, reserving subagent spawning for complex analysis.

C.

Pre-generate and cache summaries at multiple granularities whenever new findings accumulate.

D.

Enable prompt caching on the synthesis subagent to reduce the overhead of repeatedly transferring the same research findings.

Question 35

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 uses tool use with a JSON schema in which property_type is defined as an enum: house, apartment, condo, or townhouse. After deployment, 8% of extractions fail schema validation. Investigation reveals that listings mention many uncommon property types—“studio,” “loft,” “duplex,” “mobile home,” “tiny house,” and “converted warehouse”—and new types continue appearing regularly.

What is the most effective long-term solution?

Options:

A.

Change property_type from an enum to a free-form string and implement a normalization step in post-processing.

B.

Add few-shot examples demonstrating how to map unexpected property types to the closest existing enum value.

C.

Continuously expand the enum to include newly observed property types and add monitoring for additional edge cases.

D.

Add an other value to the enum with a separate property_type_detail string field for specifics when other is selected.

Question 36

The web-search agent has gathered several relevant sources for a research topic. The document-analysis agent now needs to examine those sources. How does information typically flow between these two specialized subagents?

Options:

A.

The coordinator receives the web-search agent’s output and includes the relevant sources and findings in the prompt used to invoke the document-analysis agent.

B.

The web-search agent directly invokes the document-analysis agent and passes the discovered sources as parameters.

C.

The agents communicate through an event-driven message queue, with the document-analysis agent subscribing to web-search completion events.

D.

Both agents automatically access a shared memory store in which the web-search agent writes its findings.

Question 37

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 a billing dispute resolution, your agent successfully retrieves customer info via get_customer and order details via lookup_order , but when attempting to call process_refund , the tool returns a timeout error. The agent has enough information to explain the charges and verify refund eligibility, but cannot actually process the refund due to the backend failure.

What approach best balances first-contact resolution with appropriate error handling?

Options:

A.

Implement automatic retries with exponential backoff for process_refund , keeping the conversation open until the refund is successfully processed.

B.

Confirm the refund will be processed and close the conversation, since the system has all necessary information to complete it automatically.

C.

Explain the billing, confirm refund eligibility, acknowledge the system issue preventing immediate processing, and offer escalation or retry later.

D.

Escalate immediately to a human agent since the refund action cannot be completed.

Question 38

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

Question 39

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 has been running for 3 weeks and human reviewers have corrected 847 extractions. Analysis reveals a recurring pattern: when recipes use informal measurements like “a handful” or “a splash,” the model either invents specific amounts or leaves fields empty—accounting for 23% of all corrections.

How should you use this feedback to improve extraction accuracy?

Options:

A.

Fine-tune the model on the 847 corrected extractions.

B.

Add few-shot examples to your prompt demonstrating correct handling of informal measurements—extracting them verbatim rather than converting or omitting them.

C.

Implement a post-processing layer that uses pattern matching to detect informal measurement phrases in source text and automatically populate values when the extraction is empty.

D.

Update your JSON schema to add a “measurement_type” enum field (precise/informal).

Question 40

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?

Options:

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.

Question 41

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 test generation produces unit tests for new code, but reviews show that 55% are low-value: trivial assertions that only verify functions do not throw exceptions, tests duplicating existing coverage, or tests ignoring your team’s fixture conventions.

How do you reduce the rate of low-value tests being generated in the first place?

Options:

A.

Implement two-phase generation in which a second Claude call scores each test against quality criteria, filtering out low-scoring tests before presenting results to developers.

B.

Add post-generation coverage analysis that automatically filters out any generated test that does not increase line coverage beyond existing tests.

C.

Restrict test generation to directories where historical quality metrics show higher acceptance rates, disabling it for areas where generated tests consistently require substantial editing.

D.

Document testing standards in CLAUDE.md, including valuable-test criteria, available fixtures and their intended use cases, and examples distinguishing meaningful behavioral tests from trivial assertions.

Question 42

Your CI pipeline performs security-focused code reviews on approximately 50 pull requests daily, currently costing $150 per day through the synchronous API. Reviews are non-blocking—developers merge after tests pass and address findings in follow-up commits. You are evaluating the Message Batches API because it offers a 50% cost reduction. What factor most determines whether batch processing is appropriate for this use case?

Options:

A.

Whether your result-processing system can handle reviews arriving in a different order from the order in which they were submitted.

B.

Whether each review can be structured as a single request without multi-turn refinement.

C.

Whether review feedback arriving up to 24 hours after pull-request creation remains actionable.

D.

Whether reducing per-review latency from 30–60 seconds to near-instantaneous delivery matters to your workflow.

Question 43

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.

When analyzing complex legal cases that cite multiple precedents, the document-analysis subagent processes each precedent sequentially. A landmark case citing 12 precedents takes more than three minutes to analyze completely.

What is the most effective way to reduce this latency while preserving the coordinator’s ability to monitor and debug the system?

Options:

A.

Implement a message queue where precedent-analysis tasks are processed asynchronously by a pool of worker agents.

B.

Enable the document-analysis subagent to spawn its own specialized subagents dynamically when it encounters cases with many citations.

C.

Have the coordinator spawn parallel document-analysis subagents, each handling a subset of precedents, and then aggregate the results before synthesis.

D.

Create a recursive agent hierarchy where analysis agents subdivide work among child agents until reaching single-precedent granularity.

Question 44

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?

Options:

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.

Question 45

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 jobs take 18 seconds to initialize before Claude begins analyzing code. Profiling reveals that the delay results from automatically discovering hooks, MCP servers, plugins, skills, and multiple nested CLAUDE.md files throughout the monorepo.

You need to reduce startup time while ensuring reviews still enforce the coding standards documented in the root-level CLAUDE.md file.

What is the most effective approach?

Options:

A.

Replace the default prompt using --system-prompt-file ./CLAUDE.md, which bypasses default prompt assembly and loads only the project rules.

B.

Run in --bare mode and pass --append-system-prompt-file ./CLAUDE.md to load the required project standards explicitly while skipping automatic discovery.

C.

Run in --bare mode and repeat all review criteria directly in the -p prompt for every invocation.

D.

Keep the default initialization and add --exclude-dynamic-system-prompt-sections to improve prompt-cache reuse across CI runners.

Page: 1 / 15
Total 152 questions