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

Question 20

All repository contributors should receive the same concise build commands and coding conventions in Claude Code. The team wants to review changes to these instructions in version control. Where should they be maintained?

  1. As arbitrary prose entries in settings.json instead of an instruction file.
  2. In a project CLAUDE.md committed with the repository.
  3. Only in one developer’s ~/.claude/CLAUDE.md.
  4. Only in an untracked personal note outside the repository.

Explanation

Correct Answer

B:

Project instructions travel with the code and can be reviewed alongside it. This provides shared behavioral context for commands and conventions that should apply to contributors working on that project.

Incorrect Answers

A:

Settings configure supported client behavior through a defined schema. They are not a general-purpose replacement for project prose; unrecognized entries do not establish the intended shared guidance.

C:

The user-level file applies to that developer’s environment. It does not automatically distribute the repository’s conventions to teammates through version control.

D:

A local note may help its author, but other contributors may not receive it or subsequent updates. It cannot serve as the requested shared, reviewed instruction source.

Question 21

A trace shows Claude emitted a tool request with customer_id="C-72". The dispatcher’s outgoing HTTP request instead contains customer_id=null, and the downstream service rejects it. Which component should the developer investigate first?

  1. The prompt’s instructions for selecting a customer identifier.
  2. The model’s output-token limit.
  3. The downstream service’s language understanding capability.
  4. The dispatcher’s argument mapping and request serialization.

Explanation

Correct Answer

D:

The value was present at the model boundary and disappeared before the HTTP call. That transition localizes the observed defect to the integration path, so inspecting mapping and serialization is more direct than changing model behavior.

Incorrect Answers

A:

The trace already shows the requested identifier in the model output. Rewriting those instructions does not address the subsequent loss of a correctly supplied argument.

B:

The tool request contains the complete identifier in this trace. There is no evidence of output truncation; the loss occurs afterward in application processing.

C:

The downstream service receives a null field rather than ambiguous language. Its rejection is consistent with the malformed request, so the earlier transformation is the stronger evidence of the cause.

Question 22

A multilingual prompt-size estimator treats every character as one token. Its predictions vary substantially from actual usage across languages and source code. Which replacement best supports request budgeting?

  1. Use output character count as the input-token estimate.
  2. Multiply all character counts by the same constant and treat the result as exact.
  3. Use the supported token-counting facility for the target request shape and compare estimates with actual usage.
  4. Count words instead and assume every language uses one token per word.

Explanation

Correct Answer

C:

Tokenization does not map characters one-to-one to tokens. Counting the real message structure, including relevant tool and multimodal inputs, provides a more appropriate estimate; observed usage helps calibrate any remaining differences.

Incorrect Answers

A:

Generated response length is a different quantity from the request input. It cannot establish how many tokens the supplied documents, messages, and tool definitions consume.

B:

A rough conversion can help early estimation, but one constant does not make tokenization exact across different content. It should not be used as a precise boundary check.

D:

Words are also not a universal token unit. Languages and code have different segmentation patterns, so this swaps one unreliable fixed conversion for another.

Question 23

Assume a selected model and request mode permit a combined context of 100,000 tokens. The application has 96,000 input tokens and needs room for up to 8,000 output tokens, including any thinking. What is the appropriate planning action?

  1. Split the response into streaming chunks and keep the same total budget.
  2. Reduce input to leave the required output headroom or select a supported larger-context configuration.
  3. Enable prompt caching so cached input no longer occupies context.
  4. Set max_tokens to 8,000 and assume it adds that space beyond the context window.

Explanation

Correct Answer

B:

Under the stated combined limit, the planned input and output require 104,000 tokens. The application must change that budget rather than assume the output allowance expands the window. Actual request handling also depends on the selected model’s documented limits.

Incorrect Answers

A:

Streaming changes delivery, not the total context used by a request. Receiving smaller pieces does not make 104,000 planned tokens fit a 100,000-token combined limit.

C:

Caching can reduce repeated input-processing cost and latency. It does not remove the cached material from the model’s logical input or create extra capacity in the stated window.

