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

Question 130

A Python agent needs typed inputs, validated outputs, and dependency injection into tools. What is the most suitable pattern?

  1. Use a fallback to a human decision-maker
  2. Use Strands-style model-driven agents
  3. Use typed PydanticAI-style dependencies
  4. Use LangGraph-style stateful orchestration

Explanation

Correct Answer

C:

A typed framework aligns model interactions with application data models and testable dependencies; the important constraint is that types validate shape, not the truth of every generated factual assertion.

Incorrect Answers

A:

Escalation transfers the ambiguous decision with relevant evidence and uncertainties; the needed capability is different—a typed framework aligns model interactions with application data models and testable dependencies—and generating a confident answer is not an acceptable replacement for the required human approval.

B:

An agent framework coordinates tool selection while exposing configuration and observability hooks, whereas the requirement calls for another behavior: a typed framework aligns model interactions with application data models and testable dependencies; tool permission and termination policies remain the integrator's responsibility.

D:

A graph framework makes transitions and persisted workflow state first-class constructs; the requirement instead turns on this behavior: a typed framework aligns model interactions with application data models and testable dependencies; the framework does not eliminate the need to secure the nodes' tools.

Question 131

A prompt sounds good on one handcrafted example but users report failures on real cases. What change is best aligned with the goal?

  1. Compare revisions on fixed metrics
  2. Change one major prompt variable at a time
  3. Construct a representative validation set
  4. Give a correct representative example

Explanation

Correct Answer

C:

A labeled suite of normal, edge, and adversarial examples measures practical performance; the important constraint is that one anecdotal success does not establish production reliability.

Incorrect Answers

A:

Measured pass rates and error types reveal tradeoffs between candidates; the needed capability is different—a labeled suite of normal, edge, and adversarial examples measures practical performance—and choosing solely by stylistic preference can hide data-quality regressions.

B:

Controlled experiments isolate which instruction change caused measurable differences, whereas the requirement calls for another behavior: a labeled suite of normal, edge, and adversarial examples measures practical performance; multiple simultaneous edits obscure causal diagnosis.

D:

A compact demonstration clarifies the intended input-to-output mapping; the requirement instead turns on this behavior: a labeled suite of normal, edge, and adversarial examples measures practical performance; examples should match the required schema and not use private customer records.

Question 132

A user interface receives content deltas and must display them in the order the service emits them. Which approach targets the deciding condition?

  1. Sanitize generated HTML before rendering
  2. Preserve incremental rendering order
  3. Display text content while handling tool calls separately
  4. Preserve source references alongside snippets

Explanation

Correct Answer

B:

Ordered stream assembly avoids scrambled or duplicated text fragments; parallel callbacks that append out of order can corrupt an otherwise valid response.

Incorrect Answers

A:

Escaping or trusted sanitization prevents untrusted content from executing in the browser; by comparison, the intended solution relies on this: ordered stream assembly avoids scrambled or duplicated text fragments; system prompts cannot provide a browser-level cross-site scripting defense.

C:

The UI renders text but dispatches structured tool blocks through the application control path, whereas the requirement calls for another behavior: ordered stream assembly avoids scrambled or duplicated text fragments; showing a raw tool call as a final answer leaves the workflow incomplete.

D:

Provenance metadata allows citations and later source checks for each retrieved excerpt; however, the critical mechanism here is that ordered stream assembly avoids scrambled or duplicated text fragments, and a plausible paragraph with no reference cannot be independently traced.

Question 133

An action tool receives values that look like valid JSON but refer to an out-of-scope customer ID. Which action most directly closes the gap?

  1. Validate the caller's identity before exposing tools
  2. Validate generated tool parameters
  3. Audit committed business changes
  4. Sanitize generated HTML before rendering

Explanation

Correct Answer

B:

Server-side validation constrains types, ranges, ownership, and supported operations, subject to this requirement: a well-described function schema does not replace authorization checks.

Incorrect Answers

A:

Authentication establishes which principal is making the request before access decisions; in contrast, server-side validation constrains types, ranges, ownership, and supported operations, while a conversational claim of ownership is not reliable proof of identity.

C:

An immutable audit trail records principal, approved action, object, time, and outcome; here, the controlling capability is that server-side validation constrains types, ranges, ownership, and supported operations, but the final chat transcript is insufficient evidence of a backend write.

