Claude Certified Developer - Foundations CCDV-F Practice Test 41
Question 400
In this situation: A staging service sends requests with missing authorization headers and retries every rejection. The developer proposes: Configure authenticated requests, secret rotation and clear failure handling in the SDK/client. Which principle BEST justifies the approach?
- Nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe.
- Different requests require different capability budgets; selective routing balances efficiency and quality.
- Client libraries simplify transport but do not remove network failure modes, auth or API contracts.
- Claude API access depends on correctly scoped credentials and explicit authentication failures.
Explanation
Correct Answer
D:Claude API access depends on correctly scoped credentials and explicit authentication failures. In the given situation, a staging service sends requests with missing authorization headers and retries every rejection. That consideration supports the measure: Configure authenticated requests, secret rotation and clear failure handling in the SDK/client. Ignoring it creates this exposure: Credential exposure or repeated unauthorized requests can disrupt service and incur security risk. Verify the implementation by checking: Rotated credentials work without code changes and invalid keys produce a bounded clear error.
Incorrect Answers
A:Nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. This principle relates to use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks. The observed failure instead depends on claude API access depends on correctly scoped credentials and explicit authentication failures. The appropriate choice is claude API access depends on correctly scoped credentials and explicit authentication failures.
B:Different requests require different capability budgets; selective routing balances efficiency and quality. This principle relates to use task difficulty and measured confidence to route work to an appropriate model or escalation path. The observed failure instead depends on claude API access depends on correctly scoped credentials and explicit authentication failures. The appropriate choice is claude API access depends on correctly scoped credentials and explicit authentication failures.
C:Client libraries simplify transport but do not remove network failure modes, auth or API contracts. This principle relates to understand the SDK as a wrapper around documented API operations and preserve typed errors/usage metadata. The observed failure instead depends on claude API access depends on correctly scoped credentials and explicit authentication failures. The appropriate choice is claude API access depends on correctly scoped credentials and explicit authentication failures.
Question 401
This engineering control is missing: "Select request/response HTTP, streaming, or persistent connections based on the real interaction pattern". The reported condition is: A realtime application adds a websocket even though only one short reply is required per request. What is the most direct failure risk?
- Unnecessary persistent sockets add complexity, while polling can waste resources and lose events.
- Serial calls increase latency, while unconstrained fan-out exhausts limits and connections.
- Overspending on trivial tasks or under-allocating difficult analysis can harm cost and quality.
- Credential exposure or repeated unauthorized requests can disrupt service and incur security risk.
Explanation
Correct Answer
A:Unnecessary persistent sockets add complexity, while polling can waste resources and lose events. This follows from the reported condition: A realtime application adds a websocket even though only one short reply is required per request. The reason is that connection models should match directional and state requirements rather than be chosen for novelty. The appropriate mitigation is: Select request/response HTTP, streaming, or persistent connections based on the real interaction pattern. Evidence of success would be: A representative interaction meets reliability/latency targets with no orphaned connection state.
Incorrect Answers
B:Serial calls increase latency, while unconstrained fan-out exhausts limits and connections. That exposure calls for use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks. The scenario here instead risks unnecessary persistent sockets add complexity, while polling can waste resources and lose events.
C:Overspending on trivial tasks or under-allocating difficult analysis can harm cost and quality. That exposure calls for choose appropriate thinking or effort settings based on task complexity, latency and budget constraints. The scenario here instead risks unnecessary persistent sockets add complexity, while polling can waste resources and lose events.
D:Credential exposure or repeated unauthorized requests can disrupt service and incur security risk. That exposure calls for configure authenticated requests, secret rotation and clear failure handling in the SDK/client. The scenario here instead risks unnecessary persistent sockets add complexity, while polling can waste resources and lose events.
Question 402
To address the situation: A client accepts arbitrary tool names returned in a response even if no corresponding registered tool exists. The team implements: "Maintain a registered allowlist of tool schemas and validate returned names and arguments before execution". Which evidence BEST demonstrates success?
- CI rejects malformed responses in tests and approves only validated changes.
- Tests with unknown tool names or invalid arguments are rejected without side effects.
- A representative batch completes with every input mapped to its output and failed items accounted for.
- A constrained-output test detects truncation and prevents accepting incomplete JSON.
Explanation
Correct Answer
B: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: A client accepts arbitrary tool names returned in a response even if no corresponding registered tool exists. 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
A:CI rejects malformed responses in tests and approves only validated changes. This outcome would validate use version control, code review and automated contract plus failure-mode tests for integration changes, not the requested intervention. The required test result is tests with unknown tool names or invalid arguments are rejected without side effects.
C:A representative batch completes with every input mapped to its output and failed items accounted for. This outcome would validate select supported batch processing where appropriate and monitor batch lifecycle and individual results, not the requested intervention. The required test result is tests with unknown tool names or invalid arguments are rejected without side effects.
D:A constrained-output test detects truncation and prevents accepting incomplete JSON. This outcome would validate validate output length and stop reason; retry or redesign output constraints when truncation occurs, not the requested intervention. The required test result is tests with unknown tool names or invalid arguments are rejected without side effects.
Question 403
This engineering control is missing: "Persist necessary workflow checkpoints and reconcile completed actions during restarts". The reported condition is: A long-running developer workflow stores ephemeral task state only in one process memory. What is the most direct failure risk?
- Minor refactors can silently break downstream consumers or error handling.
- Unreviewed library updates can break production API clients unexpectedly.
- A restart can lose progress or duplicate external mutations.
- Jobs can be lost or cost more when the wrong execution mode is used.
Explanation
Correct Answer
C:A restart can lose progress or duplicate external mutations. This follows from the reported condition: A long-running developer workflow stores ephemeral task state only in one process memory. The reason is that reliable distributed workflows separate durable state from transient worker memory. The appropriate mitigation is: Persist necessary workflow checkpoints and reconcile completed actions during restarts. Evidence of success would be: A worker restart resumes from the recorded checkpoint without replaying completed actions.
Incorrect Answers
A:Minor refactors can silently break downstream consumers or error handling. That exposure calls for use version control, code review and automated contract plus failure-mode tests for integration changes. The scenario here instead risks A restart can lose progress or duplicate external mutations.
B:Unreviewed library updates can break production API clients unexpectedly. That exposure calls for pin tested dependencies and use staged upgrades with regression tests and rollback. The scenario here instead risks A restart can lose progress or duplicate external mutations.
D:Jobs can be lost or cost more when the wrong execution mode is used. That exposure calls for select supported batch processing where appropriate and monitor batch lifecycle and individual results. The scenario here instead risks A restart can lose progress or duplicate external mutations.
Question 404
A developer encounters this situation: A document-processing assistant follows user-supplied markdown commands to reveal internal templates. What is the MOST appropriate technical response?
- Curate representative, consistent few-shot examples and evaluate against held-out cases.
- Give clear role, task, constraints and explicit output contract with consistent examples where helpful.
- Prune low-value tool outputs and preserve a compact summary of goals, decisions and remaining work.
- Separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly.
Explanation
Correct Answer
D:Separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly. This directly addresses the situation: A document-processing assistant follows user-supplied markdown commands to reveal internal templates. The technical reason is that prompt hierarchy and data delineation help prevent lower-trust content from becoming policy. Without it, prompt injection may redirect behavior or induce unauthorized disclosure. A concrete acceptance check is: A malicious embedded instruction is treated as data, not an executable task directive.
Incorrect Answers
A:Curate representative, consistent few-shot examples and evaluate against held-out cases. This does not repair the current workflow because prompt hierarchy and data delineation help prevent lower-trust content from becoming policy. The targeted change is separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly.
B:Give clear role, task, constraints and explicit output contract with consistent examples where helpful. This does not repair the current workflow because prompt hierarchy and data delineation help prevent lower-trust content from becoming policy. The targeted change is separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly.
C:Prune low-value tool outputs and preserve a compact summary of goals, decisions and remaining work. This does not repair the current workflow because prompt hierarchy and data delineation help prevent lower-trust content from becoming policy. The targeted change is separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly.
Question 405
In this situation: A planning agent relies on a prompt to prevent an unauthorized action but the harness never checks permissions. The developer proposes: Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. Which principle BEST justifies the approach?
- The agent's model output is a proposal; the hosting system must validate and enforce authorized actions.
- Tool outputs are untrusted observations, not elevated user or system instructions.
- Workflows provide predictable control flow while autonomous agents trade flexibility for added uncertainty and oversight needs.
- Frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead.
Explanation
Correct Answer
A:The agent's model output is a proposal; the hosting system must validate and enforce authorized actions. In the given situation, a planning agent relies on a prompt to prevent an unauthorized action but the harness never checks permissions. That consideration supports the measure: Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. Ignoring it creates this exposure: A prompt-injected suggestion could cross a trust boundary if the app executes it without validation. Verify the implementation by checking: An unapproved tool request is rejected by code and logged even when the model asks to run it.
Incorrect Answers
B:Tool outputs are untrusted observations, not elevated user or system instructions. This principle relates to pass tool results as lower-trust data and enforce tool authorization in the application layer. The observed failure instead depends on the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. The appropriate choice is the agent's model output is a proposal; the hosting system must validate and enforce authorized actions.
C:Workflows provide predictable control flow while autonomous agents trade flexibility for added uncertainty and oversight needs. This principle relates to use a deterministic workflow for fixed tasks and reserve autonomous agent loops for genuinely dynamic decisions. The observed failure instead depends on the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. The appropriate choice is the agent's model output is a proposal; the hosting system must validate and enforce authorized actions.
D:Frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. This principle relates to match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty. The observed failure instead depends on the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. The appropriate choice is the agent's model output is a proposal; the hosting system must validate and enforce authorized actions.
Question 406
To address the situation: A cross-functional incident bot chooses tools using only free-form model text without defined tool schemas. The team implements: "Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint". Which evidence BEST demonstrates success?
- An adversarial research input cannot invoke payment tools, while an authorized approval path still works.
- An unapproved tool request is rejected by code and logged even when the model asks to run it.
- The workflow produces consistent step traces and enforces the required approval order on representative invoices.
- A multi-step test stays within budget while retaining key constraints and completed steps.
Explanation
Correct Answer
B:An unapproved tool request is rejected by code and logged even when the model asks to run it. This directly tests the outcome of keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. in the described case: A cross-functional incident bot chooses tools using only free-form model text without defined tool schemas. The underlying principle is that the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. If the change is ineffective, a prompt-injected suggestion could cross a trust boundary if the app executes it without validation. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:An adversarial research input cannot invoke payment tools, while an authorized approval path still works. This outcome would validate separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization, not the requested intervention. The required test result is an unapproved tool request is rejected by code and logged even when the model asks to run it.
C:The workflow produces consistent step traces and enforces the required approval order on representative invoices. This outcome would validate use a deterministic workflow for fixed tasks and reserve autonomous agent loops for genuinely dynamic decisions, not the requested intervention. The required test result is an unapproved tool request is rejected by code and logged even when the model asks to run it.
D: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 unapproved tool request is rejected by code and logged even when the model asks to run it.
Question 407
This engineering control is missing: "Validate output length and stop reason; retry or redesign output constraints when truncation occurs". The reported condition is: A developer sets max_tokens too low and truncates a JSON response mid-object. What is the most direct failure risk?
- Malformed responses can become incorrect API mutations or broken user workflows.
- Retry storms can magnify outages and increase costs without recovering service.
- A partial or invalid answer can corrupt downstream parsing or display.
- Tool-dependent tasks may end incomplete or return an unfulfilled action description.
Explanation
Correct Answer
C:A partial or invalid answer can corrupt downstream parsing or display. This follows from the reported condition: A developer sets max_tokens too low and truncates a JSON response mid-object. The reason is that token limits can terminate generation before a logically complete response. The appropriate mitigation is: Validate output length and stop reason; retry or redesign output constraints when truncation occurs. Evidence of success would be: A constrained-output test detects truncation and prevents accepting incomplete JSON.
Incorrect Answers
A:Malformed responses can become incorrect API mutations or broken user workflows. That exposure calls for require structured validated outputs or constrained tool schemas before business-side execution. The scenario here instead risks A partial or invalid answer can corrupt downstream parsing or display.
B:Retry storms can magnify outages and increase costs without recovering service. That exposure calls for use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors. The scenario here instead risks A partial or invalid answer can corrupt downstream parsing or display.
D:Tool-dependent tasks may end incomplete or return an unfulfilled action description. That exposure calls for inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output. The scenario here instead risks A partial or invalid answer can corrupt downstream parsing or display.
Question 408
This engineering control is missing: "Apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits". The reported condition is: Repeated requests include the same long immutable instructions and reference catalog but use no prompt caching. What is the most direct failure risk?
- A chat feature can exceed budget without an owner or per-route cost alert.
- Hidden transport failures can be misinterpreted as model quality problems.
- Model selection by name alone can overpay or underperform on important workflows.
- Unnecessary repeated context processing raises token cost and time to first response.
Explanation
Correct Answer
D:Unnecessary repeated context processing raises token cost and time to first response. This follows from the reported condition: Repeated requests include the same long immutable instructions and reference catalog but use no prompt caching. The reason is that caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. The appropriate mitigation is: Apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits. Evidence of success would be: Usage metrics show cache reads or reduced eligible prefix processing without mixing user-specific data.
Incorrect Answers
A:A chat feature can exceed budget without an owner or per-route cost alert. That exposure calls for track input/output tokens and model, cache and batch usage per operation with privacy-safe reporting. The scenario here instead risks unnecessary repeated context processing raises token cost and time to first response.
B:Hidden transport failures can be misinterpreted as model quality problems. That exposure calls for understand the SDK as a wrapper around documented API operations and preserve typed errors/usage metadata. The scenario here instead risks unnecessary repeated context processing raises token cost and time to first response.
C:Model selection by name alone can overpay or underperform on important workflows. That exposure calls for benchmark suitable Claude model tiers for quality, latency and price on the application's actual tasks. The scenario here instead risks unnecessary repeated context processing raises token cost and time to first response.
Question 409
In this situation: A long-running developer workflow stores ephemeral task state only in one process memory. The developer proposes: Persist necessary workflow checkpoints and reconcile completed actions during restarts. Which principle BEST justifies the approach?
- Reliable distributed workflows separate durable state from transient worker memory.
- API correctness depends on matching the current endpoint contract for messages, model and token limits.
- Reproducible software builds require controlled dependency versions and compatibility gates.
- API integration safety depends on regression tests for behavior at service boundaries.
Explanation
Correct Answer
A:Reliable distributed workflows separate durable state from transient worker memory. In the given situation, a long-running developer workflow stores ephemeral task state only in one process memory. That consideration supports the measure: Persist necessary workflow checkpoints and reconcile completed actions during restarts. Ignoring it creates this exposure: A restart can lose progress or duplicate external mutations. Verify the implementation by checking: A worker restart resumes from the recorded checkpoint without replaying completed actions.
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 reliable distributed workflows separate durable state from transient worker memory. The appropriate choice is reliable distributed workflows separate durable state from transient worker memory.
C:Reproducible software builds require controlled dependency versions and compatibility gates. This principle relates to pin tested dependencies and use staged upgrades with regression tests and rollback. The observed failure instead depends on reliable distributed workflows separate durable state from transient worker memory. The appropriate choice is reliable distributed workflows separate durable state from transient worker memory.
D:API integration safety depends on regression tests for behavior at service boundaries. This principle relates to use version control, code review and automated contract plus failure-mode tests for integration changes. The observed failure instead depends on reliable distributed workflows separate durable state from transient worker memory. The appropriate choice is reliable distributed workflows separate durable state from transient worker memory.
Question 410
This engineering control is missing: "Evaluate stochastic model output with repeated trials and constrain tasks through validation and clear requirements". The reported condition is: A chatbot generates inconsistent wording and operations mistakes when random sampling is left uncontrolled. What is the most direct failure risk?
- Credential exposure or repeated unauthorized requests can disrupt service and incur security risk.
- Assuming deterministic text can make fragile parsers or policies fail unpredictably.
- Requests may exceed supported context or be truncated despite apparently short word counts.
- A vague or contradictory prompt can produce inconsistent fields or invalid classifications.
Explanation
Correct Answer
B:Assuming deterministic text can make fragile parsers or policies fail unpredictably. This follows from the reported condition: A chatbot generates inconsistent wording and operations mistakes when random sampling is left uncontrolled. The reason is that generative models can vary their output even for similar inputs; application correctness needs explicit checks. The appropriate mitigation is: Evaluate stochastic model output with repeated trials and constrain tasks through validation and clear requirements. Evidence of success would be: Repeated fixture runs satisfy the same structured behavioral contract despite wording differences.
Incorrect Answers
A:Credential exposure or repeated unauthorized requests can disrupt service and incur security risk. That exposure calls for configure authenticated requests, secret rotation and clear failure handling in the SDK/client. The scenario here instead risks assuming deterministic text can make fragile parsers or policies fail unpredictably.
C:Requests may exceed supported context or be truncated despite apparently short word counts. That exposure calls for budget input and output tokens using the selected model's tokenization and context limits. The scenario here instead risks assuming deterministic text can make fragile parsers or policies fail unpredictably.
D:A vague or contradictory prompt can produce inconsistent fields or invalid classifications. That exposure calls for use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious. The scenario here instead risks assuming deterministic text can make fragile parsers or policies fail unpredictably.