D:

An output allowance is not an extension to the combined capacity specified in the question. The planned total still exceeds 100,000 tokens.

Question 24

A summarization service sometimes produces different but equally accurate wording for the same input. Product acceptance depends on required facts and prohibited disclosures, not exact phrasing. How should its regression suite judge responses?

  1. Ignore all output differences because language-model generation can vary.
  2. Test required facts, constraints, and quality criteria, using repeated trials where variability matters.
  3. Accept any well-written response without comparing it with the source.
  4. Fail every response that is not byte-for-byte identical to one saved summary.

Explanation

Correct Answer

B:

The acceptance contract concerns meaning and safety rather than a particular sentence. Criteria-based checks detect meaningful regressions while allowing harmless wording variation; repeated runs can reveal unstable behavior that one sample misses.

Incorrect Answers

A:

Variability does not make every difference acceptable. Missing facts or prohibited disclosures remain failures and need explicit checks even when phrasing is flexible.

C:

Fluent writing can still omit or invent facts. The suite must assess the required content and boundaries, not just the surface quality of the prose.

D:

Exact comparison is appropriate for contracts requiring exact output, but this product permits equivalent wording. A golden sentence would generate false failures without directly measuring the stated requirements.

Question 25

On the same representative workload, candidate A costs 1 unit per request, scores 92% quality, and has 0.5-second p95 latency; B costs 2 units, scores 97%, and has 0.9-second p95; C costs 5 units, scores 99%, and has 1.6-second p95. Production requires at least 96% quality and p95 below 1.2 seconds. Which choice minimizes cost while meeting both constraints?

  1. Reject all three because a model must score 100% to meet the requirement.
  2. Deploy candidate B using the evaluated configuration.
  3. Choose randomly between A and C to average their strengths.
  4. Deploy candidate A because it is the cheapest measured option.
  5. Deploy candidate C because it has the highest measured quality.

Explanation

Correct Answer

B:

B clears the quality threshold and the latency limit at a cost of 2 units. A misses quality, while C misses latency. The decision follows these workload measurements rather than assuming that the cheapest or most capable model is automatically appropriate.

Incorrect Answers

A:

The requirement specifies 96%, not perfection. Imposing an unstated 100% threshold excludes a candidate that meets the actual contract.

C:

The measurements do not show that random routing would satisfy either aggregate quality or p95 latency. Percentile latency in particular cannot be established by simply averaging the two reported percentiles.

D:

A is fast and inexpensive but scores below the required 96%. Cost minimization is constrained by acceptance criteria, so its lower price cannot compensate for failing quality.

E:

C exceeds the quality target but its 1.6-second p95 violates the 1.2-second limit. More quality does not cancel an explicit latency requirement.

Question 26

An application uses the Messages API with stream=true. Its networking layer expects a WebSocket upgrade and fails before it processes any response events. What transport correction matches the documented Messages streaming interface?

  1. Consume the HTTP response as a server-sent event stream.
  2. Keep requiring a WebSocket upgrade and increase the model’s output allowance.
  3. Send each received event back as a new independent Messages request.
  4. Parse the HTTP body only as one complete JSON message while retaining incremental UI updates.

Explanation

Correct Answer

A:

Messages streaming uses server-sent events over the HTTP response. The client should parse event boundaries and supported event types rather than require a WebSocket handshake; both are streaming mechanisms but use different protocols.

Incorrect Answers

B:

The output allowance affects generation, not the transport handshake. It cannot transform an SSE endpoint into the WebSocket interface the client expects.

C:

Events are pieces of the response to an existing request. Reissuing them as prompts changes the conversation and creates extra calls rather than reconstructing the original streamed message.

D:

A stream contains incremental events rather than just one ordinary response object. Waiting for a single complete body defeats the intended incremental consumer and does not implement the SSE protocol.

Question 27