D:

Escaping or trusted sanitization prevents untrusted content from executing in the browser; the missing capability is more specific: server-side validation constrains types, ranges, ownership, and supported operations; system prompts cannot provide a browser-level cross-site scripting defense.

Question 134

An insurance claim must pass the same validated parsing, classification, and approval stages in a fixed order. Which approach best meets this requirement?

  1. Execute a parallel fan-out workflow
  2. Run an explicit fixed-stage workflow
  3. Route requests with an LLM classifier
  4. Prefer a hybrid workflow-agent design

Explanation

Correct Answer

B:

Application code controls the predetermined stage transitions and makes them reproducible in tests, although it cannot decide to introduce an unplanned research step after unexpected evidence appears.

Incorrect Answers

A:

Independent branches can run at once and a reducer collects their outputs, lowering wall-clock time; the needed capability is different—application code controls the predetermined stage transitions and makes them reproducible in tests—and parallel execution is unsafe if branches mutate the same resource without coordination.

C:

A routing call chooses among bounded destinations while downstream code owns the actual execution; however, the critical mechanism here is that application code controls the predetermined stage transitions and makes them reproducible in tests, and classification alone cannot search, repair, or complete an open-ended case.

D:

Code preserves mandatory outer checkpoints while an agent explores only within an approved segment; the requirement instead turns on this behavior: application code controls the predetermined stage transitions and makes them reproducible in tests; failure to isolate the exploratory stage could let it bypass the required controls.

Question 135

API errors and malformed structured outputs require different owners and recovery actions. Which design would meet this acceptance criterion?

  1. Use backward-compatible interface evolution
  2. Categorize and triage production incidents
  3. Conduct a staged production rollout
  4. Remove deprecated configuration under change control

Explanation

Correct Answer

B:

Incident classification routes problems to the correct service, integration, or prompt team; a crucial qualification is that treating every failure as bad model reasoning conceals infrastructure issues.

Incorrect Answers

A:

Additive changes and versioned contracts allow old and new clients to coexist during migration; here, the controlling capability is that incident classification routes problems to the correct service, integration, or prompt team, but an abrupt breaking rename can strand clients even if the model prompt is unchanged.

C:

Canary releases compare a limited population against baseline before broad enablement; by comparison, the intended solution relies on this: incident classification routes problems to the correct service, integration, or prompt team; immediate full deployment magnifies regressions and complicates rollback.

D:

A controlled cleanup traces dependencies, verifies current usage, and deletes unused flags with tests; the needed capability is different—incident classification routes problems to the correct service, integration, or prompt team—and removing all old switches at once can unintentionally disable required paths.

Question 136

An engineer rewrites the role, examples, and schema simultaneously and cannot tell what improved output. Which action most directly closes the gap?

  1. Retain previously passing edge cases
  2. Validate prompt variables before interpolation
  3. Change one major prompt variable at a time
  4. Compare revisions on fixed metrics

Explanation

Correct Answer

C:

Controlled experiments isolate which instruction change caused measurable differences, although multiple simultaneous edits obscure causal diagnosis.

Incorrect Answers

A:

Regression fixtures preserve known correct behavior across prompt changes; by comparison, the intended solution relies on this: controlled experiments isolate which instruction change caused measurable differences; evaluating only newly fixed failures gives a biased view of quality.

B:

Input checks constrain length, types, and permitted resource scopes before prompt assembly; the needed capability is different—controlled experiments isolate which instruction change caused measurable differences—and merely surrounding an unsafe value with quotation marks does not establish authorization.

D:

Measured pass rates and error types reveal tradeoffs between candidates; however, the critical mechanism here is that controlled experiments isolate which instruction change caused measurable differences, and choosing solely by stylistic preference can hide data-quality regressions.

Question 137

A booking step succeeded but a later dependent step failed and the earlier action must be reversed. Which of the following would work as specified?

  1. Use an idempotency key for external writes
  2. Abandon an unauthorized operation immediately
  3. Avoid splitting when coordination overhead dominates
  4. Use a compensating action for a committed write

Explanation

Correct Answer

D:

