CCDV-F · Domain 5: Model Selection and Optimization · 12% of the exam
Task 5.3: Cost Diagnosis and Optimization
Reading usage and cost data to find what drives the bill, then picking and sizing the fix: cache breakpoints placed for single, layered or rolling caching, batch processing, or token budgets.
Study it
Cost drivers: cache breakpoints, batch processing and token budgets
Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.
Question 1 · choose 1
Your research chat attaches the 24 retrieved passages of each turn as separate document blocks, so each turn adds about 26 blocks. Every request puts cache_control only on its final block. Usage over three consecutive turns looks like this:turn cache_creation_input_tokens cache_read_input_tokens
2 41,200 0
3 49,800 0
4 58,100 0Which change starts producing cache reads?
ASwitch every breakpoint to the 1-hour cache duration so that earlier entries are still available
BReplace the breakpoints with one top-level cache_control field so that automatic caching finds the earlier entries
CAlso put cache_control on the last block of the previous turn, where the last cache write was made
DMove the retrieved passages into the system prompt so that they are cached ahead of the conversation
Show the answer and why
ASwitch every breakpoint to the 1-hour cache duration so that earlier entries are still available
Incorrect
The entries have not expired; they lie outside the 20-block lookback window.
BReplace the breakpoints with one top-level cache_control field so that automatic caching finds the earlier entries
Incorrect
Automatic caching uses the same 20-block lookback window as explicit breakpoints.
CAlso put cache_control on the last block of the previous turn, where the last cache write was made
Correct
A second breakpoint near the previous write starts its own lookback and finds that entry.
DMove the retrieved passages into the system prompt so that they are cached ahead of the conversation
Incorrect
The passages change every turn, so putting them earlier in the prefix invalidates more of the cache.
Cache reads look back at most 20 blocks from each breakpoint for an entry an earlier request wrote. When a turn adds 20 or more blocks, the previous write falls outside the window. A second breakpoint closer to that position starts another lookback window that finds it.
A nightly job sends 40,000 requests through the Message Batches API on the Claude API, each starting with the same long system prompt marked for caching. Half of the batches are submitted with a key for the etl workspace and half with a key for the reports workspace. A partner company runs the same job, with an identical system prompt, in its own organization. You are working out how caching behaves for this job. Which TWO statements are correct? (Choose TWO.)
ARequests that read the cached prompt get shorter responses, which also lowers the output tokens they use
BRequests sent with one workspace's key don't read entries written with the other's, so each workspace writes its own
CA request still reads the cached prompt when its system prompt differs only by small edits, such as extra whitespace
DAn entry's lifetime counts from the start of the request that reads it, not from the end of its response
EThe partner's requests can read the entries your job writes, since the system prompts are identical
Show the answer and why
ARequests that read the cached prompt get shorter responses, which also lowers the output tokens they use
Incorrect
Prompt caching has no effect on output generation; the response is the same as without caching.
BRequests sent with one workspace's key don't read entries written with the other's, so each workspace writes its own
Correct
On the Claude API, caches are isolated between workspaces, and each workspace builds its own cache.
CA request still reads the cached prompt when its system prompt differs only by small edits, such as extra whitespace
Incorrect
Cache hits require 100 percent identical prompt segments up to the block marked with cache control.
DAn entry's lifetime counts from the start of the request that reads it, not from the end of its response
Correct
The lifetime is measured from the start of the request that writes or reads the entry, so generation time counts against it.
EThe partner's requests can read the entries your job writes, since the system prompts are identical
Incorrect
Different organizations never share caches, even with identical prompts.
Caches are never shared across organizations and, on the Claude API, are also isolated between workspaces, so each workspace builds its own cache. A cache hit needs an identical prefix up to the breakpoint, caching does not change the generated output, and an entry's lifetime is measured from the start of the request that writes or reads it, not from the end of its response.
A request already places cache_control on four content blocks, and a developer adds a top-level cache_control field to turn on automatic caching as well. What happens?
AAutomatic caching replaces the four block-level breakpoints
BThe top-level field is ignored, and the four breakpoints keep working
CThe API returns a 400 error, because no breakpoint slot is left for automatic caching
DThe request succeeds with five breakpoints at a higher write price
Show the answer and why
AAutomatic caching replaces the four block-level breakpoints
Incorrect
The two can be combined; the automatic breakpoint needs a free slot.
BThe top-level field is ignored, and the four breakpoints keep working
Incorrect
With no slot left, the request is rejected rather than ignored.
CThe API returns a 400 error, because no breakpoint slot is left for automatic caching
Correct
Automatic caching uses one of the 4 breakpoint slots; with 4 explicit ones there is none.
DThe request succeeds with five breakpoints at a higher write price
Incorrect
A request can have at most 4 breakpoints.
Automatic caching is compatible with explicit breakpoints, but it uses one of the 4 available breakpoint slots. If 4 explicit block-level breakpoints already exist, the API returns a 400 error.