CCDV-F · Domain 5: Model Selection and Optimization · 12% of the exam
Task 5.1: Generation Mechanics and Model Options
Using tokens, context windows, sampling and non-determinism, and options such as adaptive thinking and effort to predict, explain and control what a model does.
Study it
Tokens, context windows, sampling, adaptive thinking and effort
Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.
Question 1 · choose 1
A usage dashboard reports "input tokens processed" by reading only the input_tokens field of each response. One request's usage is:{
"input_tokens": 2400,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 48000,
"output_tokens": 310
}How many input tokens did that request actually process?
A50,400, because input_tokens counts only the tokens after the last cache breakpoint
B2,400, because cached tokens are not part of the input once they are read from the cache
C48,000, because cache_read_input_tokens already includes the input_tokens value
D50,710, because output tokens are counted toward the input of the same request
Show the answer and why
A50,400, because input_tokens counts only the tokens after the last cache breakpoint
Correct
Total input is cache reads plus cache writes plus input_tokens.
B2,400, because cached tokens are not part of the input once they are read from the cache
Incorrect
Cached tokens are still processed input; they are reported in a separate field.
C48,000, because cache_read_input_tokens already includes the input_tokens value
Incorrect
The fields do not overlap; input_tokens covers what comes after the last breakpoint.
D50,710, because output tokens are counted toward the input of the same request
Incorrect
Output tokens are generated by the request, not part of its input.
input_tokens covers only the tokens after the last cache breakpoint. The total input processed is cache_read_input_tokens plus cache_creation_input_tokens plus input_tokens, which matters for both cost and rate limits.
A CI test sends a fixed prompt to Claude and asserts that the reply equals a stored string. The test passes on most runs and fails on others, even though the prompt, the model ID and every other request parameter are identical. What explains the flaky test, and how should it be built?
AThe model ID changed between runs; pin a dated model ID so that the reply is reproduced exactly
BThe API caches replies, so a cache miss produces a new wording; turn off prompt caching for the test
CIdentical inputs can produce different outputs across API calls; grade the reply's content over several trials instead
DThe test sends requests too quickly; add a delay between runs so that each one is processed the same way
Show the answer and why
AThe model ID changed between runs; pin a dated model ID so that the reply is reproduced exactly
Incorrect
Identical requests to the same model can still produce different outputs; the model ID is not the cause.
BThe API caches replies, so a cache miss produces a new wording; turn off prompt caching for the test
Incorrect
Prompt caching reuses prompt prefixes, not replies, and does not cause different outputs.
CIdentical inputs can produce different outputs across API calls; grade the reply's content over several trials instead
Correct
Outputs vary between runs, so evals run multiple trials and grade what matters instead of exact text.
DThe test sends requests too quickly; add a delay between runs so that each one is processed the same way
Incorrect
Request timing does not make outputs deterministic.
Responses from the API are not fully deterministic: identical inputs might produce different outputs across API calls. Because outputs vary between runs, evaluations run several trials and grade the content that matters, for example with code or model graders, rather than an exact string.
Your requests omit effort, so the model's default level applies. A teammate proposes setting output_config.effort explicitly to that same default level on every request, so that the configuration is visible in code. The requests use prompt caching heavily. What does the change do?
AIt runs the model one level higher, because an explicit effort value is applied on top of the default
BIt behaves exactly like omitting effort and does not invalidate the cached prefix
CIt invalidates the message cache on every request, because any effort value is rendered into the prompt
DIt is rejected with a 400 error, because effort may be set only when thinking is enabled
Show the answer and why
AIt runs the model one level higher, because an explicit effort value is applied on top of the default
Incorrect
An explicit value replaces the default; it is not added to it.
BIt behaves exactly like omitting effort and does not invalidate the cached prefix
Correct
Setting effort to the model's default is equivalent to omitting it, so the cache stays valid.
CIt invalidates the message cache on every request, because any effort value is rendered into the prompt
Incorrect
Changing effort can invalidate caches, but setting it to the default is equivalent to leaving it out.
DIt is rejected with a 400 error, because effort may be set only when thinking is enabled
Incorrect
Effort is set on output_config by itself; the page shows requests that set only effort.
With no effort value, the model's default level applies, and setting effort explicitly to that default produces the same behavior as omitting it. The caching page adds that it does not invalidate the cache, while changing to a different level can.
A teammate says the context window only has to hold the prompt you send, so a long reply can never run into it. What does the documentation say the context window includes?
AOnly the system prompt and the newest user message
BOnly the input, because output is limited separately
COnly the conversation history, without the system prompt
DAll the text the model can reference while generating, including the response itself
Show the answer and why
AOnly the system prompt and the newest user message
Incorrect
Earlier turns of the conversation count as well.
BOnly the input, because output is limited separately
Incorrect
The response itself is part of the context window.
COnly the conversation history, without the system prompt
Incorrect
The system prompt counts too.
DAll the text the model can reference while generating, including the response itself
Correct
The context window covers what the model can reference, response included.
The context window refers to all the text a language model can reference when generating a response, including the response itself. It works as the model's working memory, unlike the corpus it was trained on.
Your requests use adaptive thinking, and the thinking token counts in usage vary widely from one request to the next for similar-looking prompts. A teammate files it as a bug. What explains the variation?
AAdaptive thinking uses a fixed thinking budget, so any variation means the requests were truncated
BThinking tokens are counted only on some requests, depending on the cache
CWith adaptive thinking, Claude determines its thinking allocation dynamically for each request
DThe usage field reports thinking from the previous request instead of the current one
Show the answer and why
AAdaptive thinking uses a fixed thinking budget, so any variation means the requests were truncated
Incorrect
Adaptive thinking has no fixed budget; Claude sets the allocation.
BThinking tokens are counted only on some requests, depending on the cache
Incorrect
Usage reports the thinking tokens of every request that generates them.
CWith adaptive thinking, Claude determines its thinking allocation dynamically for each request
Correct
The allocation is dynamic, so thinking token usage varies from request to request.
DThe usage field reports thinking from the previous request instead of the current one
Incorrect
Each response reports what that request consumed.
With adaptive thinking, Claude determines its thinking allocation dynamically, so thinking token usage varies from request to request.