A compensating operation undoes a completed business change when atomic rollback spans unavailable services; the important constraint is that compensation must itself be auditable and may require authorized human review.

Incorrect Answers

A:

Reusing a stable operation key lets the business endpoint recognize retries as the same action; by comparison, the intended solution relies on this: a compensating operation undoes a completed business change when atomic rollback spans unavailable services; unique keys per attempt would defeat deduplication and risk double charging.

B:

Denial should terminate that action or route it through legitimate approval instead of repeat attempts; the needed capability is different—a compensating operation undoes a completed business change when atomic rollback spans unavailable services—and retrying with longer waits cannot transform insufficient permission into authorization.

C:

Keeping a bounded task local avoids orchestration latency and reconciliation errors, whereas the requirement calls for another behavior: a compensating operation undoes a completed business change when atomic rollback spans unavailable services; subagents should be justified by distinct work or isolation needs, not mere availability.

Question 138

A minor client SDK upgrade can change request handling and break an integration. Which development approach should be selected?

  1. Commit prompt templates as versioned files
  2. Pin a tested exact model version when necessary
  3. Pin dependency versions for reproducible builds
  4. Protect API keys through deployment secrets

Explanation

Correct Answer

C:

A lockfile and tested upgrade process preserve a known dependency graph, although unrestricted installs are vulnerable to unreviewed breaking changes.

Incorrect Answers

A:

Version control makes prompt changes auditable alongside application code and tests; by comparison, the intended solution relies on this: a lockfile and tested upgrade process preserve a known dependency graph; storing production prompts only in an engineer's notebook prevents reproducibility.

B:

Version pinning keeps the model selection stable until the team deliberately upgrades and retests; the needed capability is different—a lockfile and tested upgrade process preserve a known dependency graph—and the pinned model may later require migration if the provider retires it.

D:

Secret injection provides runtime access without publishing keys in code or artifacts; however, the critical mechanism here is that a lockfile and tested upgrade process preserve a known dependency graph, and obscuring a key in a code comment is not adequate credential protection.

Question 139

The app must resume a conversation for its rightful owner without exposing another customer's past messages. What is the best fit for the described situation?

  1. Separate tenant-specific conversation state
  2. Persist conversation history in application storage
  3. Expire stale ephemeral sessions
  4. Use an account-scoped history key

Explanation

Correct Answer

D:

Session storage is keyed to authenticated identity and checked on every retrieval; a crucial qualification is that a client-supplied chat ID alone is not sufficient authorization.

Incorrect Answers

A:

Tenant isolation is enforced in storage queries, tools, and context assembly; in contrast, session storage is keyed to authenticated identity and checked on every retrieval, while merely instructing the model not to mix tenants is an inadequate barrier.

B:

The application saves and reconstructs relevant turns because Messages requests are stateless; this addresses a separate concern, not the fact that session storage is keyed to authenticated identity and checked on every retrieval; assuming the API remembers every prior independent call will break continuity.

C:

Time-based cleanup limits unnecessary data retention and reduces exposure; here, the controlling capability is that session storage is keyed to authenticated identity and checked on every retrieval, but persistent global memory is inappropriate for short-lived sensitive tasks.

Question 140

Compliance analysts must verify where a reported liability cap appears in the uploaded agreement. Which development approach should be selected?

  1. Include source spans for extracted values
  2. Return an explicit unknown for missing evidence
  3. Separate citations from generated claims
  4. Escalate low-confidence high-impact cases

Explanation

Correct Answer

A:

Provenance fields or offsets let reviewers inspect the original supporting text, although a fluent explanation without a source is not independently verifiable.

Incorrect Answers

B:

A nullable or unknown state avoids inventing a plausible but unsupported date; however, the critical mechanism here is that provenance fields or offsets let reviewers inspect the original supporting text, and guessing a value would convert absence of evidence into false data.

C:

The application verifies source mapping and clearly displays provenance when available; the requirement instead turns on this behavior: provenance fields or offsets let reviewers inspect the original supporting text; formatting fake-looking references beautifully does not provide evidence.

D:

Risk-based human review catches consequential uncertain outputs before automatic action; this cannot substitute for the behavior that provenance fields or offsets let reviewers inspect the original supporting text, because automatic acceptance based on polished prose could cause compliance failures.

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