
2026 Correct Practice Tests of CCAR-F Dumps with Practice Exam
Certification Sample Questions of CCAR-F Dumps With 100% Exam Passing Guarantee
NEW 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?
- A. Define a strict output schema and include format normalization rules in your prompt.
- B. Request multiple extraction attempts per document and select the most common format.
- C. Extract data as-is and normalize formats in post-processing code after Claude returns.
- D. Use separate extraction calls for each field to ensure consistent handling of each type.
Answer: C
Explanation:
The most reliable architecture separates semantic interpretation from deterministic normalization. Claude is well suited to identifying that "$12" and "12.00" represent prices, or that a leaf icon represents a dietary classification. However, canonical conversion-removing currency symbols, converting values to decimal types, mapping icons to controlled labels, and enforcing locale-specific rules-is more predictably performed in application code.
Structured Outputs guarantee that Claude returns valid JSON matching the supplied schema, but that guarantee concerns structural conformance. It does not by itself guarantee that every semantically equivalent source representation will be normalized identically. Anthropic's evaluation guidance identifies code-based checks as the fastest, most reliable, and most scalable mechanism for rule-based validation. ( https://platform.
claude.com/docs/en/build-with-claude/structured-outputs )
Option D therefore minimizes model responsibility: Claude extracts the evidence as represented, and deterministic post-processing converts it into the canonical downstream format. This also makes normalization rules independently testable, version-controlled, and auditable.
Option A increases latency and cost without solving normalization. Option B improves output structure, but prompt-based normalization can still vary across ambiguous formats. Option C introduces unnecessary stochasticity and majority-vote logic where explicit parsing rules are available. The downstream contract should remain stable, but format conversion should be implemented using deterministic transformations rather than repeated probabilistic inference.
Official references/topics: Structured Outputs-schema compliance; Evaluation Design-code-based validation; Reliable extraction pipelines.
NEW QUESTION # 19
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.
You're implementing the escalation logic for when the agent should call escalate_to_human . Your team proposes four different approaches for triggering escalation.
Which approach will most reliably identify cases that genuinely require human intervention?
- A. Instruct the agent to escalate when the customer requests a human, when the issue requires policy exceptions, or when the agent cannot make meaningful progress.
- B. Build a rules engine that maps specific issue types, customer segments, and product categories to escalation decisions, removing the need for model judgment calls.
- C. Configure the agent to escalate after three consecutive tool calls that fail to resolve the customer's stated issue, ensuring a reasonable attempt before involving a human.
- D. Implement sentiment analysis that monitors for frustration indicators (negative language, repeated questions, exclamation marks) and triggers escalation when the frustration score exceeds a configured threshold.
Answer: A
Explanation:
Option B identifies escalation through direct operational criteria rather than indirect proxies. A customer's explicit request for a person is unambiguous. A required policy exception defines an authorization boundary.
An inability to make meaningful progress identifies a case where continued autonomous execution is no longer productive.
Anthropic describes agents as systems that act, observe results, adjust, and continue until the task is completed or human input is required. Its trustworthy-agent guidance also emphasizes that agents must recognize when to pause rather than pushing through uncertainty or decisions that only a human can settle. (
https://www.anthropic.com/research/trustworthy-agents )
Option A is too rigid for high-ambiguity support cases. Maintaining exhaustive mappings for every issue, product, and customer segment recreates the brittleness that agentic reasoning is intended to avoid. Option C treats repeated tool use as a substitute for semantic progress; one definitive authorization failure may require immediate escalation, while several legitimate diagnostic calls may not. Option D confuses emotional tone with operational necessity. A calm customer may require a policy exception, while a frustrated customer may still have a straightforward automated resolution.
The escalation criteria should be encoded in the system instructions and supported by evaluations covering explicit requests, authorization limits, unresolved ambiguity, repeated non-progress, and successful self- service cases.
Official references/topics: Human-control checkpoints, escalation criteria, authorization boundaries, progress-aware agents.
NEW QUESTION # 20
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 citation counts as locale-formatted strings ("1,234") when the schema requires integers.
- B. 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).
- C. The model extracts keywords as a nested object organized by category when the schema requires a flat array of strings.
- D. The model extracts "et al." for co-authors when the full list exists only in an external document not in the input.
Answer: D
Explanation:
Retry-with-error-feedback is effective when the required information is available and the defect concerns representation. Options A, C, and D are correctable formatting failures: the model can flatten an object into an array, remove thousands separators and emit an integer, or convert a datetime into the required date-only format. The validation message supplies enough information to revise the output.
Option B is fundamentally different. The complete co-author list is absent from the model's input and exists only in an external document. No number of retries can recover evidence that was never supplied. Repeated attempts may instead increase the probability of fabrication. Anthropic's hallucination guidance recommends restricting responses to available documents, allowing the model to acknowledge missing information, and withholding or retracting claims that cannot be grounded in the source. ( https://docs.anthropic.com/en/docs
/test-and-evaluate/strengthen-guardrails/reduce-hallucinations )
The correct response is therefore to return an explicit missing-data state, retrieve the external document through a tool, or route the record for enrichment. Retrying without changing the information boundary cannot solve the problem.
Current Anthropic Structured Outputs can eliminate many shape-related failures by guaranteeing JSON Schema conformance, but they still cannot create unavailable source facts. ( https://platform.claude.com/docs
/en/build-with-claude/structured-outputs ) This distinction-format failure versus evidence failure-is central to reliable extraction architecture.
Official references/topics: Retry Boundaries; Missing Context; Grounded Extraction; Structured Outputs; External Data Retrieval.
NEW QUESTION # 21
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 tasked with adding real-time updates to the application. This could be implemented using WebSockets, Server-Sent Events, or polling, each with different complexity, browser support, and infrastructure requirements.
What's the most effective way to begin this task?
- A. Use direct execution to implement polling first, then evaluate whether to upgrade to WebSockets later.
- B. Use direct execution with a prompt asking Claude to analyze all approaches and implement the one it determines is best.
- C. Enter plan mode to explore the architecture, evaluate trade-offs, and present options for team approval before implementing.
- D. Start direct execution with WebSockets, then refactor if infrastructure issues arise.
Answer: C
Explanation:
The implementation approach is unresolved and carries architectural consequences. WebSockets, Server-Sent Events, and polling differ in connection lifecycle, bidirectional communication, proxy compatibility, scaling requirements, deployment topology, reconnection behavior, and operational complexity. Claude should therefore inspect the existing application and infrastructure before modifying code.
Anthropic recommends separating exploration and planning from implementation when the approach is uncertain, the work affects multiple files, or the developer is unfamiliar with the relevant architecture. In plan mode, Claude can read files and analyze the system without making changes, produce a detailed proposal, and allow the developer or team to review the plan before execution. ( https://code.claude.com/docs/en/best- practices ) Option A commits to polling before determining whether its latency and load characteristics meet the requirement. Option B delegates a consequential architectural decision and immediate implementation to a single execution step without a review checkpoint. Option D prematurely selects the most infrastructure- sensitive option and assumes later refactoring will be inexpensive.
Option C creates the correct sequence: examine the frontend and backend architecture, document requirements, compare alternatives, identify infrastructure constraints, obtain approval, and only then implement the selected design with appropriate tests and observability.
Official references/topics: Plan mode, explore-plan-implement workflow, architectural trade-off analysis, review checkpoints.
NEW QUESTION # 22
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. Document all current findings in a summary report, clear context completely, then use that report as the sole reference for continuing the investigation.
- C. 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.
- D. Switch to using Grep to search for specific function names instead of reading full files, reducing the content loaded into context for remaining exploration.
Answer: A
Explanation:
The investigation contains several bounded research questions that can be delegated independently: locating the complete test suite, tracing payment and refund flows, identifying conditional branches, and mapping external dependencies. Each subagent can read the relevant files in its own context and return a focused summary to the coordinating agent.
Anthropic recommends subagents for codebase exploration because extensive file reading rapidly consumes the main context window. Subagents isolate that volume and return only their conclusions, preserving the main conversation for synthesis and implementation. ( https://docs.anthropic.com/en/docs/claude-code
/common-workflows ) Anthropic also describes parallel research as appropriate when separate investigation paths can proceed independently and the main agent can synthesize the results afterward. ( https://docs.
anthropic.com/en/docs/claude-code/sub-agents )
Option B sacrifices the current conversational state and requires reconstruction after /clear . Option C may reduce token usage, but isolated text matches cannot reliably reveal full execution paths, indirect calls, or test coverage relationships. Option D converts the current analysis into a single lossy summary and risks omitting details needed later.
Option A directly addresses the demonstrated context degradation while retaining a high-level coordinating thread. The subagent prompts should be narrowly scoped and require concrete outputs such as file paths, uncovered branches, call-chain evidence, and existing tests associated with each flow.
Official references/topics: Subagent Context Isolation; Parallel Research; Context Preservation; Coordinated Codebase Analysis.
NEW 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.
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. Configure plan mode as the default for code review sessions.
- B. Add the checklist to the project's CLAUDE.md file under a "Code Review" section.
- C. Create a /review slash command containing the checklist, invoked when starting reviews.
- D. Create a dedicated review subagent with the checklist embedded in its configuration.
Answer: C
Explanation:
The checklist is a reusable, task-specific procedure that should load only when a pull-request review is being performed. A /review command provides an explicit invocation mechanism, prevents repeated copy-and- paste, and keeps the checklist out of unrelated coding, debugging, and documentation sessions.
In current Claude Code terminology, custom commands have been consolidated into skills. A .claude/skills
/review/SKILL.md file creates a /review command, while the legacy .claude/commands/review.md format remains supported. Anthropic recommends skills when users repeatedly supply the same checklist or multi- step procedure; unlike CLAUDE.md content, the skill body is loaded only when invoked or determined relevant. ( https://code.claude.com/docs/en/skills ) Option B introduces an isolated agent context when the requirement is primarily to inject a repeatable review procedure. A subagent could be useful for independent verification, but it is not necessary merely to avoid repasting the checklist. Option C bloats every session with instructions that apply only to code review. Option D controls editing permissions and planning behavior; it does not encode review criteria.
The review skill can also pre-authorize read-only tools and accept a pull-request identifier or branch as an argument.
Official references/topics: Claude Code Skills; Custom Slash Commands; On-Demand Instructions; Reusable Review Workflows.
NEW QUESTION # 24
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's exploration subagent spent 30 minutes analyzing a legacy payment system, reading 47 files and documenting data flows. The session was interrupted when the engineer's connection dropped. While away, a teammate merged a PR that renamed two utility functions. The engineer wants to continue the same exploration.
What's the most effective approach?
- A. Resume the subagent from its previous transcript and inform it about the renamed functions.
- B. Launch a fresh subagent with a summary of prior findings.
- C. Resume the subagent from its previous transcript without mentioning the changes-the architecture understanding remains valid.
- D. Launch a fresh subagent and include the prior transcript in the initial prompt for context.
Answer: A
Explanation:
Resuming the existing subagent preserves the expensive investigative context: files already inspected, data- flow relationships, hypotheses, and intermediate conclusions. Anthropic documents that session history contains prompts, tool calls, tool results, and responses, allowing an interrupted investigation to continue with its prior analysis intact. ( https://code.claude.com/docs/en/agent-sdk/sessions ) Subagent transcripts also persist within their parent session and can be resumed after an interruption or restart. ( https://code.claude.com
/docs/en/agent-sdk/subagents?utm_source=chatgpt.com )
The engineer must nevertheless disclose the renamed utility functions. Anthropic explicitly distinguishes conversation persistence from filesystem persistence: resuming restores what the agent previously knew, but it does not freeze or snapshot the repository. ( https://code.claude.com/docs/en/agent-sdk/sessions ) Without the update, the subagent may search for obsolete symbols, misinterpret broken references, or rely on stale file paths.
Option A loses the detailed transcript and replaces it with a necessarily compressed summary. Option B preserves context but conceals a material repository change. Option D duplicates a large transcript inside a new context, increasing token consumption without providing any advantage over native resume functionality.
The resumed prompt should name the renamed functions, identify the merge or affected files, and instruct the subagent to re-read only the changed areas before continuing its broader exploration.
Official references/topics: Session Resume; Persistent Subagent Transcripts; Repository Drift; Targeted Context Refresh.
NEW QUESTION # 25
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. Use --resume auth-deep-dive to load that specific session by name
- D. Start fresh and re-read the same files
Answer: C
Explanation:
Claude Code supports resuming a specific saved session by either its identifier or its assigned name. Because the engineer knows the target session is named auth-deep-dive , the appropriate command is:
claude --resume auth-deep-dive
Anthropic's CLI reference explicitly states that --resume can resume a session by ID or name and gives named-session usage in the same form. Resuming restores the relevant conversation history and accumulated context, including the prior analysis and files discussed during the investigation. ( https://docs.anthropic.com
/en/docs/claude-code/cli-reference )
Option B is incorrect because --continue resumes the most recent session in the current directory. The engineer has conducted three subsequent sessions, so it may open an unrelated investigation. Option A uses a flag that is not the documented Claude Code mechanism for selecting a prior session; --resume itself accepts the session identifier when an ID is used. Option C discards two hours of established context and unnecessarily repeats codebase exploration.
Named sessions are particularly useful when engineers alternate among multiple projects or parallel investigations. Assigning descriptive names allows the correct thread to be retrieved deterministically rather than depending on chronological recency.
Official references/topics: Claude Code Session Persistence, Named Sessions, --resume , --continue .
NEW 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, Glob) and integrates with Model Context Protocol (MCP) servers.
After integrating a local MCP server providing code analysis tools ( analyze_dependencies , find_dead_code , calculate_complexity ), you verify the server is healthy and tools appear in the tools/list response. However, you observe that the agent consistently uses Grep to search for import statements instead of calling analyze_dependencies -even when users explicitly ask about "code dependencies." Examining tool definitions reveals:
* MCP analyze_dependencies - "Analyzes dependency graph"
* Built-in Grep - "Search file contents for a pattern using regular expressions. Returns matching lines with line numbers and surrounding context." What's the most effective approach to improve the agent's selection of MCP tools?
- A. Add routing instructions to the system prompt specifying that dependency-related questions should use MCP tools rather than Grep.
- B. Expand MCP tool descriptions to detail capabilities and outputs-e.g., "Builds dependency graph showing direct imports, transitive dependencies, and cycles."
- C. Split analyze_dependencies into granular tools ( list_imports , resolve_transitive_deps , detect_circular_deps ) so each has a focused purpose less likely to overlap with Grep.
- D. Remove Grep from available tools when the MCP server is connected to eliminate functional overlap.
Answer: B
Explanation:
Claude selects tools principally from their names, descriptions, parameter schemas, and the task context. The current description-"Analyzes dependency graph"-does not explain why the MCP tool is superior to a familiar text search. It omits the tool's scope, the circumstances in which it should be selected, and the structured information it returns.
Anthropic identifies detailed descriptions as the most important factor in tool-use performance. A strong description should state what the tool does, when it should and should not be used, what its parameters mean, and any limitations. Anthropic recommends several sentences for complex tools rather than a short generic label. ( https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/implement-tool-use ) The MCP connector guidance likewise states that Claude selects among available tools using their names and descriptions and that clear, specific descriptions improve selection accuracy. ( https://docs.anthropic.com/en
/docs/agents-and-tools/mcp-connector )
Option B makes the functional distinction explicit: Grep locates textual import statements, whereas analyze_dependencies constructs a semantic graph containing direct and transitive dependencies, cycles, and potentially unresolved references. Option A is a brittle global override. Option C removes a generally useful tool. Option D increases the number of tools and selection ambiguity, contrary to Anthropic's recommendation to consolidate related operations where practical.
Official references/topics: MCP Tool Discovery; Tool Descriptions; Tool Selection Accuracy; Tool-Surface Design.
NEW QUESTION # 27
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 contracts that frequently include amendments. When a contract contains both original terms and later amendments (e.g., original clause specifies "30-day payment terms" while Amendment 1 changes this to "45 days"), the model inconsistently extracts one value or the other with no indication of which applies.
What's the most effective approach to improve extraction accuracy for documents with amendments?
- A. Redesign the schema so amended fields capture multiple values, each with source location and effective date.
- B. Add prompt instructions to always extract the most recent amendment value and ignore superseded original terms.
- C. Preprocess documents with a classifier that identifies and removes superseded sections before the main extraction step.
- D. Implement post-extraction validation using pattern matching to detect amendments and flag those extractions for manual review.
Answer: A
Explanation:
The document contains multiple factually valid values whose applicability depends on chronology and legal context. Collapsing those values into a single scalar field discards essential provenance. Option B corrects the data model by representing each term as a structured record containing the extracted value, source location, document or amendment identifier, and effective date.
Anthropic's Structured Outputs feature is designed for data-extraction use cases in which nested objects and arrays must conform to a defined JSON Schema. ( https://platform.claude.com/docs/en/build-with-claude
/structured-outputs ) Anthropic also recommends grounding factual outputs in direct source material and making claims auditable through supporting evidence. ( https://docs.anthropic.com/en/docs/test-and-evaluate
/strengthen-guardrails/reduce-hallucinations ) A provenance-aware schema applies both principles: it retains the original clause and the amendment instead of forcing Claude to resolve a potentially complex legal precedence question during extraction.
Option A is destructive because removing superseded text prevents auditing and may eliminate terms still relevant to earlier periods. Option C oversimplifies amendment logic; the newest document is not automatically controlling for every date, jurisdiction, or clause. Option D identifies risk but does not improve the extracted representation and unnecessarily sends all amendment cases to manual review.
After extraction, deterministic business logic can select the value effective on a requested date while retaining the complete contractual history.
Official references/topics: Structured Outputs; Nested Schema Design; Provenance and Source Grounding; Temporal Data Modeling.
NEW QUESTION # 28
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 add comprehensive tests to a legacy codebase with 200 files and minimal existing test coverage. The engineer hasn't specified which modules to prioritize.
How should the agent decompose this open-ended task?
- A. Use Glob and Grep to map codebase structure, identify heavily-coupled modules, create a prioritized plan for high-impact areas, and revise as dependencies are discovered.
- B. Systematically read all 200 files to create a complete function inventory before writing any tests, ensuring the testing plan accounts for every function before beginning.
- C. Create a fixed testing schedule upfront based on directory structure, allocating equal effort to each top- level directory regardless of code complexity or business importance.
- D. Start writing tests for the first module alphabetically, using test failures and imports to discover related files organically.
Answer: A
Explanation:
The task is open-ended because neither the critical modules nor the required testing sequence is known in advance. The agent should first use lightweight discovery tools to map the repository, locate existing tests, identify central modules, and determine which components have high fan-in, business significance, complex branching, or extensive external dependencies. It can then produce an initial risk-based testing plan and refine it as new dependency information appears.
Anthropic distinguishes predefined workflows from agents that dynamically control their processes and tool usage. Agents are appropriate when the required steps cannot be reliably hardcoded and must adapt to environmental evidence. During execution, they should obtain ground truth through tool results and use that feedback to determine subsequent actions. ( https://www.anthropic.com/research/building-effective-agents ) Anthropic also identifies orchestrator-worker designs as suitable for complex coding and search tasks where the necessary subtasks depend on what the investigation reveals. ( https://www.anthropic.com/research
/building-effective-agents )
Option A assigns effort using directory boundaries rather than risk. Option C exhausts context before delivering value. Option D uses alphabetical order, which has no relationship to impact or coverage priority.
Option B establishes an evidence-driven decomposition: discover, prioritize, test high-impact paths, measure results, and revise the plan as dependencies and uncovered risks emerge.
Official references/topics: Dynamic Task Decomposition; Adaptive Agent Loops; Orchestrator-Workers; Risk-Based Test Planning.
NEW 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.
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. 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.
- C. Add few-shot examples to your prompt demonstrating correct handling of informal measurements- extracting them verbatim rather than converting or omitting them.
- D. Update your JSON schema to add a "measurement_type" enum field (precise/informal).
Answer: C
Explanation:
The reviewer corrections have exposed a narrow and repeatable interpretation failure. The desired policy is clear: informal measurements are valid source values and must be preserved verbatim rather than normalized into invented quantities or treated as missing. This behavior can be communicated efficiently through targeted few-shot examples.
Anthropic recommends examples for demonstrating expected behavior and improving consistency. Examples can pair source phrases such as "a handful of spinach," "a splash of vinegar," and "a pinch of salt" with outputs that retain handful , splash , and pinch exactly. Additional counterexamples can show that Claude must not convert these phrases into grams, millilitres, or estimated serving quantities. ( https://docs.anthropic.
com/en/docs/about-claude/use-case-guides/ticket-routing )
Option A introduces a substantially heavier training workflow for a problem that can be addressed directly through the prompt. Option C creates a parallel extraction mechanism based on pattern matching; it will be brittle across linguistic variations and may populate a value without understanding its relationship to the correct ingredient. Option D adds useful classification metadata, but it does not instruct Claude to preserve the original measurement instead of inventing or omitting it.
The revised prompt should combine an explicit verbatim-extraction rule with several varied examples derived from the corrected cases, followed by regression evaluation against the identified failure set.
Official references/topics: Few-Shot Examples, Feedback-Driven Prompt Improvement, Verbatim Extraction, Regression Evaluation.
NEW QUESTION # 30
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?
- A. 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.
- B. You track the number of tool calls made and exit the loop once a preconfigured maximum is reached.
- C. You manually set the tool_choice parameter to "none" after the final expected tool call to force Claude to stop requesting tools.
- D. 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.
Answer: A
NEW 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?
- A. 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.
- B. You track the number of tool calls made and exit the loop once a preconfigured maximum is reached.
- C. You manually set the tool_choice parameter to "none" after the final expected tool call to force Claude to stop requesting tools.
- D. 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.
Answer: A
Explanation:
The Messages API exposes stop_reason specifically so the application can determine why Claude stopped generating and what action is required next. A value of tool_use means Claude is requesting one or more tools and expects the application to execute them and return corresponding tool_result blocks. A value of end_turn means Claude has naturally completed the response. ( https://platform.claude.com/docs/en/build-with-claude
/handling-stop-reasons )
Anthropic's agent-loop tutorial implements this as a loop that continues executing tools and returning results while stop_reason remains tool_use . Once the value changes, the response is treated according to the new terminal or continuation condition. ( https://platform.claude.com/docs/en/agents-and-tools/tool-use/build-a- tool-using-agent ) Option A is unreliable because an assistant response can contain both text and tool-use blocks. Text alone does not prove that the workflow is complete. Option B requires the application to predict that no further tool call is needed, defeating Claude's ability to adapt from tool results. Option D is an important safety limit but is not the primary completion signal; an arbitrary maximum may terminate a valid workflow prematurely.
The harness should check stop_reason , process every requested tool call, append results to the conversation, and maintain a separate maximum-turn safeguard against runaway loops.
Official references/topics: Messages API stop reasons, tool-use loops, tool-result continuation, bounded orchestration.
NEW QUESTION # 32
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?
- A. Implement heuristic rules that flag documents containing comparison tables or appendices for review regardless of confidence score.
- B. Lower the confidence threshold from 85% to 70%, routing a larger volume of extractions to human review.
- C. Add a verification pass that re-extracts from each high-confidence document, flagging cases where the two extraction attempts produce different results.
- D. Implement stratified random sampling reviewing a fixed percentage of high-confidence extractions weekly, enabling error rate measurement and novel pattern detection.
Answer: D
Explanation:
Stratified random sampling provides both an ongoing quality-control mechanism and an unbiased measurement framework. By reviewing a fixed proportion of high-confidence outputs across meaningful strata-such as document type, field, source format, and business risk-the organization can estimate the residual error rate, compare performance across releases, and discover failure patterns that were not anticipated when existing rules were designed.
Anthropic recommends measurable success criteria and evaluations that mirror the real-world task distribution, including edge cases. Evaluation volume and repeatability are important because improvements must be demonstrated empirically rather than inferred from isolated examples. ( https://docs.anthropic.com/en
/docs/build-with-claude/develop-tests ) A weekly sampling program creates a stable benchmark and allows confidence intervals, trend analysis, regression detection, and error-taxonomy updates.
Option A detects only disagreements between stochastic extractions. Two attempts may produce the same plausible but incorrect answer, so agreement is not equivalent to factual correctness. Option B addresses known patterns but will miss new failure modes and may generate excessive false positives. Option C actually lowers the review threshold in the wrong direction: documents between 70% and 85% would be treated as automated rather than reviewed if the routing rule remains "below threshold," and changing thresholds alone does not measure high-confidence error prevalence.
Official references/topics: Evaluation Design; Representative Test Distributions; Continuous Reliability Measurement; Human-in-the-Loop Sampling.
NEW QUESTION # 33
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 to explore the first approach, then start a new session for the second, manually recreating the original context.
- C. Resume yesterday's session and explore both approaches sequentially within the same conversation thread.
- D. Start two fresh sessions, manually providing a summary of yesterday's analysis findings to establish context.
Answer: A
Explanation:
Forking is specifically designed for exploring alternative directions from a shared body of prior analysis. Each fork starts with a copy of yesterday's conversation history, including the files read, architectural observations, dependency findings, and decisions already recorded. The microservice approach and the in-place refactoring approach can then develop independently under separate session IDs.
Anthropic's Agent SDK documentation states that a fork creates a new session from a copy of the original history while leaving the original session unchanged. Each resulting session can subsequently be resumed independently. The documented implementation combines resume with fork_session=True in Python or forkSession: true in TypeScript. ( https://code.claude.com/docs/en/agent-sdk/sessions ) Option B allows conclusions, assumptions, and proposed edits from the first approach to contaminate the evaluation of the second. Option C preserves context for only one branch and forces the engineer to reconstruct context manually for the other. Option D discards the detailed analysis already captured in the session and depends on potentially incomplete summaries.
Two forks provide equivalent starting conditions, preserve the parent investigation, and support a fair comparison of scope, migration risk, operational complexity, and required code changes. Filesystem edits should still be isolated through worktrees or checkpointing because session forking branches conversation history, not the working directory.
Official references/topics: Agent SDK Sessions; Session Forking; Alternative-Approach Exploration; Context Preservation.
NEW QUESTION # 34
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 has three requirements for Claude Code's behavior in your project:
* Claude must never modify files in the db/migrations/ directory.
* Claude should prefer your custom logging module over console.log .
* All TypeScript files must be auto-formatted with Prettier after every edit.
All three are currently written as instructions in your project's CLAUDE.md. During a complex refactoring session, a developer discovers that Claude edited a migration file, violating requirement #1.
How should you restructure these requirements across Claude Code's configuration mechanisms?
- A. Rewrite all three requirements in CLAUDE.md using stronger directive language and add few-shot examples that demonstrate Claude refusing to edit migration files and running Prettier after edits.
- B. Configure hooks for all three: a PreToolUse hook script that blocks Edit calls targeting db/migrations/ , a PreToolUse hook script that adds logging convention context before edits, and a PostToolUse hook that runs Prettier after TypeScript edits.
- C. Move all three requirements into .claude/rules/ as path-scoped rules: one targeting db/migrations/** that forbids editing those files, and others targeting **/*.ts for the logging convention and formatting instruction.
- D. Add Edit(./db/migrations/**) to permissions.deny in the project settings, keep the logging preference in CLAUDE.md, and add a PostToolUse hook to run Prettier after TypeScript edits.
Answer: D
Explanation:
Each requirement belongs in the mechanism matching its enforcement semantics. The migration restriction is a hard safety boundary, so it should be implemented through permissions.deny , not merely expressed as contextual guidance. Anthropic explicitly states that CLAUDE.md content is treated as context rather than enforced configuration. Permission rules use the Tool(specifier) form, evaluate deny rules before ask or allow rules, and support path-based Edit(...) restrictions. ( https://code.claude.com/docs/en/memory ) The custom logging convention is a persistent project preference, making CLAUDE.md the appropriate location. It should guide Claude's code-generation decisions but does not require deterministic interception.
Prettier formatting, by contrast, is deterministic automation. Anthropic documents the exact pattern of using a PostToolUse hook with an Edit|Write matcher to run Prettier automatically after file modifications. (
https://code.claude.com/docs/en/hooks-guide )
Option A incorrectly treats path-scoped rules as a security control; rules remain instructions. Option B overuses hooks for a semantic coding preference that belongs in CLAUDE.md. Option C relies entirely on stronger prompting, which cannot guarantee that protected files remain untouched. Option D correctly separates prohibition, preference, and automatic enforcement.
Official references/topics: Permission rules, CLAUDE.md semantics, PostToolUse formatting hooks.
NEW QUESTION # 35
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 has connected a custom MCP server that provides DevOps workflow templates. The server exposes several MCP prompts (such as deploy_checklist and incident_response ) in addition to tools.
How do these MCP prompts become accessible within Claude Code?
- A. They appear as slash commands (e.g., /mcp__servername__deploy_checklist ) that you can invoke, with arguments passed after the command name.
- B. They are surfaced as @ -mentionable resources alongside files, fetched and attached to your message when referenced.
- C. They are added to Claude Code's tool registry alongside the server's tools, invoked automatically by the model when relevant to the task.
- D. They are automatically prepended to every conversation as additional system-level context, influencing Claude's behavior throughout the session.
Answer: A
Explanation:
MCP prompts are exposed as user-invoked commands rather than autonomous tools or permanently loaded system instructions. Claude Code dynamically discovers prompts from connected MCP servers and displays them in the command list using the naming convention /mcp__servername__promptname .
Arguments are supplied as space-separated values after the command. When executed, the MCP server resolves the prompt and its returned content is injected into the active conversation. Anthropic's official documentation provides examples such as /mcp__github__list_prs and /mcp__jira__create_issue "Bug in login flow" high . ( https://code.claude.com/docs/en/mcp ) Option A would consume context continuously and incorrectly treat optional workflow templates as mandatory system instructions. Option B confuses MCP prompts with MCP tools: tools are model-callable operations, while prompts are reusable prompt templates invoked as commands. Option C describes MCP resources, which can be referenced and attached but are a distinct MCP capability.
For the stated server, the team could invoke commands such as /mcp__devops__deploy_checklist or
/mcp__devops__incident_response service-name . The exact server segment is derived from the configured server name, with normalization applied where necessary.
Official references/topics: MCP Prompts; Dynamic Prompt Discovery; MCP Slash-Command Naming; Prompt Arguments.
NEW QUESTION # 36
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 a "calculated_total" field where the model sums extracted line items alongside a "stated_total" field. Flag records for human review when values differ.
- 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. Add few-shot examples demonstrating invoices where extracted line items sum correctly to the stated total, encouraging the model to produce mathematically consistent extractions.
- D. Implement post-processing that automatically adjusts line item amounts proportionally when their sum doesn't match the stated total.
Answer: A
Explanation:
The pipeline must preserve source evidence while making inconsistencies explicit. Option D records the amount stated on the invoice separately from the total derived from extracted line items. A mismatch then becomes a machine-detectable validation condition rather than an invisible extraction defect.
This approach is superior because it does not silently overwrite source data or ask another model to guess which value is correct. Anthropic's evaluation guidance recommends automated, code-based grading whenever the criterion can be expressed deterministically. Arithmetic reconciliation is precisely such a criterion. ( https://docs.anthropic.com/en/docs/build-with-claude/develop-tests ) In production, the summation should preferably be calculated by application code using normalized decimal values, even though the option describes the model populating calculated_total . The essential design principle remains the same: preserve stated_total , compute an independent total, compare them, and route discrepancies for adjudication.
Option A might improve behavior but cannot resolve genuine OCR corruption and could encourage the model to modify extracted values merely to create mathematical consistency. Option B introduces a second probabilistic judgment without new evidence. Option C is unacceptable for accounting data because it fabricates adjusted amounts and destroys fidelity to the invoice.
The schema should therefore expose both values and attach a validation status or review reason when they differ.
Official references/topics: Deterministic Validation; Human-in-the-Loop Review; Structured Output Design; Source-Fidelity Controls.
NEW QUESTION # 37
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.
Your agent has analyzed a complex service module-reading 23 source files, tracing request flows, and identifying error handling patterns. A developer wants to compare two testing strategies before committing to one: end-to-end tests with mocked external services vs. snapshot tests capturing expected outputs. They need to independently develop both approaches to evaluate trade-offs.
How should you manage the sessions?
- A. Export the analysis session's key findings to a file, then create two new sessions that reference this file.
- B. Start two fresh sessions, having each re-read the relevant source files before beginning.
- C. Resume the analysis session with fork_session enabled, creating a separate branch for each testing strategy.
- D. Continue in the original session, developing end-to-end tests first, then snapshot tests sequentially.
Answer: C
Explanation:
Forking the existing analysis session creates independent continuations that inherit the accumulated conversation context. Each branch begins with the same understanding of the service module, request flow, source files, and error-handling patterns, but subsequent work on one testing strategy does not alter the other branch or the original session.
Anthropic's Agent SDK documentation states that sessions can be resumed with their full context and forked to explore different approaches. In the SDK, enabling fork_session while resuming causes the continuation to receive a new session identifier rather than modifying the original session. ( https://docs.anthropic.com/en
/docs/claude-code/sdk?utm_source=chatgpt.com )
Option B wastes time, tokens, and tool calls by requiring both new sessions to rebuild the same 23-file analysis. Option C mixes two experimental implementations into one conversation, increasing the risk that assumptions, edits, or conclusions from the first strategy influence the second. Option D preserves only a manually selected summary, which may omit details contained in the full session history.
The appropriate design is to create one fork for the end-to-end strategy and another fork for the snapshot strategy. The original analysis remains a stable parent, while each child session develops and evaluates its approach independently.
Official references/topics: Agent SDK Sessions, Session Forking, Context Preservation, Alternative- Approach Evaluation.
NEW QUESTION # 38
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 schema includes a skills: string[] field. Production monitoring reveals three consistency issues: (1) compound phrases like "Python and SQL" are sometimes kept as one entry, sometimes split; (2) implied but unstated skills occasionally appear in extractions; (3) similar documents produce wildly different array lengths (5-10 vs 40+ entries). Your prompt currently says "Extract all skills mentioned." What's the most effective improvement?
- A. Enrich the schema to {skill: string, confidence: float, source_quote: string}[] to capture extraction metadata.
- B. Add constraints: "Extract 10-20 skills maximum, one skill per entry, only explicitly named skills."
- C. Add few-shot examples demonstrating compound phrase handling, explicit mention criteria, and appropriate entry granularity.
- D. Add post-extraction normalization that maps skills to a canonical taxonomy and deduplicates similar entries.
Answer: C
Explanation:
The failure is caused by an underspecified extraction policy rather than an inadequate JSON structure.
"Extract all skills mentioned" does not define whether coordinated phrases should be split, whether inferred capabilities qualify, or what level of specificity constitutes one skill. Few-shot examples can demonstrate all three decisions using concrete inputs and expected outputs.
Anthropic identifies examples as one of the most effective ways to improve output accuracy and consistency because they communicate behavior more precisely than abstract instructions alone. Representative examples can show that "Python and SQL" becomes two entries, that an unstated skill must not be inferred from a job title, and that broad descriptions should not be decomposed into dozens of speculative micro-skills. (
https://docs.anthropic.com/en/docs/about-claude/use-case-guides/ticket-routing ) Option A adds provenance and confidence metadata but does not define the correct extraction granularity.
Option C addresses explicitness and splitting, but the arbitrary 10-20 limit can truncate documents containing more than 20 legitimate skills or force padding when fewer than 10 appear. Option D is useful for canonicalization and deduplication, but post-processing cannot reliably remove plausible implied skills or determine how the original phrase should have been interpreted.
The strongest prompt should combine explicit rules with diverse few-shot examples covering normal cases, compound phrases, implied information, duplicates, and unusually long or short skill lists.
Official references/topics: Few-Shot Prompting, Output Consistency, Explicit Extraction Criteria, Representative Examples.
NEW QUESTION # 39
......
CCAR-F Sample Practice Exam Questions 2026 Updated Verified: https://troytec.dumpstorrent.com/CCAR-F-exam-prep.html