Claude Certified Developer - Foundations CCDV-F Practice Test 38
Question 370
To address the situation: An application retries rate-limited requests instantly from hundreds of workers. The team implements: "Use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors". Which evidence BEST demonstrates success?
- Negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
- Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
- Recorded event fixtures reconstruct the same final message as the nonstreaming response.
- A test tool request executes only after authorization and a matching result lets the assistant finish.
Explanation
Correct Answer
B:Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests. This directly tests the outcome of use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors. in the described case: An application retries rate-limited requests instantly from hundreds of workers. The underlying principle is that rate limits and transient failures require controlled retries; permanent client errors should fail fast. If the change is ineffective, retry storms can magnify outages and increase costs without recovering service. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:Negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable. This outcome would validate validate HTTP status, content types and JSON response contracts before processing API results, not the requested intervention. The required test result is fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
C:Recorded event fixtures reconstruct the same final message as the nonstreaming response. This outcome would validate process the documented streaming event sequence by event type and finalize only on completion, not the requested intervention. The required test result is fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
D:A test tool request executes only after authorization and a matching result lets the assistant finish. This outcome would validate inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output, not the requested intervention. The required test result is fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
Question 371
In this situation: A multi-tenant chat assistant logs raw prompts containing personal data and API keys. The developer proposes: Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. Which principle BEST justifies the approach?
- Prompt injection exploits lower-trust text being promoted to trusted operational instructions.
- Secrets are authentication material that should not be exposed in source code or shared beyond required scope.
- AI application privacy depends on data handling throughout ingestion, prompting, logging and retention.
- Deterministic hooks provide an enforceable checkpoint around risky tool execution.
Explanation
Correct Answer
C:AI application privacy depends on data handling throughout ingestion, prompting, logging and retention. In the given situation, a multi-tenant chat assistant logs raw prompts containing personal data and API keys. That consideration supports the measure: Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. Ignoring it creates this exposure: Personal data or credentials may leak through telemetry or unnecessary persistence. Verify the implementation by checking: Log sampling finds no secrets or unauthorized PII and retention tests remove expired records.
Incorrect Answers
A:Prompt injection exploits lower-trust text being promoted to trusted operational instructions. This principle relates to treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately. The observed failure instead depends on AI application privacy depends on data handling throughout ingestion, prompting, logging and retention. The appropriate choice is AI application privacy depends on data handling throughout ingestion, prompting, logging and retention.
B:Secrets are authentication material that should not be exposed in source code or shared beyond required scope. This principle relates to store Claude credentials in a managed secret store, rotate them, and scope access per deployment or tenant. The observed failure instead depends on AI application privacy depends on data handling throughout ingestion, prompting, logging and retention. The appropriate choice is AI application privacy depends on data handling throughout ingestion, prompting, logging and retention.
D:Deterministic hooks provide an enforceable checkpoint around risky tool execution. This principle relates to add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence. The observed failure instead depends on AI application privacy depends on data handling throughout ingestion, prompting, logging and retention. The appropriate choice is AI application privacy depends on data handling throughout ingestion, prompting, logging and retention.
Question 372
A developer encounters this situation: A regulated application has a self-hosted tool environment but engineers select a hosted agent without examining data flow. What is the MOST appropriate technical response?
- Implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness.
- Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries.
- Add idempotency and completed-work tracking to subagent/tool handoffs.
- Choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility.
Explanation
Correct Answer
D:Choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility. This directly addresses the situation: A regulated application has a self-hosted tool environment but engineers select a hosted agent without examining data flow. The technical reason is that agent hosting models change who controls execution state, logs and network or data access. Without it, a mismatched hosting choice can violate data boundaries or leave critical execution controls unavailable. A concrete acceptance check is: A design test confirms data paths, tool permissions and log ownership match the approved deployment constraints.
Incorrect Answers
A:Implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness. This does not repair the current workflow because agent hosting models change who controls execution state, logs and network or data access. The targeted change is choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility.
B:Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries. This does not repair the current workflow because agent hosting models change who controls execution state, logs and network or data access. The targeted change is choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility.
C:Add idempotency and completed-work tracking to subagent/tool handoffs. This does not repair the current workflow because agent hosting models change who controls execution state, logs and network or data access. The targeted change is choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility.
Question 373
This engineering control is missing: "Store Claude credentials in a managed secret store, rotate them, and scope access per deployment or tenant". The reported condition is: A cloud service shares one production API key across unrelated tenants and environments. What is the most direct failure risk?
- A leaked key can enable unauthorized API usage and uncontrolled cost or data access.
- Unsafe actions can occur before a downstream moderation filter sees the result.
- A malicious document could induce data exfiltration or unauthorized tool calls.
- A prompt-based warning may fail to stop a harmful command from running.
Explanation
Correct Answer
A:A leaked key can enable unauthorized API usage and uncontrolled cost or data access. This follows from the reported condition: A cloud service shares one production API key across unrelated tenants and environments. The reason is that secrets are authentication material that should not be exposed in source code or shared beyond required scope. The appropriate mitigation is: Store Claude credentials in a managed secret store, rotate them, and scope access per deployment or tenant. Evidence of success would be: Secret scanning finds no embedded keys, rotated credentials work, and revoked credentials fail.
Incorrect Answers
B:Unsafe actions can occur before a downstream moderation filter sees the result. That exposure calls for layer input, tool-execution and output checks with human approval for sensitive side effects. The scenario here instead risks A leaked key can enable unauthorized API usage and uncontrolled cost or data access.
C:A malicious document could induce data exfiltration or unauthorized tool calls. That exposure calls for treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately. The scenario here instead risks A leaked key can enable unauthorized API usage and uncontrolled cost or data access.
D:A prompt-based warning may fail to stop a harmful command from running. That exposure calls for add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence. The scenario here instead risks A leaked key can enable unauthorized API usage and uncontrolled cost or data access.
Question 374
In this situation: A CI pipeline deploys an integration even though tests for timeout and malformed JSON were skipped. The developer proposes: Use version control, code review and automated contract plus failure-mode tests for integration changes. Which principle BEST justifies the approach?
- Operational auditing needs identifiers and metering to diagnose failures and allocate model costs.
- API integration safety depends on regression tests for behavior at service boundaries.
- Reliable distributed workflows separate durable state from transient worker memory.
- The Messages API carries structured content that must be handled by type and state.
Explanation
Correct Answer
B:API integration safety depends on regression tests for behavior at service boundaries. In the given situation, a CI pipeline deploys an integration even though tests for timeout and malformed JSON were skipped. That consideration supports the measure: Use version control, code review and automated contract plus failure-mode tests for integration changes. Ignoring it creates this exposure: Minor refactors can silently break downstream consumers or error handling. Verify the implementation by checking: CI rejects malformed responses in tests and approves only validated changes.
Incorrect Answers
A: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 API integration safety depends on regression tests for behavior at service boundaries. The appropriate choice is API integration safety depends on regression tests for behavior at service boundaries.
C:Reliable distributed workflows separate durable state from transient worker memory. This principle relates to persist necessary workflow checkpoints and reconcile completed actions during restarts. The observed failure instead depends on API integration safety depends on regression tests for behavior at service boundaries. The appropriate choice is API integration safety depends on regression tests for behavior at service boundaries.
D: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 API integration safety depends on regression tests for behavior at service boundaries. The appropriate choice is API integration safety depends on regression tests for behavior at service boundaries.
Question 375
To address the situation: An AI product has no per-feature token accounting and cannot explain a billing spike. The team implements: "Track input/output tokens and model, cache and batch usage per operation with privacy-safe reporting". Which evidence BEST demonstrates success?
- Usage metrics show cache reads or reduced eligible prefix processing without mixing user-specific data.
- A benchmark shows required accuracy within agreed latency and token budgets for each task class.
- A controlled usage sample yields predictable accounting and an actionable budget alert.
- An unseen held-out sample follows the intended schema and policy without relying on memorized examples.
Explanation
Correct Answer
C:A controlled usage sample yields predictable accounting and an actionable budget alert. This directly tests the outcome of track input/output tokens and model, cache and batch usage per operation with privacy-safe reporting. in the described case: An AI product has no per-feature token accounting and cannot explain a billing spike. The underlying principle is that cost attribution requires measured usage and explicit prices rather than assumptions about response length. If the change is ineffective, a chat feature can exceed budget without an owner or per-route cost alert. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:Usage metrics show cache reads or reduced eligible prefix processing without mixing user-specific data. This outcome would validate apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits, not the requested intervention. The required test result is A controlled usage sample yields predictable accounting and an actionable budget alert.
B:A benchmark shows required accuracy within agreed latency and token budgets for each task class. This outcome would validate choose appropriate thinking or effort settings based on task complexity, latency and budget constraints, not the requested intervention. The required test result is A controlled usage sample yields predictable accounting and an actionable budget alert.
D:An unseen held-out sample follows the intended schema and policy without relying on memorized examples. This outcome would validate use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious, not the requested intervention. The required test result is A controlled usage sample yields predictable accounting and an actionable budget alert.
Question 376
A developer encounters this situation: Incident responders cannot correlate a failed model call because request identifiers were discarded. What is the MOST appropriate technical response?
- Parse documented typed content blocks and stop reasons rather than flattening responses into text.
- Design timeouts, bounded retry, graceful degradation and explicit failure responses for Claude-dependent features.
- Use reusable supported SDK or HTTP clients with connection management and nonblocking I/O.
- Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content.
Explanation
Correct Answer
D:Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content. This directly addresses the situation: Incident responders cannot correlate a failed model call because request identifiers were discarded. The technical reason is that observability must preserve operational diagnostics without turning logs into a data-leak channel. Without it, credentials or personal data can be exposed in log storage, or incidents can be impossible to trace. A concrete acceptance check is: Sample traces correlate request IDs and error types without including keys or protected prompt content.
Incorrect Answers
A:Parse documented typed content blocks and stop reasons rather than flattening responses into text. This does not repair the current workflow because observability must preserve operational diagnostics without turning logs into a data-leak channel. The targeted change is log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content.
B:Design timeouts, bounded retry, graceful degradation and explicit failure responses for Claude-dependent features. This does not repair the current workflow because observability must preserve operational diagnostics without turning logs into a data-leak channel. The targeted change is log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content.
C:Use reusable supported SDK or HTTP clients with connection management and nonblocking I/O. This does not repair the current workflow because observability must preserve operational diagnostics without turning logs into a data-leak channel. The targeted change is log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content.
Question 377
A developer encounters this situation: A model-facing service accepts untrusted markdown containing instructions to modify system settings. What is the MOST appropriate technical response?
- Separate trusted system/developer instructions from untrusted input and validate any requested tool execution.
- Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern.
- Use supported streaming events with explicit lifecycle, partial-render and finalization handling.
- Use idempotency keys or a verified deduplication record around side-effecting operations.
Explanation
Correct Answer
A:Separate trusted system/developer instructions from untrusted input and validate any requested tool execution. This directly addresses the situation: A model-facing service accepts untrusted markdown containing instructions to modify system settings. The technical reason is that prompt and data channels have different trust levels, and source documents must not override application rules. Without it, a hostile document may persuade the model to reveal policy or call disallowed tools. A concrete acceptance check is: Prompt-injection tests on uploaded content cannot bypass tool authorization or leak restricted values.
Incorrect Answers
B:Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. This does not repair the current workflow because prompt and data channels have different trust levels, and source documents must not override application rules. The targeted change is separate trusted system/developer instructions from untrusted input and validate any requested tool execution.
C:Use supported streaming events with explicit lifecycle, partial-render and finalization handling. This does not repair the current workflow because prompt and data channels have different trust levels, and source documents must not override application rules. The targeted change is separate trusted system/developer instructions from untrusted input and validate any requested tool execution.
D:Use idempotency keys or a verified deduplication record around side-effecting operations. This does not repair the current workflow because prompt and data channels have different trust levels, and source documents must not override application rules. The targeted change is separate trusted system/developer instructions from untrusted input and validate any requested tool execution.
Question 378
A developer encounters this situation: A client app crashes when a valid tool-use content block appears in a Messages response. What is the MOST appropriate technical response?
- Use version control, code review and automated contract plus failure-mode tests for integration changes.
- Parse documented typed content blocks and stop reasons rather than flattening responses into text.
- Validate HTTP status, content types and JSON response contracts before processing API results.
- Separate trusted system/developer instructions from untrusted input and validate any requested tool execution.
Explanation
Correct Answer
B:Parse documented typed content blocks and stop reasons rather than flattening responses into text. This directly addresses the situation: A client app crashes when a valid tool-use content block appears in a Messages response. The technical reason is that the Messages API carries structured content that must be handled by type and state. Without it, tool requests and multi-part results may be lost or misinterpreted by a text-only parser. A concrete acceptance check is: Fixtures containing text and tool-use blocks are parsed into correct typed application events.
Incorrect Answers
A:Use version control, code review and automated contract plus failure-mode tests for integration changes. This does not repair the current workflow because the Messages API carries structured content that must be handled by type and state. The targeted change is parse documented typed content blocks and stop reasons rather than flattening responses into text.
C:Validate HTTP status, content types and JSON response contracts before processing API results. This does not repair the current workflow because the Messages API carries structured content that must be handled by type and state. The targeted change is parse documented typed content blocks and stop reasons rather than flattening responses into text.
D:Separate trusted system/developer instructions from untrusted input and validate any requested tool execution. This does not repair the current workflow because the Messages API carries structured content that must be handled by type and state. The targeted change is parse documented typed content blocks and stop reasons rather than flattening responses into text.
Question 379
In this situation: A document-processing assistant follows user-supplied markdown commands to reveal internal templates. The developer proposes: Separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly. Which principle BEST justifies the approach?
- Syntactic JSON validity is necessary but insufficient for safe application state changes.
- Specific, noncontradictory instructions reduce interpretation ambiguity and make validation possible.
- Prompt hierarchy and data delineation help prevent lower-trust content from becoming policy.
- Examples shape model behavior, so coverage and label accuracy matter more than raw prompt length.
Explanation
Correct Answer
C:Prompt hierarchy and data delineation help prevent lower-trust content from becoming policy. In the given situation, a document-processing assistant follows user-supplied markdown commands to reveal internal templates. That consideration supports the measure: Separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly. Ignoring it creates this exposure: Prompt injection may redirect behavior or induce unauthorized disclosure. Verify the implementation by checking: A malicious embedded instruction is treated as data, not an executable task directive.
Incorrect Answers
A:Syntactic JSON validity is necessary but insufficient for safe application state changes. This principle relates to validate structured model outputs against strict schema and business rules before use. The observed failure instead depends on prompt hierarchy and data delineation help prevent lower-trust content from becoming policy. The appropriate choice is prompt hierarchy and data delineation help prevent lower-trust content from becoming policy.
B:Specific, noncontradictory instructions reduce interpretation ambiguity and make validation possible. This principle relates to give clear role, task, constraints and explicit output contract with consistent examples where helpful. The observed failure instead depends on prompt hierarchy and data delineation help prevent lower-trust content from becoming policy. The appropriate choice is prompt hierarchy and data delineation help prevent lower-trust content from becoming policy.
D:Examples shape model behavior, so coverage and label accuracy matter more than raw prompt length. This principle relates to curate representative, consistent few-shot examples and evaluate against held-out cases. The observed failure instead depends on prompt hierarchy and data delineation help prevent lower-trust content from becoming policy. The appropriate choice is prompt hierarchy and data delineation help prevent lower-trust content from becoming policy.
Question 380
In this situation: A streaming client reconstructs invalid tool arguments because it concatenates typed deltas as plain text. 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.
- Model tool requests are distinct content and require client-side orchestration to supply results correctly.
- Resource-conscious client design prevents connection exhaustion and event-loop stalls in API services.
- 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 streaming client reconstructs invalid tool arguments because it concatenates typed deltas as plain text. 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:Model tool requests are distinct content and require client-side orchestration to supply results correctly. This principle relates to inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output. 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:Resource-conscious client design prevents connection exhaustion and event-loop stalls in API services. This principle relates to use reusable supported SDK or HTTP clients with connection management and nonblocking I/O. 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.