LLM Fundamentals
Official scope (Exam Guide v1.0): tokens, context windows, sampling, non-determinism, next-token generation; model options (fast mode, extended thinking, adaptive thinking, effort levels); zero-, single- and multi-shot prompting.
Tokens and windows
- Limits and prices are in tokens, not words. The ratio depends on the tokenizer: 1M tokens is about 555k words on the current tokenizer (introduced with Claude Opus 4.7), about 750k on older models. Never hard-code a ratio; use token counting.
- Context window = everything the model sees, including its own output and thinking (1M on current models). Max output = what one call may generate (128K synchronous on current models).
Next-token generation and sampling (concept, design guidance)
The model produces one token at a time from a probability distribution; each choice becomes input for the next. Fluent is not the same as true (see hallucination below). Sampling settings shape the choice, so repeated runs can differ: non-determinism. Lower randomness improves repeatability but does not guarantee identical or correct output.
Sampling parameters are a breaking change
Non-default temperature, top_p or top_k return 400 on Claude 4.7 and later models; the Python SDK v1.0+ removes them. Steer with prompting and effort. Older models still accept them.
Thinking
| Mode | How | Models |
|---|---|---|
| Extended thinking (manual) | thinking: {type: "enabled", budget_tokens: N}; min 1,024; budget < max_tokens | Claude 4.5 and earlier; deprecated on 4.6; 400 on 4.7+ |
| Adaptive thinking | thinking: {type: "adaptive"} (or omit); the model decides whether and how much to think, steered by effort | 4.6 and later; always on for Fable 5.1 and Opus 5.5 |
- Thinking tokens are billed as output and count inside
max_tokens. On some current models thinking cannot be disabled (400). - With tool use, send thinking blocks back exactly as received, or the request fails with 400.
- Changing thinking mode or budget invalidates cached message blocks.
Effort levels
output_config.effort: low, medium, high, xhigh, max.
- Affects all output tokens: text, tool calls and thinking. Lower effort means fewer, terser tool calls.
- A behavioural signal, not a strict budget;
max_tokensremains the hard limit. - Default
highon most models;mediumon Claude Opus 5.5 and Claude Haiku 5.5. Not every model supports every level (xhighis narrower thanmax). - Guidance:
lowfor simple, latency-sensitive work and subagents;mediumfor balanced agent work;highfor complex reasoning and coding;xhigh/maxonly when evals show a gain. Run an effort sweep on your own evals rather than copying settings between models. - Changing top-level effort between requests invalidates the cache (per-message effort, in beta on some models, preserves it).
Fast mode
speed: "fast": same model weights, faster inference, up to 2.5x output tokens per second at premium pricing (multiplier on standard rates).- Supported on Claude Opus 5.5 (no beta header needed), Opus 5 and Opus 4.8 (research preview, beta header). Claude API (including Managed Agents) and Microsoft Foundry on Azure.
- Not available with the Batch API, a Priority Tier commitment, or Claude Platform on AWS.
- Improves output speed, not time to first token. Switching speed invalidates the prompt cache. Separate rate limits;
usage.speedreports which speed ran.
Three different dials (design guidance)
| Dial | Changes |
|---|---|
| Model tier | Capability and price |
| Effort | How much work and how many tokens |
| Fast mode | Only output speed (and price) |
Zero-, single-, multi-shot (verified guidance)
No example, one example, several examples. Examples steer format, tone and structure; the docs suggest 3 to 5 relevant, diverse examples wrapped in <example> tags. Add them when format must be exact or instructions are ambiguous; skip them when a clear instruction already works (examples cost tokens).
Supporting: hallucination (verified mitigations)
Fluent wrong answers follow from next-token generation. Mitigate: allow "I don't know", ground in direct quotes, use citations, restrict to supplied documents, verify with best-of-N, and validate output (6.3).
Exam traps
- Setting
temperature: 0on a 4.7+ model (400). - Treating effort as a hard token cap.
- Expecting fast mode to reduce time to first token or to work in batch.
- Sending
budget_tokensto a current model. - Editing thinking blocks before returning them.
References
- Effort — checked Oct 16, 2026
- Fast mode — checked Oct 16, 2026
- Extended thinking — checked Oct 16, 2026
- Errors (validation errors) — checked Oct 16, 2026
- Model deprecations (parameter deprecations) — checked Oct 16, 2026
- Models overview — checked Oct 16, 2026
- Prompting best practices — checked Oct 16, 2026
- Reduce hallucinations — checked Oct 16, 2026
Check your understanding
Same prompt, different wording on two runs. Why?Show answerHide answer
Answer
Sampling makes output non-deterministic.Simple, latency-sensitive task. Effort? Is it a strict cap?Show answerHide answer
Answer
low; no, it is a behavioural signal.Same model, faster output, higher price accepted. Option and one limit?Show answerHide answer
Answer
Fast mode; not in batch, and it does not cut time to first token.Inconsistent output format. Cheapest fix?Show answerHide answer
Answer
State the format and add 3 to 5 diverse examples.