Anthropic CCDV-F (Claude Certified Developer - Foundations) Practice Test 31

Question 300

A generated report stops mid-section solely because it reached the configured generation limit. Which of these alternatives serves the stated goal?

  1. Prune stale tool outputs from long histories
  2. Set an explicit max_tokens budget
  3. Continue after max_tokens when appropriate
  4. Resubmit relevant history for a follow-up

Explanation

Correct Answer

C:

The application treats a truncated completion differently from an intentional end and safely continues if possible; the implementation must still recognize that delivering a partial JSON document as complete would break downstream parsing.

Incorrect Answers

A:

Context management keeps decisive evidence while removing redundant or obsolete tool text; in contrast, the application treats a truncated completion differently from an intentional end and safely continues if possible, while blindly dropping the only record of a permission decision can change subsequent behavior.

B:

The request parameter limits output generation independently from the size of the prompt; this addresses a separate concern, not the fact that the application treats a truncated completion differently from an intentional end and safely continues if possible; a larger max_tokens value does not expand the model's input context window.

D:

The stateless API needs the prior context supplied again or reconstructed by the app; the missing capability is more specific: the application treats a truncated completion differently from an intentional end and safely continues if possible; separate requests do not automatically share private conversational state.

Question 301

A team needs a repeatable instruction to draft an engineering incident summary, with no external action. What should the team do at this decision point?

  1. Prefer MCP for cross-client discovery
  2. Prefer a prompt template for pure language guidance
  3. Prefer API middleware for organization-wide policies
  4. Create a project Skill for recurring checks

Explanation

Correct Answer

B:

A maintained prompt template provides reusable text behavior without operating a tool; the important constraint is that creating an executable integration would add complexity to a text-only requirement.

Incorrect Answers

A:

MCP standardizes discovery and execution interfaces across participating clients, whereas the requirement calls for another behavior: a maintained prompt template provides reusable text behavior without operating a tool; standard interfaces do not automatically secure individual backends.

C:

Shared middleware or gateway controls enforce cross-cutting service rules centrally; the requirement instead turns on this behavior: a maintained prompt template provides reusable text behavior without operating a tool; an MCP server would not by itself govern unrelated direct inference requests.

D:

Skill content packages reusable instructions and supporting guidance for the task; this cannot substitute for the behavior that a maintained prompt template provides reusable text behavior without operating a tool, because the project must still provide actual tests and tools needed to perform the checks.

Question 302

Small prompts and huge prompts have different throughput footprints even at the same requests per minute. What is the most suitable pattern?

  1. Escape output for its destination context
  2. Measure both request and token rates
  3. Respect retry-after guidance when available
  4. Cap the number of concurrent requests

Explanation

Correct Answer

B:

Capacity planning accounts for relevant request, input, and output token budgets, although counting only completed HTTP calls can miss token-based constraints.

Incorrect Answers

A:

Context-aware escaping prevents text from becoming active script or HTML; the needed capability is different—capacity planning accounts for relevant request, input, and output token budgets—and JSON escaping is not interchangeable with HTML or SQL escaping.

C:

Retry scheduling honors the provider's feedback and avoids synchronized hammering; however, the critical mechanism here is that capacity planning accounts for relevant request, input, and output token budgets, and relying only on fixed zero-delay retries is counterproductive.

D:

A concurrency pool smooths demand and limits rate-limit errors; the requirement instead turns on this behavior: capacity planning accounts for relevant request, input, and output token budgets; throughput capacity and latency vary by model and account limits.

Question 303

A multi-step transfer should not leave half the financial records updated when one operation fails. What would best address the stated failure mode?

  1. Validate generated action arguments server-side
  2. Use transaction controls for critical writes
  3. Require explicit confirmation for irreversible actions
  4. Audit privileged changes with actor attribution

Explanation

Correct Answer

B:

Atomic transactions or compensating workflows preserve business consistency across approved changes; model reasoning does not guarantee database rollback.

Incorrect Answers

A:

Backend checks enforce type, range, scope, and approval before any mutation; by comparison, the intended solution relies on this: atomic transactions or compensating workflows preserve business consistency across approved changes; the model's fluent output is not an authoritative business validation result.

C:

A confirmation gate makes the consequential action a separate authorized decision, whereas the requirement calls for another behavior: atomic transactions or compensating workflows preserve business consistency across approved changes; interpreting ordinary conversational intent as final approval can cause unintended deletion.

