A teammate has asked why your Claude application sometimes produces a response that includes the prompt text repeated back, and other times produces a response with the prompt text rephrased. They suspect a bug in the application's request construction. How would you respond?
Correct Answer: B
Option B reflects the fundamental generative behavior of large language models. Claude does not retrieve a fixed response template for a given prompt. Instead, it generates the response incrementally, selecting subsequent tokens according to the probability distribution produced by the model. Consequently, semantically equivalent runs can differ in wording, ordering, whether prompt language is quoted, and whether it is paraphrased. Anthropic's API documentation explicitly describes sampling parameters as controlling randomness in subsequent-token selection and also states that even configurations intended to minimize randomness do not make output completely deterministic. Current Claude model generations increasingly manage sampling internally, but the underlying principle remains: generative output is not guaranteed to be textually identical across equivalent calls. Therefore, seeing the original prompt echoed in one response and paraphrased in another does not, by itself, demonstrate malformed request construction. A real request-construction problem should instead be established through traces showing different system instructions, messages, parameters, or context. A, C, and D incorrectly infer specific implementation faults without supporting evidence. The supplied question identifies B as the correct response. Relevant topics: SW Eng Foundations, token generation, sampling, nondeterminism, debugging, and model behavior.
CCDV-F Exam Question 7
A 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?
Correct Answer: A
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.
CCDV-F Exam Question 8
A 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?
Correct Answer: C
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.
CCDV-F Exam Question 9
Your Claude application processes 50-page legal contracts and produces summaries with citation references back to the source. The team is debating whether to send each contract whole or split it into smaller pieces. The contracts fit within Claude's context window. Initial testing shows that whole-document processing produces summaries with stronger cross-section reasoning but occasionally drifts on citation accuracy in later sections. Chunked processing produces stronger citation accuracy per chunk but loses cross-section reasoning. The team has not decided which property matters more. How would you guide the team's decision?
Correct Answer: B
B is correct because the architecture cannot be chosen intelligently until the team defines which quality attribute is more important to the actual business use case . The examination source explicitly selects B. Whole-document and chunked processing each perform better on different dimensions, so there is no universally superior option. Anthropic's evaluation guidance emphasizes defining concrete success criteria first and validating candidate approaches against representative examples. The correct sequence is therefore to determine whether cross- section reasoning or citation precision is the more critical requirement, establish measurable acceptance thresholds, and evaluate both strategies on representative legal contracts. Anthropic's legal summarization guidance also confirms that chunking or meta-summarization is useful for long documents, while acknowledging that processing an entire document can be appropriate when it fits within Claude's context window. For citations specifically, Anthropic provides native citation support that chunks document text into citation-addressable units and improves source-grounded citation behavior. A and C each privilege one quality dimension before establishing business priority. D focuses on cost and latency even though the unresolved problem is quality tradeoff. Relevant Claude Developer topics: Understanding Reqs, success criteria, requirement prioritization, long- context processing, chunking, citation accuracy, cross-document reasoning, representative evaluations, and architecture tradeoffs .
CCDV-F Exam Question 10
You are setting up a Claude application that requires API keys for several external services. What is the best way to store the keys?
Correct Answer: B
Option B follows standard secrets-management practice and Anthropic's explicit guidance for API credentials. API keys are authentication secrets and should not be embedded in source code or committed to repositories. Anthropic's authentication documentation explicitly recommends storing API keys in a secrets manager, rotating them periodically, and revoking credentials suspected of compromise. Anthropic SDKs can load Claude credentials from environment variables such as ANTHROPIC_API_KEY, allowing the secret to be injected at runtime instead of compiled into the application. The same principle applies to external service credentials used by a Claude application. Development, staging, and production should normally receive independently scoped credentials through the deployment environment or secret-management infrastructure. A creates a high-probability credential leak because repository history can retain secrets even after a later deletion. C violates isolation and least privilege by sharing credentials across services and users. D uses email as an uncontrolled secret-distribution channel and creates inconsistent manual configuration. Therefore, B supplies credentials only at runtime while keeping them outside source control and enabling rotation and environment-specific access. Relevant Study Guide topics: API-key management, secrets managers, environment configuration, credential rotation, least privilege, and secure configuration.