Claude Certified Developer - Foundations CCDV-F Practice Test 13
Question 120
In this situation: A service opens streaming responses but cannot distinguish message start, content delta and final usage events. The developer proposes: Process the documented streaming event sequence by event type and finalize only on completion. Which principle BEST justifies the approach?
- Conversation continuity depends on the application supplying relevant history or state in each request.
- Token limits can terminate generation before a logically complete response.
- The Messages API carries structured content that must be handled by type and state.
- Streaming requires preserving event structure and ordering, including tool and usage metadata.
Explanation
Correct Answer
D:Streaming requires preserving event structure and ordering, including tool and usage metadata. In the given situation, a service opens streaming responses but cannot distinguish message start, content delta and final usage events. That consideration supports the measure: Process the documented streaming event sequence by event type and finalize only on completion. Ignoring it creates this exposure: The UI or tool handler can assemble malformed content and act on partial arguments. Verify the implementation by checking: Recorded event fixtures reconstruct the same final message as the nonstreaming response.
Incorrect Answers
A:Conversation continuity depends on the application supplying relevant history or state in each request. This principle relates to persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. The observed failure instead depends on streaming requires preserving event structure and ordering, including tool and usage metadata. The appropriate choice is streaming requires preserving event structure and ordering, including tool and usage metadata.
B:Token limits can terminate generation before a logically complete response. This principle relates to validate output length and stop reason; retry or redesign output constraints when truncation occurs. The observed failure instead depends on streaming requires preserving event structure and ordering, including tool and usage metadata. The appropriate choice is streaming requires preserving event structure and ordering, including tool and usage metadata.
C:The Messages API carries structured content that must be handled by type and state. This principle relates to parse documented typed content blocks and stop reasons rather than flattening responses into text. The observed failure instead depends on streaming requires preserving event structure and ordering, including tool and usage metadata. The appropriate choice is streaming requires preserving event structure and ordering, including tool and usage metadata.
Question 121
To address the situation: A developer expects a fast model to solve long multi-step research with the same reliability as a larger model. The team implements: "Use task difficulty and measured confidence to route work to an appropriate model or escalation path". Which evidence BEST demonstrates success?
- Evaluation shows difficult cases are escalated and routine tasks meet cost targets.
- A representative evaluation records quality, p95 latency and cost before selecting a model.
- A representative interaction meets reliability/latency targets with no orphaned connection state.
- An upgrade canary passes contract and task evaluations with an available rollback path.
Explanation
Correct Answer
A:Evaluation shows difficult cases are escalated and routine tasks meet cost targets. This directly tests the outcome of use task difficulty and measured confidence to route work to an appropriate model or escalation path. in the described case: A developer expects a fast model to solve long multi-step research with the same reliability as a larger model. The underlying principle is that different requests require different capability budgets; selective routing balances efficiency and quality. If the change is ineffective, hard tasks may fail under an underpowered model while easy tasks waste premium capacity. A configuration checkbox alone is insufficient proof.
Incorrect Answers
B:A representative evaluation records quality, p95 latency and cost before selecting a model. This outcome would validate benchmark suitable Claude model tiers for quality, latency and price on the application's actual tasks, not the requested intervention. The required test result is evaluation shows difficult cases are escalated and routine tasks meet cost targets.
C:A representative interaction meets reliability/latency targets with no orphaned connection state. This outcome would validate select request/response HTTP, streaming, or persistent connections based on the real interaction pattern, not the requested intervention. The required test result is evaluation shows difficult cases are escalated and routine tasks meet cost targets.
D:An upgrade canary passes contract and task evaluations with an available rollback path. This outcome would validate pin or deliberately version model selections and run regression tests during model changes, not the requested intervention. The required test result is evaluation shows difficult cases are escalated and routine tasks meet cost targets.
Question 122
A developer encounters this situation: An application assumes a JSON-looking response always parses and never validates types or required fields. What is the MOST appropriate technical response?
- Separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly.
- Validate structured model outputs against strict schema and business rules before use.
- Curate representative, consistent few-shot examples and evaluate against held-out cases.
- Check factual claims and citations against accessible source evidence with an explicit uncertainty path.
Explanation
Correct Answer
B:Validate structured model outputs against strict schema and business rules before use. This directly addresses the situation: An application assumes a JSON-looking response always parses and never validates types or required fields. The technical reason is that syntactic JSON validity is necessary but insufficient for safe application state changes. Without it, malformed or out-of-range fields can trigger incorrect actions or crashes. A concrete acceptance check is: Invalid values are rejected before side effects and valid cases pass typed parsing.
Incorrect Answers
A:Separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly. This does not repair the current workflow because syntactic JSON validity is necessary but insufficient for safe application state changes. The targeted change is validate structured model outputs against strict schema and business rules before use.
C:Curate representative, consistent few-shot examples and evaluate against held-out cases. This does not repair the current workflow because syntactic JSON validity is necessary but insufficient for safe application state changes. The targeted change is validate structured model outputs against strict schema and business rules before use.
D:Check factual claims and citations against accessible source evidence with an explicit uncertainty path. This does not repair the current workflow because syntactic JSON validity is necessary but insufficient for safe application state changes. The targeted change is validate structured model outputs against strict schema and business rules before use.
Question 123
A developer encounters this situation: A user uploads a document containing disguised tool commands that contradict developer policy. What is the MOST appropriate technical response?
- Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements.
- Layer input, tool-execution and output checks with human approval for sensitive side effects.
- Treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately.
- Add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence.
Explanation
Correct Answer
C:Treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately. This directly addresses the situation: A user uploads a document containing disguised tool commands that contradict developer policy. The technical reason is that prompt injection exploits lower-trust text being promoted to trusted operational instructions. Without it, a malicious document could induce data exfiltration or unauthorized tool calls. A concrete acceptance check is: Red-team fixtures cannot cross tool authorization boundaries or extract secrets.
Incorrect Answers
A:Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. This does not repair the current workflow because prompt injection exploits lower-trust text being promoted to trusted operational instructions. The targeted change is treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately.
B:Layer input, tool-execution and output checks with human approval for sensitive side effects. This does not repair the current workflow because prompt injection exploits lower-trust text being promoted to trusted operational instructions. The targeted change is treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately.
D:Add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence. This does not repair the current workflow because prompt injection exploits lower-trust text being promoted to trusted operational instructions. The targeted change is treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately.
Question 124
To address the situation: A single agent is asked to search policy, transform data and approve payments with unrestricted tools. The team implements: "Separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization". Which evidence BEST demonstrates success?
- A simulated unresolvable task stops within limits and creates a clear escalation record.
- A multi-step test stays within budget while retaining key constraints and completed steps.
- An unapproved tool request is rejected by code and logged even when the model asks to run it.
- An adversarial research input cannot invoke payment tools, while an authorized approval path still works.
Explanation
Correct Answer
D:An adversarial research input cannot invoke payment tools, while an authorized approval path still works. This directly tests the outcome of separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization. in the described case: A single agent is asked to search policy, transform data and approve payments with unrestricted tools. The underlying principle is that decomposing specialized responsibilities creates clear tool permissions and reduces cross-task privilege confusion. If the change is ineffective, a compromised research context could trigger unauthorized payment changes if tools share excessive authority. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A simulated unresolvable task stops within limits and creates a clear escalation record. This outcome would validate bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation, not the requested intervention. The required test result is an adversarial research input cannot invoke payment tools, while an authorized approval path still works.
B:A multi-step test stays within budget while retaining key constraints and completed steps. This outcome would validate prune tool outputs and maintain concise task state or checkpoints to keep context useful, not the requested intervention. The required test result is an adversarial research input cannot invoke payment tools, while an authorized approval path still works.
C:An unapproved tool request is rejected by code and logged even when the model asks to run it. This outcome would validate keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint, not the requested intervention. The required test result is an adversarial research input cannot invoke payment tools, while an authorized approval path still works.
Question 125
To address the situation: An engineer assumes model tool definitions make permissions safe without enforcing requested arguments. The team implements: "Maintain a registered allowlist of tool schemas and validate returned names and arguments before execution". Which evidence BEST demonstrates success?
- Tests with unknown tool names or invalid arguments are rejected without side effects.
- Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
- A test call yields correlated request metadata and measured token consumption without leaking prompt content.
- Cross-tenant negative tests are denied before documents enter model context.
Explanation
Correct Answer
A:Tests with unknown tool names or invalid arguments are rejected without side effects. This directly tests the outcome of maintain a registered allowlist of tool schemas and validate returned names and arguments before execution. in the described case: An engineer assumes model tool definitions make permissions safe without enforcing requested arguments. The underlying principle is that tool descriptions guide model behavior but actual invocation authority remains in client code. If the change is ineffective, unvalidated tool calls may execute unauthorized operations or crash an integration. A configuration checkbox alone is insufficient proof.
Incorrect Answers
B:Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests. This outcome would validate use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors, not the requested intervention. The required test result is tests with unknown tool names or invalid arguments are rejected without side effects.
C:A test call yields correlated request metadata and measured token consumption without leaking prompt content. This outcome would validate capture provider request IDs, token usage and model metadata in privacy-safe telemetry, not the requested intervention. The required test result is tests with unknown tool names or invalid arguments are rejected without side effects.
D:Cross-tenant negative tests are denied before documents enter model context. This outcome would validate enforce tenant identity, authorization and retrieval filtering before data is supplied to the model, not the requested intervention. The required test result is tests with unknown tool names or invalid arguments are rejected without side effects.
Question 126
A developer encounters this situation: A tool advertises a vague name like run_task and the model sends mismatched arguments. What is the MOST appropriate technical response?
- Choose built-in tools, Skills, custom functions or MCP integration based on reuse, ownership and capability requirements.
- Define precise tool descriptions and validated JSON argument schemas with narrow capabilities.
- Authorize tool name, arguments and caller identity before performing any side effect.
- Return typed, bounded, sanitized tool results with explicit errors and retry metadata.
Explanation
Correct Answer
B:Define precise tool descriptions and validated JSON argument schemas with narrow capabilities. This directly addresses the situation: A tool advertises a vague name like run_task and the model sends mismatched arguments. The technical reason is that a clear tool contract helps model selection while code-side validation keeps execution within allowed types. Without it, ambiguous or unchecked arguments can invoke an unintended operation or injection path. A concrete acceptance check is: Invalid tool arguments fail safely and valid documented requests map to one expected operation.
Incorrect Answers
A:Choose built-in tools, Skills, custom functions or MCP integration based on reuse, ownership and capability requirements. This does not repair the current workflow because a clear tool contract helps model selection while code-side validation keeps execution within allowed types. The targeted change is define precise tool descriptions and validated JSON argument schemas with narrow capabilities.
C:Authorize tool name, arguments and caller identity before performing any side effect. This does not repair the current workflow because a clear tool contract helps model selection while code-side validation keeps execution within allowed types. The targeted change is define precise tool descriptions and validated JSON argument schemas with narrow capabilities.
D:Return typed, bounded, sanitized tool results with explicit errors and retry metadata. This does not repair the current workflow because a clear tool contract helps model selection while code-side validation keeps execution within allowed types. The targeted change is define precise tool descriptions and validated JSON argument schemas with narrow capabilities.
Question 127
To address the situation: A developer sends only the latest follow-up and expects Claude to recall details not included in the request. The team implements: "Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern". Which evidence BEST demonstrates success?
- Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
- Tests with unknown tool names or invalid arguments are rejected without side effects.
- A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent.
- Prompt-injection tests on uploaded content cannot bypass tool authorization or leak restricted values.
Explanation
Correct Answer
C:A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent. This directly tests the outcome of persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. in the described case: A developer sends only the latest follow-up and expects Claude to recall details not included in the request. The underlying principle is that conversation continuity depends on the application supplying relevant history or state in each request. If the change is ineffective, the model may answer without critical prior constraints or invent missing context. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests. This outcome would validate use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors, not the requested intervention. The required test result is A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent.
B:Tests with unknown tool names or invalid arguments are rejected without side effects. This outcome would validate maintain a registered allowlist of tool schemas and validate returned names and arguments before execution, not the requested intervention. The required test result is A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent.
D:Prompt-injection tests on uploaded content cannot bypass tool authorization or leak restricted values. This outcome would validate separate trusted system/developer instructions from untrusted input and validate any requested tool execution, not the requested intervention. The required test result is A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent.
Question 128
In this situation: A developer sends only the latest follow-up and expects Claude to recall details not included in the request. The developer proposes: Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. Which principle BEST justifies the approach?
- REST clients must handle status codes and payload structure as separate error conditions.
- Operational auditing needs identifiers and metering to diagnose failures and allocate model costs.
- Batch APIs can improve throughput and cost for nonurgent independent workloads but require asynchronous completion handling.
- Conversation continuity depends on the application supplying relevant history or state in each request.
Explanation
Correct Answer
D:Conversation continuity depends on the application supplying relevant history or state in each request. In the given situation, a developer sends only the latest follow-up and expects Claude to recall details not included in the request. That consideration supports the measure: Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. Ignoring it creates this exposure: The model may answer without critical prior constraints or invent missing context. Verify the implementation by checking: A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent.
Incorrect Answers
A:REST clients must handle status codes and payload structure as separate error conditions. This principle relates to validate HTTP status, content types and JSON response contracts before processing API results. The observed failure instead depends on conversation continuity depends on the application supplying relevant history or state in each request. The appropriate choice is conversation continuity depends on the application supplying relevant history or state in each request.
B:Operational auditing needs identifiers and metering to diagnose failures and allocate model costs. This principle relates to capture provider request IDs, token usage and model metadata in privacy-safe telemetry. The observed failure instead depends on conversation continuity depends on the application supplying relevant history or state in each request. The appropriate choice is conversation continuity depends on the application supplying relevant history or state in each request.
C:Batch APIs can improve throughput and cost for nonurgent independent workloads but require asynchronous completion handling. This principle relates to select supported batch processing where appropriate and monitor batch lifecycle and individual results. The observed failure instead depends on conversation continuity depends on the application supplying relevant history or state in each request. The appropriate choice is conversation continuity depends on the application supplying relevant history or state in each request.
Question 129
In this situation: A support app mixes stale search snippets with current knowledge and presents unsupported confidence. The developer proposes: Build retrieval with provenance-aware citations and grounded-answer validation before presenting claims. Which principle BEST justifies the approach?
- RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference.
- API correctness depends on matching the current endpoint contract for messages, model and token limits.
- Streaming can improve perceived latency only if the application consumes and renders events correctly.
- Prompt and data channels have different trust levels, and source documents must not override application rules.
Explanation
Correct Answer
A:RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference. In the given situation, a support app mixes stale search snippets with current knowledge and presents unsupported confidence. That consideration supports the measure: Build retrieval with provenance-aware citations and grounded-answer validation before presenting claims. Ignoring it creates this exposure: Users may act on invented or outdated instructions when retrieval provenance is missing. Verify the implementation by checking: A held-out query returns a supported answer citing only documents actually retrieved for that query.
Incorrect Answers
B:API correctness depends on matching the current endpoint contract for messages, model and token limits. This principle relates to use documented Messages API request fields and supported client SDK methods with schema validation. The observed failure instead depends on RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference. The appropriate choice is RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference.
C:Streaming can improve perceived latency only if the application consumes and renders events correctly. This principle relates to use supported streaming events with explicit lifecycle, partial-render and finalization handling. The observed failure instead depends on RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference. The appropriate choice is RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference.
D:Prompt and data channels have different trust levels, and source documents must not override application rules. This principle relates to separate trusted system/developer instructions from untrusted input and validate any requested tool execution. The observed failure instead depends on RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference. The appropriate choice is RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference.
Question 130
To address the situation: A product team assumes every completion ends naturally and ignores max_tokens stop reasons. The team implements: "Validate output length and stop reason; retry or redesign output constraints when truncation occurs". Which evidence BEST demonstrates success?
- Cross-tenant negative tests are denied before documents enter model context.
- A constrained-output test detects truncation and prevents accepting incomplete JSON.
- Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
- Tests with unknown tool names or invalid arguments are rejected without side effects.
Explanation
Correct Answer
B:A constrained-output test detects truncation and prevents accepting incomplete JSON. This directly tests the outcome of validate output length and stop reason; retry or redesign output constraints when truncation occurs. in the described case: A product team assumes every completion ends naturally and ignores max_tokens stop reasons. The underlying principle is that token limits can terminate generation before a logically complete response. If the change is ineffective, a partial or invalid answer can corrupt downstream parsing or display. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:Cross-tenant negative tests are denied before documents enter model context. This outcome would validate enforce tenant identity, authorization and retrieval filtering before data is supplied to the model, not the requested intervention. The required test result is A constrained-output test detects truncation and prevents accepting incomplete JSON.
C:Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests. This outcome would validate use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors, not the requested intervention. The required test result is A constrained-output test detects truncation and prevents accepting incomplete JSON.
D:Tests with unknown tool names or invalid arguments are rejected without side effects. This outcome would validate maintain a registered allowlist of tool schemas and validate returned names and arguments before execution, not the requested intervention. The required test result is A constrained-output test detects truncation and prevents accepting incomplete JSON.