D:

An audit trail connects the principal, approved operation, target, and result; however, the critical mechanism here is that atomic transactions or compensating workflows preserve business consistency across approved changes, and a text summary by the model is not sufficient evidence of a committed security change.

Question 304

An assistant must request a customer lookup using a machine-readable argument contract. Which action most directly closes the gap?

  1. Register a client tool with input_schema
  2. Send tool_result in a following user message
  3. Store response metadata with the trace
  4. Handle multiple tool_use blocks as separate requests

Explanation

Correct Answer

A:

Tool definitions describe names, parameters, and types so Claude can propose structured calls; in production, defining a schema does not grant access to an external system automatically.

Incorrect Answers

B:

The reply associates content with the tool_use identifier in the continued message history; the needed capability is different—tool definitions describe names, parameters, and types so Claude can propose structured calls—and a standalone text string is not the protocol-level tool result envelope.

C:

Structured metadata and correlation records provide context for debugging and cost attribution, whereas the requirement calls for another behavior: tool definitions describe names, parameters, and types so Claude can propose structured calls; logging only the visible answer removes information needed to identify stop or usage anomalies.

D:

The dispatcher processes and maps every permitted call by its own identifier before continuation; however, the critical mechanism here is that tool definitions describe names, parameters, and types so Claude can propose structured calls, and returning a result for only one requested call leaves unresolved tool work.

Question 305

A GET-like retrieval helper sees intermittent network resets but permanent validation errors are also possible. What would best address the stated failure mode?

  1. Distinguish model-call retry from tool-action replay
  2. Attach an idempotency token to a business write
  3. Retry only failures considered transient
  4. Centralize retry policy in shared middleware

Explanation

Correct Answer

C:

A retry policy classifies failure causes and retries only the recoverable subset, although repeating all failures indiscriminately can amplify outages and costs.

Incorrect Answers

A:

Separating generation retries from durable side-effect records avoids duplicate tool execution; by comparison, the intended solution relies on this: a retry policy classifies failure causes and retries only the recoverable subset; model text has no transactional guarantee that would make action replays harmless.

B:

Stable operation identity lets the transactional endpoint suppress duplicate side effects; the needed capability is different—a retry policy classifies failure causes and retries only the recoverable subset—and randomizing the token on every retry defeats the protection.

D:

Shared policy consistently classifies errors and applies bounded retries across services; however, the critical mechanism here is that a retry policy classifies failure causes and retries only the recoverable subset, and it must still allow endpoint-specific rules for unsafe side effects.

Question 306

A customer-facing backend connects to the Claude API through the public internet and occasionally sees both malformed-request responses and temporary upstream failures. Which TWO measures cover transport protection and error-specific recovery? Choose TWO.

  1. Use request timeouts for bounded waits
  2. Use HTTPS for remote model requests
  3. Use an official SDK for conventional API calls
  4. Use connection reuse for frequent calls
  5. Use retry-aware HTTP error handling

Explanation

Correct Answers

B:

TLS protects data in transit against passive interception and many tampering threats—with this limitation: encryption does not substitute for caller authentication or payload minimization.

E:

Status classification drives different responses for transient and permanent errors, subject to this requirement: blindly retrying invalid JSON does not improve correctness.

Incorrect Answers

A:

Client networking deadlines convert unbounded waits into controlled failures; however, the critical mechanism here is that TLS protects data in transit against passive interception and many tampering threats, and a model token cap does not constrain socket wait times.

C:

A supported client library wraps the underlying service API and common network details; this cannot substitute for the behavior that TLS protects data in transit against passive interception and many tampering threats, because the SDK does not decide business-level retries or permissions automatically.

D:

Persistent connections reduce repeated connection setup overhead; in contrast, TLS protects data in transit against passive interception and many tampering threats, while pool sizing still has to respect concurrency and upstream rate limits.

Question 307

A request fails after a configuration copied from a different Claude model. Which solution matches the actual constraint?

  1. Use a lighter reasoning configuration for trivial tasks
  2. Benchmark thinking settings with task-specific tests
  3. Use a more exploratory sampling setting when supported
  4. Verify model thinking compatibility

Explanation

Correct Answer

D:

The integrator checks supported thinking parameters for the chosen version and request mode—with this limitation: feature names and modes can differ between model releases.

Incorrect Answers

A:

Lower effort on supported models is appropriate for a narrowly specified routine transformation; the needed capability is different—the integrator checks supported thinking parameters for the chosen version and request mode—and under-allocation can hurt difficult exceptions, so evaluate the change.

B:

Controlled quality and latency measurements show whether the chosen task benefits, whereas the requirement calls for another behavior: the integrator checks supported thinking parameters for the chosen version and request mode; assuming maximal thinking is universally optimal wastes resources.

C:

Sampling parameters can trade predictability for variety in compatible model modes; however, the critical mechanism here is that the integrator checks supported thinking parameters for the chosen version and request mode, and increased randomness may degrade factual precision and schema reliability.

Question 308

A multi-step customer investigation needs one controller that assigns sub-tasks and combines their findings. Which action most directly closes the gap?

  1. Use a single supervising agent
  2. Use a specialist subagent
  3. Use deterministic code for a known calculation
  4. Use a model-directed agent loop

Explanation

Correct Answer

A:

A supervisor holds the overall objective and coordinates narrower workers through explicit handoffs—with this limitation: its instructions and budget must prevent cycles and duplicate work among workers.

Incorrect Answers

B:

An isolated worker handles a bounded analysis and returns a concise finding to the parent; this cannot substitute for the behavior that a supervisor holds the overall objective and coordinates narrower workers through explicit handoffs, because the subagent still needs a scoped tool set and cannot silently inherit unlimited production privileges.

C:

Ordinary code computes the numerical result repeatably rather than trusting text generation for arithmetic; in contrast, a supervisor holds the overall objective and coordinates narrower workers through explicit handoffs, while a language model may describe the calculation but should not be its financial source of truth.

D:

Claude selects an action after observing each result, with the application enforcing iteration and permission limits; this addresses a separate concern, not the fact that a supervisor holds the overall objective and coordinates narrower workers through explicit handoffs; the autonomy adds variability and demands hard budgets, logs, and a stopping policy.

Question 309

Each request contains stable reference rules followed by a different user's question. What is the best fit for the described situation?

  1. Choose cache TTL based on reuse interval
  2. Place reusable material before per-user content
  3. Cache a stable shared prompt prefix
  4. Correct a malformed request before resubmission

Explanation

Correct Answer

B:

Organizing requests into a shared prefix and variable suffix improves the chance of cache hits; a crucial qualification is that if the variable field appears before a checkpoint, the hashed prefix changes per request.

Incorrect Answers

A:

A supported longer-duration cache may suit reuse that occurs after the default window; here, the controlling capability is that organizing requests into a shared prefix and variable suffix improves the chance of cache hits, but longer cache writes can cost more, so economics depend on actual hit frequency.

C:

Prompt caching can reuse an identical eligible prefix instead of reprocessing it fully on every call; by comparison, the intended solution relies on this: organizing requests into a shared prefix and variable suffix improves the chance of cache hits; changing text or tool definitions ahead of the checkpoint can invalidate prefix reuse.

D:

Client-side schema validation fixes the payload and prevents fruitless retries; the needed capability is different—organizing requests into a shared prefix and variable suffix improves the chance of cache hits—and a network backoff cannot make an invalid request body well formed.

Question 310

An API conversation replay bug promotes a past customer message to the system-instruction field and unexpectedly overrides the product policy. Which technical control is appropriate?

  1. Restart with a concise summary when context is exhausted
  2. Supply alternating conversation turns in messages
  3. Resubmit relevant history for a follow-up
  4. Preserve message roles when reconstructing API conversation history

Explanation

Correct Answer

D:

Role-preserving serialization separates historical user content from trusted system instructions and assistant turns; in production, resubmitting raw text without trusted role metadata can change instruction authority across requests.

Incorrect Answers

A:

Compaction retains goals, commitments, and key evidence in less context before the next call; this addresses a separate concern, not the fact that role-preserving serialization separates historical user content from trusted system instructions and assistant turns; summarization can lose details, so critical structured state remains in application storage.

B:

Request messages carry explicit user and assistant roles because the API does not automatically retain prior chat state; here, the controlling capability is that role-preserving serialization separates historical user content from trusted system instructions and assistant turns, but omitting history makes follow-up references ambiguous unless reintroduced elsewhere.

C:

The stateless API needs the prior context supplied again or reconstructed by the app; the missing capability is more specific: role-preserving serialization separates historical user content from trusted system instructions and assistant turns; separate requests do not automatically share private conversational state.

Claude Certified Developer - Foundations (CCDV-F) Practice Tests