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

Question 160

Customers can attach files and the service must reject unsupported or excessively large payloads. What should be implemented to solve this problem?

  1. Redact unnecessary sensitive content before submission
  2. Correct a malformed request before resubmission
  3. Validate MIME type and size before upload
  4. Use a supported file or document input method

Explanation

Correct Answer

C:

Server-side checks bound resource use and ensure supported input formats before model submission; the important constraint is that client-provided extensions and names are not reliable content validation alone.

Incorrect Answers

A:

Preprocessing removes irrelevant secrets and personal fields prior to sending the image content; the needed capability is different—server-side checks bound resource use and ensure supported input formats before model submission—and asking Claude to ignore a secret still transmits that data to the service.

B:

Client-side schema validation fixes the payload and prevents fruitless retries, whereas the requirement calls for another behavior: server-side checks bound resource use and ensure supported input formats before model submission; a network backoff cannot make an invalid request body well formed.

D:

The integration supplies supported document content using the relevant API capability and access rules; the requirement instead turns on this behavior: server-side checks bound resource use and ensure supported input formats before model submission; an arbitrary URL or filename does not automatically become readable source material.

Question 161

A usage dashboard processes raw Messages API responses and must distinguish billable token consumption from whether generation ended, hit a cap, or handed off to a tool. Which TWO response fields should the integration inspect? Choose TWO.

  1. Read usage counts from the response
  2. Store response metadata with the trace
  3. Use the top-level system instruction field
  4. Inspect stop_reason before returning output
  5. Parse typed content blocks rather than raw concatenation

Explanation

Correct Answers

A:

Response usage fields provide the token measures used for billing and diagnostics; the implementation must still recognize that character count is not an exact substitute for model tokenization.

D:

The completion reason tells the client whether to deliver, dispatch, or handle truncation; treating all returned content as a complete final answer can hide partial results.

Incorrect Answers

B:

Structured metadata and correlation records provide context for debugging and cost attribution; the missing capability is more specific: response usage fields provide the token measures used for billing and diagnostics; logging only the visible answer removes information needed to identify stop or usage anomalies.

C:

The Messages API represents governing instructions at request level rather than as a fabricated system role in messages; by comparison, the intended solution relies on this: response usage fields provide the token measures used for billing and diagnostics; treating a system instruction as untrusted user content can blur instruction precedence.

E:

Typed block handling preserves whether an element is displayable text or a tool request, whereas the requirement calls for another behavior: response usage fields provide the token measures used for billing and diagnostics; blindly concatenating heterogeneous blocks can lose tool metadata and semantics.

Question 162

The model emits an issue label that must populate a legacy ticket system with different field names. Which implementation mechanism is needed?

  1. Map model fields to application fields explicitly
  2. Use a validated typed response contract
  3. Reject unsupported operations explicitly
  4. Reject malformed structured responses safely

Explanation

Correct Answer

A:

An adapter transforms and validates values at the boundary rather than assuming identical schemas; directly sending raw model content to a write endpoint creates avoidable coupling.

Incorrect Answers

B:

Typed output constraints and independent schema validation keep data machine consumable, whereas the requirement calls for another behavior: an adapter transforms and validates values at the boundary rather than assuming identical schemas; type validity does not prove the chosen category reflects the actual evidence.

C:

A clear capability boundary returns an accurate unsupported-action response; however, the critical mechanism here is that an adapter transforms and validates values at the boundary rather than assuming identical schemas, and inventing a successful action would violate user trust and corrupt workflow state.

D:

The application rejects or repairs through a controlled retry before updating the database; the requirement instead turns on this behavior: an adapter transforms and validates values at the boundary rather than assuming identical schemas; accepting partial data can corrupt downstream records and hide missing fields.

Question 163

A prompt for incident summaries yields inconsistent detail because it never says who will read them. What would best address the stated failure mode?

  1. Use application-controlled system instructions
  2. Separate requirements from source data
  3. Define measurable completion criteria
  4. State the output task and audience explicitly

Explanation

Correct Answer

D:

Clear instructions define the task, intended reader, and required level of technical detail; notably, a vague request to be useful cannot anchor a reliable output format.

Incorrect Answers

A:

The system-level field communicates application guidance separately from task content, whereas the requirement calls for another behavior: clear instructions define the task, intended reader, and required level of technical detail; backend authorization still must be enforced in code and tools.

