Claude Certified Developer - Foundations CCDV-F Practice Test 14
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.
Question 131
A developer encounters this situation: An application retries rate-limited requests instantly from hundreds of workers. What is the MOST appropriate technical response?
- Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content.
- Process the documented streaming event sequence by event type and finalize only on completion.
- Use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors.
- Maintain a registered allowlist of tool schemas and validate returned names and arguments before execution.
Explanation
Correct Answer
C:Use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors. This directly addresses the situation: An application retries rate-limited requests instantly from hundreds of workers. The technical reason is that rate limits and transient failures require controlled retries; permanent client errors should fail fast. Without it, retry storms can magnify outages and increase costs without recovering service. A concrete acceptance check is: Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
Incorrect Answers
A:Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content. This does not repair the current workflow because rate limits and transient failures require controlled retries; permanent client errors should fail fast. The targeted change is use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors.
B:Process the documented streaming event sequence by event type and finalize only on completion. This does not repair the current workflow because rate limits and transient failures require controlled retries; permanent client errors should fail fast. The targeted change is use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors.
D:Maintain a registered allowlist of tool schemas and validate returned names and arguments before execution. This does not repair the current workflow because rate limits and transient failures require controlled retries; permanent client errors should fail fast. The targeted change is use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors.
Question 132
In this situation: A business workflow needs durable branching and checkpoints but uses a stateless loop with no persisted progress. The developer proposes: Match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty. Which principle BEST justifies the approach?
- At-least-once execution patterns require deduplication when actions have external side effects.
- Workflows provide predictable control flow while autonomous agents trade flexibility for added uncertainty and oversight needs.
- Agent memory should preserve decision-relevant state rather than an unbounded history of low-value observations.
- Frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead.
Explanation
Correct Answer
D:Frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. In the given situation, a business workflow needs durable branching and checkpoints but uses a stateless loop with no persisted progress. That consideration supports the measure: Match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty. Ignoring it creates this exposure: Overengineering raises maintenance burden, while underengineering loses recovery state on complex flows. Verify the implementation by checking: A restart test preserves workflow state and the chosen implementation remains auditable at the required complexity.
Incorrect Answers
A:At-least-once execution patterns require deduplication when actions have external side effects. This principle relates to add idempotency and completed-work tracking to subagent/tool handoffs. The observed failure instead depends on frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. The appropriate choice is frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead.
B: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 frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. The appropriate choice is frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead.
C:Agent memory should preserve decision-relevant state rather than an unbounded history of low-value observations. This principle relates to prune tool outputs and maintain concise task state or checkpoints to keep context useful. The observed failure instead depends on frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. The appropriate choice is frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead.
Question 133
This engineering control is missing: "Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements". The reported condition is: An LLM app stores user conversation transcripts indefinitely without consent or access control. What is the most direct failure risk?
- Personal data or credentials may leak through telemetry or unnecessary persistence.
- A malicious document could induce data exfiltration or unauthorized tool calls.
- Unsafe actions can occur before a downstream moderation filter sees the result.
- A leaked key can enable unauthorized API usage and uncontrolled cost or data access.
Explanation
Correct Answer
A:Personal data or credentials may leak through telemetry or unnecessary persistence. This follows from the reported condition: An LLM app stores user conversation transcripts indefinitely without consent or access control. The reason is that aI application privacy depends on data handling throughout ingestion, prompting, logging and retention. The appropriate mitigation is: Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. Evidence of success would be: Log sampling finds no secrets or unauthorized PII and retention tests remove expired records.
Incorrect Answers
B: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 personal data or credentials may leak through telemetry or unnecessary persistence.
C: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 personal data or credentials may leak through telemetry or unnecessary persistence.
D:A leaked key can enable unauthorized API usage and uncontrolled cost or data access. That exposure calls for store Claude credentials in a managed secret store, rotate them, and scope access per deployment or tenant. The scenario here instead risks personal data or credentials may leak through telemetry or unnecessary persistence.
Question 134
To address the situation: A client app crashes when a valid tool-use content block appears in a Messages response. The team implements: "Parse documented typed content blocks and stop reasons rather than flattening responses into text". Which evidence BEST demonstrates success?
- A canary deploy changes one approved setting with traceable version and no secrets in code.
- Fixtures containing text and tool-use blocks are parsed into correct typed application events.
- A clean rebuild reproduces the approved version set and a tested upgrade can roll back.
- Invalid payloads are rejected without side effects and valid schema-conformant commands execute once.
Explanation
Correct Answer
B:Fixtures containing text and tool-use blocks are parsed into correct typed application events. This directly tests the outcome of parse documented typed content blocks and stop reasons rather than flattening responses into text. in the described case: A client app crashes when a valid tool-use content block appears in a Messages response. The underlying principle is that the Messages API carries structured content that must be handled by type and state. If the change is ineffective, tool requests and multi-part results may be lost or misinterpreted by a text-only parser. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A canary deploy changes one approved setting with traceable version and no secrets in code. This outcome would validate centralize versioned configuration, protected secrets and environment-specific deployment settings, not the requested intervention. The required test result is fixtures containing text and tool-use blocks are parsed into correct typed application events.
C:A clean rebuild reproduces the approved version set and a tested upgrade can roll back. This outcome would validate pin tested dependencies and use staged upgrades with regression tests and rollback, not the requested intervention. The required test result is fixtures containing text and tool-use blocks are parsed into correct typed application events.
D:Invalid payloads are rejected without side effects and valid schema-conformant commands execute once. This outcome would validate require structured validated outputs or constrained tool schemas before business-side execution, not the requested intervention. The required test result is fixtures containing text and tool-use blocks are parsed into correct typed application events.
Question 135
This engineering control is missing: "Build a representative held-out evaluation set with measurable correctness criteria and failure categories". The reported condition is: A product rollout uses ad hoc human impressions and has no baseline accuracy or regression record. What is the most direct failure risk?
- Intermittent failures can remain unreproducible or be blamed on the wrong integration layer.
- Overengineering raises maintenance burden, while underengineering loses recovery state on complex flows.
- An update may degrade key user journeys without detection despite an impressive demo.
- Tool failures can leave an agent stuck, silently incomplete or repeatedly calling services.
Explanation
Correct Answer
C:An update may degrade key user journeys without detection despite an impressive demo. This follows from the reported condition: A product rollout uses ad hoc human impressions and has no baseline accuracy or regression record. The reason is that reliable LLM evaluation requires repeatable test cases and metrics rather than cherry-picked demonstrations. The appropriate mitigation is: Build a representative held-out evaluation set with measurable correctness criteria and failure categories. Evidence of success would be: A regression run reports per-category results and detects a deliberately inserted known failure.
Incorrect Answers
A:Intermittent failures can remain unreproducible or be blamed on the wrong integration layer. That exposure calls for capture privacy-safe model/tool traces and reproduce failures with controlled test fixtures. The scenario here instead risks an update may degrade key user journeys without detection despite an impressive demo.
B:Overengineering raises maintenance burden, while underengineering loses recovery state on complex flows. That exposure calls for match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty. The scenario here instead risks an update may degrade key user journeys without detection despite an impressive demo.
D:Tool failures can leave an agent stuck, silently incomplete or repeatedly calling services. That exposure calls for implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness. The scenario here instead risks an update may degrade key user journeys without detection despite an impressive demo.
Question 136
This engineering control is missing: "Match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty". The reported condition is: A team selects a heavyweight graph framework for a two-step API lookup and response. What is the most direct failure risk?
- Prompt injection in retrieved results may redirect the agent into unauthorized execution.
- Context bloat can increase costs, truncation and inconsistent task completion.
- Retries or duplicate delegations can create multiple charges or inconsistent records.
- Overengineering raises maintenance burden, while underengineering loses recovery state on complex flows.
Explanation
Correct Answer
D:Overengineering raises maintenance burden, while underengineering loses recovery state on complex flows. This follows from the reported condition: A team selects a heavyweight graph framework for a two-step API lookup and response. The reason is that frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. The appropriate mitigation is: Match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty. Evidence of success would be: A restart test preserves workflow state and the chosen implementation remains auditable at the required complexity.
Incorrect Answers
A:Prompt injection in retrieved results may redirect the agent into unauthorized execution. That exposure calls for pass tool results as lower-trust data and enforce tool authorization in the application layer. The scenario here instead risks overengineering raises maintenance burden, while underengineering loses recovery state on complex flows.
B:Context bloat can increase costs, truncation and inconsistent task completion. That exposure calls for prune tool outputs and maintain concise task state or checkpoints to keep context useful. The scenario here instead risks overengineering raises maintenance burden, while underengineering loses recovery state on complex flows.
C:Retries or duplicate delegations can create multiple charges or inconsistent records. That exposure calls for add idempotency and completed-work tracking to subagent/tool handoffs. The scenario here instead risks overengineering raises maintenance burden, while underengineering loses recovery state on complex flows.
Question 137
This engineering control is missing: "Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks". The reported condition is: A TypeScript API server blocks an event loop while waiting for multiple Claude calls. What is the most direct failure risk?
- Serial calls increase latency, while unconstrained fan-out exhausts limits and connections.
- Model selection by name alone can overpay or underperform on important workflows.
- Hidden transport failures can be misinterpreted as model quality problems.
- Credential exposure or repeated unauthorized requests can disrupt service and incur security risk.
Explanation
Correct Answer
A:Serial calls increase latency, while unconstrained fan-out exhausts limits and connections. This follows from the reported condition: A TypeScript API server blocks an event loop while waiting for multiple Claude calls. The reason is that nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. The appropriate mitigation is: Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks. Evidence of success would be: A load test shows bounded parallelism, proper cancellation and stable latency under normal traffic.
Incorrect Answers
B: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 serial calls increase latency, while unconstrained fan-out exhausts limits and connections.
C: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 serial calls increase latency, while unconstrained fan-out exhausts limits and connections.
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 serial calls increase latency, while unconstrained fan-out exhausts limits and connections.
Question 138
In this situation: A developer treats Claude SDK abstractions as if they replace all HTTP semantics. The developer proposes: Understand the SDK as a wrapper around documented API operations and preserve typed errors/usage metadata. Which principle BEST justifies the approach?
- Nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe.
- Client libraries simplify transport but do not remove network failure modes, auth or API contracts.
- Connection models should match directional and state requirements rather than be chosen for novelty.
- Generative models can vary their output even for similar inputs; application correctness needs explicit checks.
Explanation
Correct Answer
B:Client libraries simplify transport but do not remove network failure modes, auth or API contracts. In the given situation, a developer treats Claude SDK abstractions as if they replace all HTTP semantics. That consideration supports the measure: Understand the SDK as a wrapper around documented API operations and preserve typed errors/usage metadata. Ignoring it creates this exposure: Hidden transport failures can be misinterpreted as model quality problems. Verify the implementation by checking: A simulated HTTP failure emerges as the expected SDK error with a traceable request ID.
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 client libraries simplify transport but do not remove network failure modes, auth or API contracts. The appropriate choice is client libraries simplify transport but do not remove network failure modes, auth or API contracts.
C:Connection models should match directional and state requirements rather than be chosen for novelty. This principle relates to select request/response HTTP, streaming, or persistent connections based on the real interaction pattern. The observed failure instead depends on client libraries simplify transport but do not remove network failure modes, auth or API contracts. The appropriate choice is client libraries simplify transport but do not remove network failure modes, auth or API contracts.
D:Generative models can vary their output even for similar inputs; application correctness needs explicit checks. This principle relates to evaluate stochastic model output with repeated trials and constrain tasks through validation and clear requirements. The observed failure instead depends on client libraries simplify transport but do not remove network failure modes, auth or API contracts. The appropriate choice is client libraries simplify transport but do not remove network failure modes, auth or API contracts.
Question 139
This engineering control is missing: "Use task difficulty and measured confidence to route work to an appropriate model or escalation path". The reported condition is: A routing system never escalates difficult or uncertain tasks to a more capable model. What is the most direct failure risk?
- Silent model change can break output contracts or downstream user experience.
- A chat feature can exceed budget without an owner or per-route cost alert.
- Hard tasks may fail under an underpowered model while easy tasks waste premium capacity.
- Model selection by name alone can overpay or underperform on important workflows.
Explanation
Correct Answer
C:Hard tasks may fail under an underpowered model while easy tasks waste premium capacity. This follows from the reported condition: A routing system never escalates difficult or uncertain tasks to a more capable model. The reason is that different requests require different capability budgets; selective routing balances efficiency and quality. The appropriate mitigation is: Use task difficulty and measured confidence to route work to an appropriate model or escalation path. Evidence of success would be: Evaluation shows difficult cases are escalated and routine tasks meet cost targets.
Incorrect Answers
A:Silent model change can break output contracts or downstream user experience. That exposure calls for pin or deliberately version model selections and run regression tests during model changes. The scenario here instead risks hard tasks may fail under an underpowered model while easy tasks waste premium capacity.
B: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 hard tasks may fail under an underpowered model while easy tasks waste premium capacity.
D: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 hard tasks may fail under an underpowered model while easy tasks waste premium capacity.
Question 140
This engineering control is missing: "Bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation". The reported condition is: A chatbot loops through tools indefinitely when a web retrieval returns unhelpful content. What is the most direct failure risk?
- A compromised research context could trigger unauthorized payment changes if tools share excessive authority.
- Retries or duplicate delegations can create multiple charges or inconsistent records.
- Prompt injection in retrieved results may redirect the agent into unauthorized execution.
- Runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
Explanation
Correct Answer
D:Runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations. This follows from the reported condition: A chatbot loops through tools indefinitely when a web retrieval returns unhelpful content. The reason is that autonomous tool loops require termination criteria and explicit limits for predictable operational cost and safety. The appropriate mitigation is: Bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation. Evidence of success would be: A simulated unresolvable task stops within limits and creates a clear escalation record.
Incorrect Answers
A:A compromised research context could trigger unauthorized payment changes if tools share excessive authority. That exposure calls for separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization. The scenario here instead risks runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
B:Retries or duplicate delegations can create multiple charges or inconsistent records. That exposure calls for add idempotency and completed-work tracking to subagent/tool handoffs. The scenario here instead risks runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
C:Prompt injection in retrieved results may redirect the agent into unauthorized execution. That exposure calls for pass tool results as lower-trust data and enforce tool authorization in the application layer. The scenario here instead risks runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.