| Exam Code | CCDV-F |
| Exam Name | Claude Certified Developer Foundations |
| Vendor | Anthropic |
| Total Questions | 103 |
| Last Updated | 26-Oct, 2026 |
- Latest & Verified Questions
- Detailed Explanations
- Regular Updates
- Full-Length Practice Tests
- Boost Your Exam Confidence
PDF Study Materials
Downloadable guides and resources
Practice Tests
Full-length tests with real exam experience
Progress Tracking
Monitor your performance and improvement
Study Anywhere
Access on desktop, tablet, and mobile
Free CCDV-F Practice Questions
Explore 16 free practice questions for the Anthropic CCDV-F exam and review the answers and explanations to support your preparation.
-
Question 1
Single answerYour Claude agent has access to a tool that retrieves customer records. A teammate has noticed that the agent occasionally calls the tool with arguments the schema does not declare, and the tool's downstream service returns an error each time. The teammate proposes loosening the schema so the tool accepts whatever arguments the model produces.
How would you respond?
-
Option A:Correct
Add a system prompt instruction telling the model to produce schema-conforming arguments, treating the prompt instruction as the primary mechanism for keeping the agent's tool calls valid.
-
Option B:Correct
Keep the schema strict, validate arguments before dispatching, and return a structured error so the agent can retry.
-
Option C:Correct
Remove the schema entirely and rely on the downstream service to reject invalid calls, treating the downstream service as the team's primary enforcement layer.
-
Option D:Correct
Loosen the schema as the teammate proposed so the downstream service receives every call the agent makes during normal operation.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
The supplied question identifies B as the intended answer. Tool schemas are contracts between Claude and executable application code. When the downstream service accepts only a defined set of arguments, relaxing that schema merely shifts invalid data farther into the system and increases runtime failures.
Anthropic's current tooling provides an even stronger implementation of this principle through strict tool use . Setting strict: true constrains tool inputs to the declared JSON Schema, preventing undeclared properties, missing required values, and incompatible parameter types where the supported schema subset is used. Anthropic explicitly recommends strict tool use for validated parameters, type-safe function calls, and reliable agentic workflows.
In a non-strict or legacy implementation, the application should still validate arguments before dispatch and convert invalid calls into structured tool errors that Claude can interpret and potentially correct. A prompt instruction can reinforce behavior, but it should not replace deterministic validation. C and D weaken the system boundary and knowingly send invalid calls downstream.
Therefore, maintain the contract rather than adapting the contract to malformed model output.
Relevant Claude Developer topics: Agent Construction, tool schemas, strict tool use, JSON Schema, parameter validation, structured errors, retry behavior, and defensive execution boundaries .
===============
-
-
Question 2
Single answerYour Claude agent has too many tools, and many of them have overlapping functionality. The agent often picks an inappropriate tool when several could plausibly handle a request.
How would you address the tool selection problem?
-
Option A:Correct
Add more tools to cover every variation of the requests the agent handles, on the grounds that more tools give the agent more accurate options to choose from.
-
Option B:Correct
Remove all tools and rely on the agent's general capability instead, with the application losing the workflows that previously relied on tools.
-
Option C:Correct
Add detailed examples to each tool's description so the agent can match incoming requests to the right tool by example, treating the examples as the team's selection mechanism.
-
Option D:Correct
Restructure the tool set by consolidating overlapping tools, removing unused tools, and clarifying tool descriptions so each tool has a distinct purpose.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: D
Explanation
Option D addresses the architectural cause of the failure: an ambiguous tool surface. Claude chooses tools partly from their names, descriptions, schemas, and the relationship between the request and the capability described. If multiple tools appear to perform substantially the same task, selection becomes unnecessarily difficult.
Anthropic’s tool-definition guidance explicitly recommends consolidating related operations into fewer tools and making descriptions clear about both what a tool does and when it should be used. The documentation notes that fewer, more capable tools reduce selection ambiguity and make the available tool surface easier for Claude to navigate.
Option A makes the ambiguity worse by expanding an already overlapping tool set. B destroys required application capabilities. C could improve selection somewhat, because examples can clarify complex inputs, but it leaves the underlying duplication intact. Examples complement good tool design; they are not a substitute for distinct tool responsibilities.
Therefore, D is the strongest solution: remove unused tools, merge functions that represent the same conceptual operation, and write discriminative descriptions defining appropriate and inappropriate usage. Relevant Study Guide topics: tool design, tool selection, descriptions, tool consolidation, agent construction, and reducing ambiguity.
===============
-
-
Question 3
Single answerYour Claude application uses tool calling to fetch patient data and generate summary reports. The flow occasionally fails because the model returns a tool_use block that references arguments not present in the schema, and your application code does not handle this case gracefully.
How would you address this?
-
Option A:Correct
Validate the tool_use block's arguments against the tool schema before dispatching the tool and handle invalid arguments as a recognized error path.
-
Option B:Correct
Log invalid tool_use blocks when they occur and allow the tool dispatch to proceed, relying on the tool's own error handling to surface failures back to the application.
-
Option C:Correct
Retry the same request repeatedly until the model returns a valid tool_use block that matches the schema as expected.
-
Option D:Correct
Stop using tool calling entirely and replace tools with prompted text generation that asks the model to describe what it would do.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A
Explanation
The question presents a trust-boundary failure: model-generated tool arguments are being accepted without sufficient validation before an external operation executes. A tool call should therefore be treated like input arriving at any typed application interface—the application must ensure that the tool name and arguments satisfy the declared contract before dispatch.
Anthropic describes tool use as a contract in which the application defines the tool's schema and Claude returns structured tool_use input. Current Claude functionality also supports strict: true, which guarantees schema-compliant tool inputs through constrained generation and specifically addresses invented parameters, incompatible types, and missing required fields. For applications not using strict tool use, explicit application-side validation and a controlled error path remain essential.
B knowingly executes invalid input. C relies on uncontrolled repetition rather than deterministic validation and bounded recovery. D eliminates a useful capability instead of correcting its execution boundary.
Therefore, A provides the correct defensive design. Relevant Study Guide topics: tool calling, tool_use, input_schema, strict tool use, schema validation, defensive execution, error handling, and secure tool dispatch.
-
-
Question 4
Single answerYour Claude agent performs database operations. A recent incident occurred where the agent ran a destructive query that affected production data. The team wants to add deterministic controls to prevent similar incidents.
How would you prevent similar incidents?
-
Option A:Correct
Run the agent only during business hours when humans are available to monitor its activity, treating the schedule as the primary control mechanism for destructive operations.
-
Option B:Correct
Add Claude hooks that intercept database operations and apply deterministic checks, such as blocking destructive queries or requiring approval, before the queries execute.
-
Option C:Correct
Switch to a higher-capability Claude model on the grounds that a more capable model is less likely to run destructive queries during normal operation across all requests.
-
Option D:Correct
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
Option B is correct because destructive production operations require deterministic enforcement outside the model’s probabilistic reasoning. Claude Code hooks can intercept lifecycle events before tool execution and explicitly allow, deny, or request further handling based on concrete rules.
Anthropic’s hooks documentation provides this exact security pattern. A PreToolUse hook can inspect a proposed command before execution and return a blocking decision. Anthropic’s example demonstrates blocking destructive operations such as drop table, while other commands proceed normally.
That mechanism can be adapted to database controls: block DROP, destructive DELETE, unauthorized schema modifications, or production writes; require explicit approval for high-risk operations; and allow read-only or known-safe queries automatically.
A merely increases the probability that someone might notice an unsafe operation and does not prevent execution. C assumes model capability can replace access controls, which is an unacceptable safety boundary. D is useful behavioral guidance but remains probabilistic and cannot guarantee prevention.
Therefore, B creates a deterministic control between model intent and side-effect execution. Relevant Study Guide topics: Claude hooks, PreToolUse, tool governance, deterministic enforcement, approval gates, least privilege, and destructive-operation protection.
===============
-
-
Question 5
Single answerYour Claude application uses tool calling to fetch patient data and generate summary reports. The flow occasionally fails because the model returns a tool_use block that references arguments not present in the schema, and your application code does not handle this case gracefully.
How would you address this?
-
Option A:Correct
Validate the tool_use block's arguments against the tool schema before dispatching the tool and handle invalid arguments as a recognized error path.
-
Option B:Correct
Log invalid tool_use blocks when they occur and allow the tool dispatch to proceed, relying on the tool's own error handling to surface failures back to the application.
-
Option C:Correct
Retry the same request repeatedly until the model returns a valid tool_use block that matches the schema as expected.
-
Option D:Correct
Stop using tool calling entirely and replace tools with prompted text generation that asks the model to describe what it would do.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A
Explanation
The question presents a trust-boundary failure: model-generated tool arguments are being accepted without sufficient validation before an external operation executes. A tool call should therefore be treated like input arriving at any typed application interface—the application must ensure that the tool name and arguments satisfy the declared contract before dispatch.
Anthropic describes tool use as a contract in which the application defines the tool's schema and Claude returns structured tool_use input. Current Claude functionality also supports strict: true, which guarantees schema-compliant tool inputs through constrained generation and specifically addresses invented parameters, incompatible types, and missing required fields. For applications not using strict tool use, explicit application-side validation and a controlled error path remain essential.
B knowingly executes invalid input. C relies on uncontrolled repetition rather than deterministic validation and bounded recovery. D eliminates a useful capability instead of correcting its execution boundary.
Therefore, A provides the correct defensive design. Relevant Study Guide topics: tool calling, tool_use, input_schema, strict tool use, schema validation, defensive execution, error handling, and secure tool dispatch.
-
-
Question 6
Single answerYour Claude agent has too many tools, and many of them have overlapping functionality. The agent often picks an inappropriate tool when several could plausibly handle a request.
How would you address the tool selection problem?
-
Option A:Correct
Add more tools to cover every variation of the requests the agent handles, on the grounds that more tools give the agent more accurate options to choose from.
-
Option B:Correct
Remove all tools and rely on the agent's general capability instead, with the application losing the workflows that previously relied on tools.
-
Option C:Correct
Add detailed examples to each tool's description so the agent can match incoming requests to the right tool by example, treating the examples as the team's selection mechanism.
-
Option D:Correct
Restructure the tool set by consolidating overlapping tools, removing unused tools, and clarifying tool descriptions so each tool has a distinct purpose.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: D
Explanation
Option D addresses the architectural cause of the failure: an ambiguous tool surface. Claude chooses tools partly from their names, descriptions, schemas, and the relationship between the request and the capability described. If multiple tools appear to perform substantially the same task, selection becomes unnecessarily difficult.
Anthropic’s tool-definition guidance explicitly recommends consolidating related operations into fewer tools and making descriptions clear about both what a tool does and when it should be used. The documentation notes that fewer, more capable tools reduce selection ambiguity and make the available tool surface easier for Claude to navigate.
Option A makes the ambiguity worse by expanding an already overlapping tool set. B destroys required application capabilities. C could improve selection somewhat, because examples can clarify complex inputs, but it leaves the underlying duplication intact. Examples complement good tool design; they are not a substitute for distinct tool responsibilities.
Therefore, D is the strongest solution: remove unused tools, merge functions that represent the same conceptual operation, and write discriminative descriptions defining appropriate and inappropriate usage. Relevant Study Guide topics: tool design, tool selection, descriptions, tool consolidation, agent construction, and reducing ambiguity.
===============
-
-
Question 7
Single answerYour Claude agent has access to a tool that retrieves customer records. A teammate has noticed that the agent occasionally calls the tool with arguments the schema does not declare, and the tool's downstream service returns an error each time. The teammate proposes loosening the schema so the tool accepts whatever arguments the model produces.
How would you respond?
-
Option A:Correct
Add a system prompt instruction telling the model to produce schema-conforming arguments, treating the prompt instruction as the primary mechanism for keeping the agent's tool calls valid.
-
Option B:Correct
Keep the schema strict, validate arguments before dispatching, and return a structured error so the agent can retry.
-
Option C:Correct
Remove the schema entirely and rely on the downstream service to reject invalid calls, treating the downstream service as the team's primary enforcement layer.
-
Option D:Correct
Loosen the schema as the teammate proposed so the downstream service receives every call the agent makes during normal operation.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
The supplied question identifies B as the intended answer. Tool schemas are contracts between Claude and executable application code. When the downstream service accepts only a defined set of arguments, relaxing that schema merely shifts invalid data farther into the system and increases runtime failures.
Anthropic's current tooling provides an even stronger implementation of this principle through strict tool use . Setting strict: true constrains tool inputs to the declared JSON Schema, preventing undeclared properties, missing required values, and incompatible parameter types where the supported schema subset is used. Anthropic explicitly recommends strict tool use for validated parameters, type-safe function calls, and reliable agentic workflows.
In a non-strict or legacy implementation, the application should still validate arguments before dispatch and convert invalid calls into structured tool errors that Claude can interpret and potentially correct. A prompt instruction can reinforce behavior, but it should not replace deterministic validation. C and D weaken the system boundary and knowingly send invalid calls downstream.
Therefore, maintain the contract rather than adapting the contract to malformed model output.
Relevant Claude Developer topics: Agent Construction, tool schemas, strict tool use, JSON Schema, parameter validation, structured errors, retry behavior, and defensive execution boundaries .
===============
-
-
Question 8
Single answerYou are designing a Claude application that processes user-submitted text. Some of that text could include sensitive information such as account numbers or passwords that the application should not send to Claude.
How would you design the application?
-
Option A:Correct
Define the application boundary explicitly, identify what content can leave the boundary for Claude, and add filtering or redaction at the boundary.
-
Option B:Correct
Add a prompt instruction in the system prompt specifying the categories of sensitive information Claude should disregard when processing user-submitted text.
-
Option C:Correct
Log all user-submitted text before it is sent to Claude and review the logs periodically to identify whether sensitive information is reaching the model.
-
Option D:Correct
Apply filtering at the boundary for the most commonly observed sensitive data patterns and expand coverage to additional patterns based on findings from production monitoring.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A
Explanation
Option A is correct because sensitive-data protection must occur before prohibited information crosses the application's trust boundary. If account numbers, passwords, or other secrets must not be sent to Claude, asking Claude to “ignore” those values after transmission does not satisfy the requirement. The application must determine which data is permitted to leave its controlled environment and transform or reject prohibited content before constructing the Claude request.
This principle is consistent with Anthropic's defense-in-depth guidance. Anthropic recommends input screening, limiting Claude's access to sensitive information, and applying least privilege so the model receives only information necessary for the task.
B is fundamentally too late: the sensitive information has already been transmitted to the model context before the system instruction can influence behavior. C is worse because logging can create an additional store containing the sensitive information and only detects exposure after it occurs. D implements some boundary filtering but deliberately leaves coverage incomplete until production incidents reveal additional patterns.
Therefore, A requires the boundary and its permitted data flows to be defined first, then enforced comprehensively through filtering, redaction, tokenization, or rejection. Relevant Study Guide topics: application boundaries, data minimization, sensitive-data handling, filtering, redaction, least privilege, and privacy-preserving design.
===============
-
-
Question 9
Single answerYou are building a Claude application that processes 10,000 customer emails overnight to extract structured data. The work is non-interactive, runs once daily, and has a flexible completion window of several hours. Which Claude API would you use?
-
Option A:Correct
The Batch API, which is designed for non-interactive workloads with flexible completion windows.
-
Option B:Correct
The streaming responses API to process each email and return partial results to a database as the model generates them.
-
Option C:Correct
The real-time Messages API, processing the emails one at a time sequentially to ensure consistent ordering of results.
-
Option D:Correct
The real-time Messages API with concurrent requests to process the emails as fast as possible during the overnight window.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A
Explanation
Option A is correct because the Message Batches API is designed for asynchronous, high-volume processing where results do not need to be returned interactively. Anthropic’s API reference states that a Message Batch can contain many independent Messages requests and may take up to 24 hours to complete. That makes it appropriate for 10,000 overnight email-extraction jobs with a several-hour completion window.
Streaming in B solves a different requirement: it exposes partial response events while a single request is being generated, which is valuable for interactive user experiences or long-running synchronous requests, but it does not provide the workload-management advantages of a batch job. C processes items sequentially and unnecessarily sacrifices throughput. D can increase throughput with concurrent real-time calls, but it adds concurrency management and rate-limit pressure when the workload explicitly tolerates asynchronous completion.
The batch design also lets each request carry a custom identifier so results can be matched back to source emails even if completion order differs. Therefore, A is the intended Claude API choice. Relevant Study Guide topics: Message Batches API, asynchronous processing, high-volume workloads, request correlation, throughput, and non-interactive application design.
===============
-
-
Question 10
Single answerYou are deciding between Claude models for a task. The team has identified three relevant tradeoff dimensions: quality, latency, and cost.
The right model is the one that...
-
Option A:Correct
Satisfies the task's latency requirement first, then is evaluated against quality and cost thresholds to confirm the selection is acceptable across all three dimensions.
-
Option B:Correct
Meets the task's cost target within a defined latency budget, with quality validated against a representative sample of inputs after the model is selected.
-
Option C:Correct
Fits the task's quality, latency, and cost requirements together, recognizing that improving one dimension typically affects the others.
-
Option D:Correct
Meets the task's quality requirements at an acceptable latency, with cost reviewed separately once the quality and latency bar has been established.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: C
Explanation
The supplied Claude Certified Developer Foundations source marks C . Model selection is a multidimensional engineering decision. There is no universally correct Claude model independent of workload requirements; the application must satisfy the required capability or quality while remaining within acceptable latency and cost envelopes.
Anthropic's official model-selection guidance explicitly identifies capabilities, speed, and cost as core considerations and recommends testing models against workload-specific benchmarks rather than selecting them from a single metric. The guidance further recommends evaluating actual prompts and data, comparing response accuracy, quality, and edge-case behavior, and then weighing the resulting performance and cost tradeoffs.
Options A, B, and D each establish one or two dimensions as primary and effectively defer the remainder. That can lead to a technically unsuitable model—for example, a cheap model that fails the quality threshold or a high-quality model whose latency makes the user experience unacceptable.
The correct method is to define minimum acceptable thresholds across all relevant dimensions and benchmark candidate models against the actual workload.
Relevant Claude Developer topics: Claude App Design, model selection, capability, quality, latency, cost, benchmarking, workload evaluation, tradeoff analysis, and production optimization .
-
-
Question 11
Single answerThe team is debating whether to integrate with the Claude API directly or through a third-party abstraction layer that supports multiple LLM providers. The team has identified that all current and projected use cases run on Claude, no internal customer has requested LLM portability, and the team's product roadmap does not mention multi-provider support over the next two years. The third-party abstraction would add roughly 15 percent overhead in code complexity and introduce one additional dependency.
Which integration approach would you recommend?
-
Option A:Correct
The third-party abstraction layer, on the grounds that multi-provider support is valuable for any application as a matter of long-term flexibility across vendors.
-
Option B:Correct
Both integration paths in parallel, where the application uses each path on different runs to compare which performs better in production over time.
-
Option C:Correct
A custom multi-provider abstraction layer the team builds in-house so that the team controls every part of the abstraction the application uses for its API calls.
-
Option D:Correct
Direct integration with Claude through its SDK, because no multi-provider need exists and abstraction would add complexity that does not pay off.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: D
Explanation
D follows the principle of choosing the simplest architecture that satisfies demonstrated requirements . The supplied examination item explicitly marks D. In this scenario, portability is neither a present functional requirement nor a foreseeable roadmap requirement. Adding an abstraction therefore creates measurable complexity without delivering an identified product capability.
Anthropic provides official general-purpose SDKs for Claude in multiple languages. These expose the Messages API directly while adding idiomatic interfaces, type safety, streaming support, retries, and error handling. Anthropic separately describes compatibility layers and framework-specific libraries as alternative integration surfaces rather than requirements for ordinary Claude development.
A third-party abstraction becomes rational when there is a genuine requirement for multiple providers, vendor switching, standardized cross-model interfaces, or an existing architectural platform that mandates it. None exists here. Building that flexibility speculatively increases dependencies, debugging surface, version-compatibility work, and the possibility that provider-specific Claude capabilities are hidden behind a lowest-common-denominator API.
A optimizes for hypothetical future requirements. B doubles operational complexity. C creates an even larger maintenance burden.
Relevant Claude Developer topics: Claude App Design, SDK selection, abstraction boundaries, dependency management, YAGNI, integration architecture, and provider portability requirements .
===============
-
-
Question 12
Single answerA teammate has asked you to explain the difference between context engineering and prompt engineering. They have heard the terms used interchangeably and are unsure how each applies to a Claude application that processes long-running multi-step tasks.
How would you describe the distinction?
-
Option A:Correct
Prompt engineering focuses on the model's response, while context engineering focuses on the user's input across many sessions in a long-running multi-step Claude application.
-
Option B:Correct
Prompt engineering is the older term for prompt design, while context engineering is the newer term that has replaced it in modern Claude applications across the industry.
-
Option C:Correct
Prompt engineering shapes individual prompts for specific outputs, while context engineering manages how content flows across turns and steps and takes steps to keep relevant state visible.
-
Option D:Correct
Prompt engineering and context engineering each address content the team gives Claude, but the team can group them under a single workflow because the practices use overlapping techniques.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: C
Explanation
Option C accurately captures Anthropic’s distinction. Prompt engineering primarily concerns how instructions are written, structured, and organized to obtain the desired behavior from a particular model invocation. Techniques include explicit instructions, examples, roles, XML structure, output requirements, and task-specific prompt construction. Context engineering operates at a broader architectural level: it determines which information should actually be present in the model’s context at each inference step.
Anthropic defines prompt engineering as methods for writing and organizing LLM instructions, whereas context engineering encompasses strategies for curating and maintaining the optimal set of tokens during inference. For long-running agents, context can contain system instructions, tools, MCP resources, retrieved documents, prior messages, tool results, summaries, and memory.
This distinction matters because multi-step agents continuously generate new state. Effective systems may prune obsolete results, retrieve information just in time, compact earlier conversation history, isolate subagent contexts, or store persistent state externally. B is incorrect because context engineering has not simply replaced prompt engineering; the two operate at different scopes. A defines context too narrowly, and D obscures an important architectural distinction.
Therefore, C correctly represents Claude Developer coverage of prompt engineering versus context engineering, context curation, agent state, long-horizon workflows, and context-window optimization.
===============
-
-
Question 13
Single answerYou are implementing a custom tool for your Claude agent. The tool needs to interact with an external pricing service that returns product data.
Which of the following best practices would you apply as you develop this tool?
-
Option A:Correct
Omit the tool description and let the model infer when to use the tool based on the tool's name and the rest of the prompt context.
-
Option B:Correct
Define the tool with a loose schema and let the model interpret the inputs flexibly on each call the agent makes.
-
Option C:Correct
Implement the tool with no error handling and let the agent loop catch failures whenever the pricing service returns an error during operation.
-
Option D:Correct
Define the tool with a clear schema, write a precise description for when to call it, and handle pricing service errors explicitly.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: D
Explanation
Option D combines the three key properties of a reliable Claude tool: an explicit contract, clear tool-selection guidance, and controlled execution failure handling. Anthropic's tool documentation defines user tools using a name, detailed description, and JSON input_schema. The description should explain what the tool does, when it should and should not be used, parameter semantics, and relevant limitations. Anthropic emphasizes that precise descriptions materially improve Claude's ability to select the correct tool.
A clear schema prevents ambiguous parameter interpretation and allows validation before calling the external pricing API. Where stronger guarantees are required, Anthropic also supports strict tool use, which constrains generated tool inputs to the declared JSON Schema.
The application's execution layer must also convert pricing-service failures into explicit, handled error paths rather than uncontrolled exceptions. A deprives Claude of critical selection information. B increases malformed-call risk. C delegates infrastructure reliability to the reasoning loop instead of implementing appropriate integration error handling.
Therefore, D represents production-quality custom-tool construction. Relevant Study Guide topics: custom tools, JSON Schema, tool descriptions, validation, external API integration, and error handling.
===============
-
-
Question 14
Single answerA Claude application is producing outputs that drift away from the expected JSON format after several conversation turns. The first few turns produce correctly formatted output, but later turns gradually lose structure.
How would you address the drift?
-
Option A:Correct
Identify the failure mode as format drift, examine how the conversation context evolves over turns, and address the drift through context management or output validation.
-
Option B:Correct
Truncate every response to the first few characters, validate that the truncated output matches the expected JSON structure, and log any mismatches for review.
-
Option C:Correct
Restart the application after every turn and monitor whether the format remains consistent across subsequent interactions.
-
Option D:Correct
Switch to a smaller Claude model and re-test the application to determine whether the drift persists across conversation turns.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A
Explanation
Option A correctly treats this as a context-dependent format drift problem rather than an arbitrary model failure. Because the application initially produces valid JSON and progressively loses structure over subsequent turns, the investigation should focus on how accumulated conversation history changes the instructions and examples visible to Claude. Earlier malformed outputs, conflicting instructions, tool results, or unnecessary historical content can gradually reduce adherence to the intended format.
The application should therefore inspect the conversation state, preserve the authoritative formatting requirement, prune irrelevant content where appropriate, and validate outputs at the application boundary. Anthropic's Structured Outputs capability is specifically designed to prevent malformed structured responses by constraining Claude to a supplied JSON Schema. Official guidance states that Structured Outputs provide valid, parseable, schema-compliant results for downstream processing.
B destroys the response rather than correcting the failure mode. C resets state but prevents meaningful multi-turn operation and does not diagnose why context causes drift. D changes model characteristics without establishing that the model is responsible.
The supplied question on page 12 identifies A as correct. Relevant topics: Agent Architecture, context engineering, format drift, structured outputs, context evolution, schema validation, and long-running conversations.
===============
-
-
Question 15
Single answerA new Claude model release includes performance improvements for several reasoning tasks but has changed the format of its responses to system prompts that use multi-section instructions. Your application uses multi-section system prompts heavily. Initial evaluation on the application's actual workload shows the new model performs 8 percent better on reasoning tasks but produces malformed output on roughly 3 percent of requests because of the format change. The team is debating whether to upgrade.
How would you decide?
-
Option A:Correct
Upgrade immediately, because the 8 percent reasoning improvement outweighs the 3 percent malformed output rate across the application's typical request distribution.
-
Option B:Correct
Adapt the application's system prompt to the new model's format expectations and re-evaluate, then upgrade only if the adapted prompt eliminates the malformed output while preserving the reasoning improvements.
-
Option C:Correct
Upgrade and add a downstream validation step that catches the 3 percent malformed output before it reaches users, treating the validation step as the team's mitigation for the format change.
-
Option D:Correct
Stay on the previous model permanently to avoid the malformed output rate and any future format changes that subsequent model releases might introduce in the application.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
The supplied examination page marks B . The scenario already demonstrates why model upgrades must be treated as evaluated software changes rather than automatic replacements: the new model improves one metric while introducing a regression in another.
Anthropic's official model-selection guidance recommends creating benchmark tests specific to the application's use case, testing models with the application's actual prompts and data, comparing response quality and edge-case performance, and weighing performance against operational tradeoffs. Therefore, the correct action is to adapt the multi-section system prompt to the new model's behavior and repeat the evaluation. Only after the formatting regression is eliminated—or reduced below an explicitly acceptable threshold—should the upgrade proceed.
A incorrectly assumes that an 8% reasoning improvement numerically compensates for a 3% malformed-output rate; these metrics measure different consequences and cannot simply be subtracted. C treats the known incompatibility only downstream instead of first correcting the prompt/model interaction. D permanently rejects future improvement and is inconsistent with controlled lifecycle evolution.
The engineering principle is migration through regression testing and adaptation , not blind upgrading or permanent version avoidance.
Relevant Claude Developer topics: Systems Life Cycle, model migration, regression evaluation, prompt adaptation, compatibility testing, deployment gates, and continuous evolution .
===============
-
-
Question 16
Single answerYour Claude application's outputs are inconsistent in format. The team’s instructions are scattered across the system prompt and user messages, with some instructions stated only once and others repeated.
How would you fix the inconsistency?
-
Option A:Correct
Move all instructions into the user message so the application's behavior is controlled at the input point.
-
Option B:Correct
Consolidate behavioral and format instructions in the system prompt and keep user messages focused on the user's input.
-
Option C:Correct
Place each instruction wherever the developer who first wrote it found most natural, retaining the original intent.
-
Option D:Correct
Repeat all instructions in both the system prompt and the user message so the model sees each instruction more than once.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
Option B creates a clear separation between persistent application instructions and per-request user content. Stable behavioral rules—role, output conventions, formatting constraints, policies, and other instructions intended to apply across requests—belong in the system-level instruction layer. User messages should primarily carry task-specific input and requirements that vary from interaction to interaction.
Anthropic’s Messages API defines the system prompt specifically as the mechanism for providing overarching context and instructions to Claude. Current guidance likewise recommends the top-level system field for instructions that should apply from the beginning of the conversation, while more transient information belongs in conversation messages.
A mixes persistent application behavior with user-controlled content and weakens separation of concerns. C preserves the inconsistent architecture responsible for the problem. D duplicates instructions unnecessarily, wastes context tokens, and increases the possibility that future edits create conflicting versions of the same rule.
Consolidating stable instructions also makes prompts easier to version, evaluate, review, and maintain. Therefore, B is the correct design. Relevant Study Guide topics: system prompts, instruction hierarchy, prompt organization, formatting consistency, separation of concerns, and maintainable prompt construction.
-