Summer Sale Special - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: mxmas70

Home > Anthropic > Claude Certified Architect > CCAR-F

CCAR-F Claude Certified Architect – Foundations Question and Answers

Question # 4

You built an LLM-powered code-review tool that analyzes pull requests and returns structured findings. Each finding is a JSON object containing file_path, line_number, issue_category—such as security or style—and description. Developers can dismiss findings they consider unhelpful, and currently 35% of findings are dismissed. You want to analyze these dismissals to understand what the system is getting wrong and improve the prompts accordingly. What change to the output structure would best support this analysis?

A.

Add a model_confidence field from 0.0 to 1.0 and filter findings below a threshold calibrated against historical dismissal rates.

B.

Add a detected_pattern field recording the specific code construct that triggered the finding, such as single-letter loop variable.

C.

Expand the description field with more detailed explanations of why each issue matters and how it should be fixed.

D.

Remove the issue_category field and track dismissal rates only at the individual-finding level.

Full Access
Question # 5

The automated review consistently flags patterns your team uses intentionally—force-unwrapping optionals in test files, using large coordinator classes that follow your established architecture, and importing internally maintained modules marked as deprecated in the public SDK. Developers are dismissing approximately 30% of all findings as project-specific false positives. Which approach prevents the model from generating these findings in the first place by supplying the project’s conventions as persistent context during every review?

A.

Build post-processing keyword filters that suppress findings containing terms such as “force unwrap,” “large class,” or “deprecated import” before results reach developers.

B.

Configure the review to analyze only the changed lines in the diff without surrounding file context, reducing the amount of code the model evaluates during each review.

C.

Have developers add inline suppression comments at flagged lines and preprocess diffs to exclude suppressed lines before sending code to the model.

D.

Document the team’s accepted patterns and intentional conventions in the project’s CLAUDE.md file so the model receives this context during every review.

Full Access
Question # 6

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 reviews every pull request using a single API call with a static prompt containing the diff and the full text of each changed file. Unchanged files are not included. Developers report that reviews consistently miss cross-file bugs—for example, a pull request renames a function’s parameters, but the review does not identify callers in unchanged files that still use the old argument order.

Evaluation shows that cross-file bugs account for 35% of production incidents originating from reviewed pull requests.

What is the most effective change to the review design?

A.

Build a static dependency graph and include every file located within two dependency hops of a changed file.

B.

Add instructions asking the model to list external references and reason step by step about how each change could affect unseen callers.

C.

Redesign the review as a turn-limited agentic task that can read files and search the repository, following references to verify cross-file findings.

D.

Run separate review passes for each changed file with its direct dependants, and then aggregate and deduplicate the findings through a final consolidation pass.

Full Access
Question # 7

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 returns 4 hours after their initial session about the same billing dispute. The previous 32-turn session contains lookup_order results showing “Status: PENDING, Expected resolution: 24–48 hours.” In testing, you observe that when resuming sessions with stale tool results, the agent often references the outdated data in responses (e.g., “I see your refund is still being processed”) even after subsequent fresh tool calls return different information.

What approach most reliably handles returning customers?

A.

Resume with full history and configure the agent to automatically re-call all previously used tools at session start to ensure data freshness.

B.

Resume with full history and add a system prompt instruction telling the agent to always prefer the most recent tool results when multiple calls to the same tool exist in context.

C.

Resume with full history but filter out previous tool_result messages before resuming, keeping only the human/assistant turns so the agent must re-fetch needed data.

D.

Start a new session, inject a structured summary of the previous interaction (issue type, actions taken, resolution status), then make fresh tool calls before engaging.

Full Access
Question # 8

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.

Full Access
Question # 9

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 raises three separate issues during one session: a refund inquiry (turns 1–15), a subscription question (turns 16–30), and a payment method update (turns 31–45). At turn 48, the customer asks “What happened with my refund?” The conversation is approaching context limits.

What strategy best maintains the agent’s ability to address all issues throughout the session?

A.

Summarize earlier turns into a narrative description, preserving full message history only for the active issue.

B.

Implement sliding window context that retains the most recent 30 turns.

C.

Rely on MCP tools to re-fetch relevant information on demand when the customer references earlier issues.

D.

Extract and persist structured issue data (order IDs, amounts, statuses) into a separate context layer.