B:

Structural boundaries distinguish data to analyze from commands the assistant should follow; however, the critical mechanism here is that clear instructions define the task, intended reader, and required level of technical detail, and external content should not gain authority merely because it appears near instructions.

C:

Clear success conditions constrain content and make automated review feasible; the requirement instead turns on this behavior: clear instructions define the task, intended reader, and required level of technical detail; asking for a comprehensive answer without boundaries creates scope drift.

Question 164

A backend should not wait forever for an inference request stalled by an upstream connection. Which choice should be used here?

  1. Set client-side network timeouts
  2. Enforce upload-size caps
  3. Use connection pooling where supported
  4. Set the requested API version header where required

Explanation

Correct Answer

A:

Connect and read deadlines bound network waits and allow controlled failure behavior; the implementation must still recognize that token limits describe model output, not HTTP socket lifetime.

Incorrect Answers

B:

Boundary checks reject overly large payloads before expensive parsing or API transfer; the missing capability is more specific: connect and read deadlines bound network waits and allow controlled failure behavior; relying on the model to refuse oversized data is too late for resource protection.

C:

Reusing connections can reduce handshake overhead and improve request efficiency; by comparison, the intended solution relies on this: connect and read deadlines bound network waits and allow controlled failure behavior; pools still need concurrency caps and safe idle connection management.

D:

Version negotiation constrains accepted fields and response behavior for an endpoint; the needed capability is different—connect and read deadlines bound network waits and allow controlled failure behavior—and omitting required version information or assuming an arbitrary revision can break compatibility.

Question 165

A payment tool may receive the same logical instruction again after a response timeout. Which technical control is appropriate?

  1. Abandon an unauthorized operation immediately
  2. Deduplicate overlapping citations and actions
  3. Retry a failed read with bounded backoff
  4. Use an idempotency key for external writes

Explanation

Correct Answer

D:

Reusing a stable operation key lets the business endpoint recognize retries as the same action, although unique keys per attempt would defeat deduplication and risk double charging.

Incorrect Answers

A:

Denial should terminate that action or route it through legitimate approval instead of repeat attempts; the missing capability is more specific: reusing a stable operation key lets the business endpoint recognize retries as the same action; retrying with longer waits cannot transform insufficient permission into authorization.

B:

Deduplication by stable identity avoids repeated evidence and duplicate business actions; by comparison, the intended solution relies on this: reusing a stable operation key lets the business endpoint recognize retries as the same action; text similarity alone is not enough to safely deduplicate side effects.

C:

Retrying after increasing delays can recover a transient read failure without changing external state; the needed capability is different—reusing a stable operation key lets the business endpoint recognize retries as the same action—and the caller must stop after a limited number of attempts and surface persistent failure.

Question 166

An assistant drafts a database update that could alter live customer balances. What is the correct engineering decision?

  1. Use parameterized queries for user values
  2. Apply business rules after schema checks
  3. Treat generated SQL as untrusted text
  4. Require approval for write statements

Explanation

Correct Answer

D:

A controlled executor enforces authorized write permissions and human approval where required; its operational boundary is that a syntax-valid UPDATE statement is not proof of business permission.

Incorrect Answers

A:

Parameters keep values separate from SQL structure and prevent injection from changing the query grammar; however, the critical mechanism here is that a controlled executor enforces authorized write permissions and human approval where required, and escaping output for HTML would not prevent SQL injection.

B:

Independent business validation enforces domain-specific ranges and account scope; the requirement instead turns on this behavior: a controlled executor enforces authorized write permissions and human approval where required; pure JSON Schema cannot determine whether a payment is authorized.

C:

Query validation and read-only permissions constrain execution against approved tables and patterns; this cannot substitute for the behavior that a controlled executor enforces authorized write permissions and human approval where required, because text generation does not certify the safety or accuracy of the SQL.

Question 167

A procurement assistant can shortlist vendors but may not sign contracts on behalf of employees. Which engineering practice is the strongest match?

  1. Specify human-in-the-loop responsibilities
  2. Define the authority of each tool action
  3. Identify the upstream source of truth
  4. Specify audit and observability needs

Explanation

Correct Answer

A:

Requirements distinguish permitted recommendations from authority to execute a binding business commitment—with this limitation: a general claim that the assistant is safe does not enforce this distinction.

Incorrect Answers

B:

Access requirements tie each permitted side effect to identity, scope, and approval evidence; this cannot substitute for the behavior that requirements distinguish permitted recommendations from authority to execute a binding business commitment, because a model's confidence in a request is not proof of caller authority.

C:

Architecture requirements name the maintained policy repository and its freshness constraints; in contrast, requirements distinguish permitted recommendations from authority to execute a binding business commitment, while instructing Claude to remember policy text does not keep that source current.

D:

Trace requirements define correlation IDs, redaction rules, event retention, and source attribution; this addresses a separate concern, not the fact that requirements distinguish permitted recommendations from authority to execute a binding business commitment; a final natural-language answer is insufficient forensic evidence by itself.

Question 168

A simple entity extraction has a clear schema and no evidence that examples improve it. Which measure directly addresses the problem?

  1. Use multiple diverse examples for edge cases
  2. Reserve enough output tokens for the desired result
  3. Use one representative example to clarify format
  4. Use zero-shot instructions for a straightforward task

Explanation

Correct Answer

D:

Direct instructions define the output without consuming tokens on demonstrations—with this limitation: complex edge cases may still need examples and evaluations.

Incorrect Answers

A:

Contrasting examples illustrate boundaries and exceptions across several realistic inputs; the needed capability is different—direct instructions define the output without consuming tokens on demonstrations—and few-shot prompts add tokens and can create bias if examples are unrepresentative.

B:

The configured generation maximum must be consistent with the required output length, whereas the requirement calls for another behavior: direct instructions define the output without consuming tokens on demonstrations; raising it arbitrarily can increase possible cost without improving content accuracy.

C:

A single illustrative input-output pair can demonstrate the intended pattern; however, the critical mechanism here is that direct instructions define the output without consuming tokens on demonstrations, and one example may overfit to a narrow case and should be tested on alternatives.

Question 169

A new feature will let agents send external emails using a customer's identity. Which design would meet this acceptance criterion?

  1. Benchmark baseline latency and cost
  2. Use a threat model before tool rollout
  3. Prototype with a representative evaluation set
  4. Optimize for correctness before model speed

Explanation

Correct Answer

B:

Mapping assets, adversaries, trust boundaries, and side effects exposes what must be protected; a crucial qualification is that security should not be postponed until the tool can already send messages.

Incorrect Answers

A:

Capturing tokens, response times, failure rate, and quality before changes makes comparisons meaningful; here, the controlling capability is that mapping assets, adversaries, trust boundaries, and side effects exposes what must be protected, but subjective demos cannot quantify a regression from the original system.

C:

A focused spike with real representative examples exposes feasibility and failure modes early; by comparison, the intended solution relies on this: mapping assets, adversaries, trust boundaries, and side effects exposes what must be protected; a polished front end does not demonstrate model accuracy on difficult inputs.

D:

The acceptance process emphasizes measured quality and human review before pursuing latency reductions; the needed capability is different—mapping assets, adversaries, trust boundaries, and side effects exposes what must be protected—and a fast answer is not suitable if it violates the required error threshold.

Question 170

A JSON result is incomplete because generation stopped at the requested token ceiling. Which of the following would work as specified?

  1. Handle context overflow before submission
  2. Bound total cost across agent turns
  3. Count the complete request against context limits
  4. Handle output truncation explicitly

Explanation

Correct Answer

D:

Stop-reason inspection catches the partial response before parsing or persistence; notably, an arbitrary string closure should not be treated as a validated complete JSON object.

Incorrect Answers

A:

Chunking, retrieval, or compaction reduces input size while retaining decision-relevant evidence, whereas the requirement calls for another behavior: stop-reason inspection catches the partial response before parsing or persistence; increasing output max_tokens cannot make an overlong input fit.

B:

Aggregating tokens and actions by logical task reveals overall expenditure and quota needs; however, the critical mechanism here is that stop-reason inspection catches the partial response before parsing or persistence, and per-call estimates overlook the cumulative work of multi-turn orchestration.

C:

The context budget encompasses the relevant input contents and model-specific output allowances; the requirement instead turns on this behavior: stop-reason inspection catches the partial response before parsing or persistence; counting only the latest user text understates true token pressure.

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