A request contains a long unchanged policy followed by a different customer query each time. Explicit prompt caching is supported, and the policy meets the selected model’s cache requirements. Where should the reusable cache boundary be placed?

  1. At the end of the unchanged policy prefix, before the varying query.
  2. After a newly generated timestamp inserted before the policy on every call.
  3. After the changing query so every request must match its unique text.
  4. In the response renderer after Claude finishes generating.

Explanation

Correct Answer

A:

A reusable prefix must match across requests. Ending the cached section before changing customer text allows subsequent requests to reuse the stable material without requiring the unique query to match.

Incorrect Answers

B:

Changing content early in the prefix disrupts exact matching of the later policy. A timestamp is useful metadata but should not unnecessarily invalidate stable cached input.

C:

This boundary includes varying content in the prefix being reused. Different queries then prevent that full prefix from matching, reducing the intended cache reuse.

D:

Prompt caching applies to input processing. A marker added by the display layer cannot retroactively establish a reusable input prefix for the API request.

Question 28

For this calculation only, a test plan charges $2 per million uncached input tokens and $10 per million output tokens. A run uses 3 million uncached input tokens and 0.4 million output tokens, with no other charges. What is its total cost?

  1. $6.80.
  2. $10.
  3. $46.
  4. $34.

Explanation

Correct Answer

B:

Input costs 3 × $2 = $6, and output costs 0.4 × $10 = $4. Adding the separately priced categories gives $10. These are the scenario’s hypothetical rates, not a statement of current Anthropic pricing.

Incorrect Answers

A:

Applying the input rate to all 3.4 million tokens gives this amount. That ignores the higher output rate explicitly specified for generated tokens.

C:

This result treats the 0.4 million output tokens as 4 million, producing $40 of output cost plus $6 of input cost. Keeping units in millions throughout the calculation avoids the tenfold error in the output component.

D:

Multiplying the combined 3.4 million tokens by the output rate gives this figure. Input tokens have a different stated rate and must be costed separately.

Question 29

A long agent session contains extensive raw search output. Earlier in the session, the user set a fixed deadline and excluded two suppliers. The next step is to choose among the remaining suppliers. What should a compaction summary prioritize?

  1. Preserve the deadline, exclusions, current candidates, evidence references, and unresolved questions while compressing raw search noise.
  2. Retain every raw search snippet but remove the user’s restrictions to save space.
  3. Keep only the newest supplier description because recent text is always sufficient.
  4. Convert every unresolved question into an assumed fact to shorten the summary.

Explanation

Correct Answer

A:

The summary must retain facts that constrain the next decision. Raw exploration can be shortened when the useful evidence remains recoverable, but dropping exclusions or uncertainty would change the task the agent is solving.

Incorrect Answers

B:

The restrictions have greater decision value than much of the raw exploration. Saving low-signal text while removing governing requirements undermines the purpose of context management.

C:

Recency does not determine relevance. This would lose earlier constraints that still govern the current choice and could allow an explicitly excluded supplier to reappear.

D:

An open issue and a verified fact support different decisions. Erasing that distinction makes the context shorter by making it inaccurate rather than by removing redundancy.

Question 30

A classifier confuses “cancel a pending order” with “return an already delivered order.” Its prompt contains only straightforward cancellation examples. What prompt change most directly teaches the missing distinction?

  1. Add many more examples of obvious pending-order cancellations only.
  2. Add contrasting labeled examples for both delivery states and the decision rule.
  3. Remove all task-specific instructions and rely on a general helpful-assistant role.
  4. Label delivered-order examples as cancellations so both outputs use one category.

Explanation

Correct Answer

B:

The missing boundary is the order’s state, not the number of examples. Contrasting similar requests with different states demonstrates how the rule should affect classification; labels must remain consistent so the examples do not contradict the instruction.

Incorrect Answers

A:

More examples on the same side of the boundary reinforce existing coverage. They do not show when a superficially similar request should be treated as a return.

C:

A broad role does not explain the operational distinction between cancellation and return. Removing the rule makes the required classification boundary less explicit.

D:

That changes the task by erasing the required distinction. Consistent formatting cannot compensate for examples that teach the wrong business rule.

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