Full Access
Question # 10

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 invoices and extracts line items, subtotals, tax amounts, and grand totals. During evaluation, you discover that in 18% of extractions, the sum of extracted line item amounts doesn’t match the extracted grand total—sometimes due to OCR errors in the source document, sometimes due to extraction mistakes by the model. Downstream accounting systems reject records with mismatched totals.

What’s the most effective approach to improve extraction reliability?

A.

Add few-shot examples demonstrating invoices where extracted line items sum correctly to the stated total, encouraging the model to produce mathematically consistent extractions.

B.

Extract line items and totals independently, then use a separate validation model to reconcile discrepancies by determining which extracted values are most likely correct.

C.

Implement post-processing that automatically adjusts line item amounts proportionally when their sum doesn’t match the stated total.

D.

Add a “calculated_total” field where the model sums extracted line items alongside a “stated_total” field. Flag records for human review when values differ.

Full Access
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, 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?

A.

Neither request benefits significantly

B.

Request A, the function rename task

C.

Both requests benefit equally

D.

Request B, the error handling task

Full Access
Question # 12

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?

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.

Full Access
Question # 13

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?

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.

Full Access
Question # 14

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?

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

Full Access
Question # 15

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.

Full Access
Question # 16

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.

A security audit requires updating your authentication library from v2 to v3. The migration guide documents breaking changes: authenticate() now returns a Promise instead of accepting a callback, the User type has restructured fields, and three deprecated methods were removed. Grep shows the library is imported in 45 files across several modules.

What’s the most effective approach?

A.

Create a custom slash command encapsulating the migration transformations, then execute it against each file without prior codebase exploration.

B.

Update the dependency version, run the test suite, and use Claude Code to fix each failure as it appears.

C.

Enter plan mode to explore library usage across modules, map affected code paths, then create a migration strategy before implementing.

D.

Paste the migration guide’s breaking changes into your prompt and use direct execution to update all usages across the 45 files.

Full Access
Question # 17

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 your agent to identify untested code paths in a legacy payment processing module spanning 45 files. After reading the first 8 source files, the agent’s responses are becoming noticeably less accurate—it’s forgetting previously discussed code patterns and hasn’t yet located all test files or traced critical payment flows.

What’s the most effective approach to complete this investigation?

A.

Spawn subagents to investigate specific questions (e.g., “find all test files for payment processing,” “trace refund flow dependencies”) while the main agent coordinates findings and preserves high-level understanding.

B.

Clear context with /clear , then selectively re-read only the most critical files discovered so far, writing key findings to a scratchpad file that persists between context resets.

C.

Switch to using Grep to search for specific function names instead of reading full files, reducing the content loaded into context for remaining exploration.

D.

Document all current findings in a summary report, clear context completely, then use that report as the sole reference for continuing the investigation.

Full Access
Question # 18

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 frequently migrates React components to Vue. You’ve written a step-by-step workflow for Claude Code to follow during each migration, and you want every developer on the team to invoke it by typing /migrate-component . The workflow should stay in sync as the team iterates on it.

Where should you place the skill file?

A.

In ~/.claude/skills/migrate-component/SKILL.md on each developer’s machine.

B.

As a detailed instruction block in the project’s root CLAUDE.md file.

C.

In the project’s .claude/settings.json using a skillOverrides entry to register and define the workflow.

D.

In .claude/skills/migrate-component/SKILL.md at the project root, committed to version control.

Full Access
Question # 19

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 wants Claude to follow a detailed code review checklist (8 items covering API changes, test coverage, documentation, security, etc.) when reviewing pull requests. The team also uses Claude extensively for other tasks: writing new features, debugging production issues, and generating documentation. Currently, developers paste the checklist at the start of each review session.

Which approach best addresses this workflow need?

A.

Create a /review slash command containing the checklist, invoked when starting reviews.

B.

Create a dedicated review subagent with the checklist embedded in its configuration.

C.

Add the checklist to the project’s CLAUDE.md file under a “Code Review” section.

D.

Configure plan mode as the default for code review sessions.

Full Access
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 processes two document types: standard monthly reports, which are archived after processing, and urgent exception reports, which must trigger business alerts within 30 minutes of receipt. Both use the same JSON schema. You want to minimize API costs while meeting the latency requirements.

How should you architect the processing pipeline?

A.

Submit all documents to the Message Batches API with custom_id values for tracking. When results arrive, immediately process urgent documents and trigger delayed alerts for exceptions.

B.

Route standard reports to the Message Batches API for 50% cost savings, and route urgent exception reports to the real-time Messages API.

C.

Queue all documents and submit hourly batches, flagging urgent documents for expedited handling when batch results return.

D.

Submit all documents to the real-time Messages API to ensure consistent processing latency across document types.

Full Access
Question # 21

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?

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.

Full Access
Question # 22

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?

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.

Full Access
Question # 23

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 complex graph traversal algorithm with specific performance requirements and edge cases to handle (disconnected nodes, cycles, weighted edges). You want to structure your workflow for efficient iterative refinement with Claude.

What approach will most effectively enable progressive improvement across multiple iterations?

A.

Have Claude extensively research the algorithm and create a detailed implementation plan using extended thinking, then implement the complete solution based on that plan.

B.

Provide Claude with a reference implementation from documentation, then ask it to rewrite the code to match your codebase style and add the required edge case handling, comparing outputs against the reference.

C.

Write a test suite covering expected behavior, edge cases, and performance requirements before implementation. Ask Claude to write code that passes the tests, then iterate by sharing test failures with each refinement request.

D.

Provide Claude with a detailed natural language specification of the algorithm, including all requirements and edge cases. Review each output manually and provide descriptive feedback on what behavior needs to change.

Full Access
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.

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.

Full Access
Question # 25

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?

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.

Full Access
Question # 26

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.

Full Access
Question # 27

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 caching layer for API responses to speed up the /products endpoint. You have a rough idea—Redis with a 5-minute TTL—but you’re new to production caching and aren’t sure what other considerations a robust implementation requires.

What’s the most effective way to start your iterative workflow?

A.

Ask Claude to interview you about the caching requirements before implementing, surfacing considerations like invalidation strategies, cache layers, consistency guarantees, and failure modes.

B.

Use plan mode to analyze the current /products endpoint implementation, then provide your caching requirements once Claude explains how the existing code is structured.

C.

Start with a minimal request: “Add Redis caching to /products with 5-minute TTL.” Add features and fix issues through follow-up prompts as problems surface during testing.

D.

Write a specification with your known requirements and “TBD” markers for uncertain areas, having Claude propose solutions for each TBD as it implements.

Full Access
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.

Your pipeline uses a tool called extract_metadata with a JSON schema for paper details. You’ve also defined lookup_citations and verify_doi tools for enrichment. During testing, you notice that when users include requests like “extract the metadata and tell me how cited it is,” Claude sometimes calls lookup_citations first, which fails because it needs the DOI that extract_metadata would provide.

What’s the most effective way to ensure structured metadata extraction happens first?

A.

Set tool_choice to { " type " : " tool " , " name " : " extract_metadata " } and process the enrichment requests in subsequent turns after receiving the extracted metadata.

B.

Set tool_choice to " auto " and reorder the tool definitions so extract_metadata appears first in the tools array, since Claude prioritizes earlier-listed tools.

C.

Set tool_choice to { " type " : " tool " , " name " : " extract_metadata " } for every API call in the pipeline, ensuring Claude always extracts metadata before any enrichment can occur.

D.

Set tool_choice to " any " so Claude must use a tool, combined with system prompt instructions prioritizing extract_metadata .

Full Access
Question # 29

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 needs to extract candidate information (name, contact details, skills, work experience, education) from uploaded resumes. The extracted data must strictly conform to a predefined JSON schema, as missing required fields or incorrect data types will cause downstream validation failures.

What is the most reliable approach to ensure Claude’s output consistently matches the schema?

A.

Parse Claude’s text response with regex patterns to extract JSON objects, using retry logic for malformed responses.

B.

Include detailed JSON formatting instructions and a template example in the system prompt, asking Claude to output only valid JSON.

C.

Make two separate API calls—first extracting information as text, then asking Claude to format that text as JSON.

D.

Define a tool with an input schema matching your required JSON structure and extract the data from Claude’s tool_use response.

Full Access
Question # 30

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 Code to build a PDF report generation feature. The initial implementation queries the database correctly, but the output has formatting issues: table columns are too narrow causing content truncation, dates display without proper formatting, and page break handling is incorrect. You’ve noticed these issues interact—changing column widths affects how dates render, and page breaks depend on content height.

What’s the most effective approach for iterating toward a working solution?

A.

Start fresh with a detailed prompt specifying all formatting requirements upfront.

B.

Provide all three issues in a single detailed message with exact specifications for each, allowing Claude to address them together in one update.

C.

Address the column width issue first with specific measurements, verify it works, then fix date formatting within the corrected columns, then adjust page breaks—testing after each change.

D.

Show Claude an example of a correctly formatted report and ask it to match that output, rather than listing the specific technical issues.

Full Access
Question # 31

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.

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?

A.

Standardize all subagent outputs as prose summaries with inline citations.

B.

Add a format-conversion layer that transforms every subagent output into a common intermediate representation.

C.

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

D.

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

Full Access
Question # 32

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?

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.

Full Access
Question # 33

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 CI linter, (2) findings on automatically generated template code under src/gen/*, and (3) rendering-helper patterns that are intentional project conventions but are 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 real 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.

Configure separate GitHub Actions workflow files for each code area: one for generated code with findings suppressed, one for rendering code with custom instructions, and one general workflow for everything else.

C.

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 impose stricter evidence requirements on rendering-related issues.

D.

Add detailed explanations to the project’s CLAUDE.md describing intentional patterns, stating that CI handles linting, and identifying src/gen/ as automatically generated code.

Full Access
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.

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 the synthesis draft together with a structured source index that maps key claims to their source URLs and relevant excerpts.

B.

Pass the full accumulated context from all prior agents.

C.

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

D.

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

Full Access
Question # 35

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?

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.

Full Access
Question # 36

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?

A.

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

B.

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

C.

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

D.

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

Full Access
Question # 37

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?

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).

Full Access
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 the agent yesterday to analyze a legacy authentication module, identifying two distinct refactoring approaches: extracting a microservice versus refactoring in-place. Today, they want to explore both approaches in depth—having the agent propose specific code changes for each—before deciding which to implement.

What’s the most effective way to structure this exploration?

A.

Use fork_session to create two branches from yesterday’s analysis, exploring one approach in each fork.

B.

Resume yesterday’s session and explore both approaches sequentially within the same conversation thread.

C.

Resume yesterday’s session to explore the first approach, then start a new session for the second, manually recreating the original context.

D.

Start two fresh sessions, manually providing a summary of yesterday’s analysis findings to establish context.

Full Access
Question # 39

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?

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.

Full Access
Question # 40

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.

Full Access
Question # 41

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?

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.

Full Access
Question # 42

When implementing your lookup_order MCP tool, the backend sometimes returns errors—for example, “Order not found” or temporary database failures. What is the correct pattern for communicating these errors back to the agent?

A.

Return the error message in the tool-result content with the isError flag set to true.

B.

Return a successful response with a status field indicating the error type.

C.

Log the error server-side and return an empty result to avoid confusing the model.

D.

Throw an exception from the tool handler so the agent framework can catch and log it.

Full Access
Question # 43

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 system implements automatic retries when validation fails. On each retry, the specific validation error is appended to the prompt. This retry-with-error-feedback approach resolves most failures within 2–3 attempts.

For which failure pattern would additional retries be LEAST effective?

A.

The model extracts keywords as a nested object organized by category when the schema requires a flat array of strings.

B.

The model extracts “et al.” for co-authors when the full list exists only in an external document not in the input.

C.

The model extracts citation counts as locale-formatted strings (“1,234”) when the schema requires integers.

D.

The model extracts dates as ISO 8601 datetime strings (“2023-03-15T00:00:00Z”) when the schema requires only the date portion (YYYY-MM-DD).

Full Access
Question # 44

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 agent is handling a billing dispute. After calling get_customer and lookup_order , it identifies that the dispute involves a promotional pricing error requiring manager approval—beyond the agent’s authorization level.

How should the workflow handle this mid-process escalation?

A.

Call escalate_to_human , passing only the customer’s original message.

B.

Compile a structured handoff with customer details, order info, and the identified issue before calling escalate_to_human .

C.

Attempt the refund with process_refund anyway, escalating only if the system rejects the transaction.

D.

Persist the complete conversation and tool response history to a database, then call escalate_to_human with a reference ID.

Full Access
Question # 45

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?

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.

Full Access