1. LLM mental model

11 cards

Review this deck
All cards in this deck

Calling a model is calling a stateless function

The model remembers nothing between requests; multi-turn conversations work because the client resends the full history every time.

First question when Claude answers wrong about your project

Does the context contain enough information to answer correctly? Anything not in the context, the model can only guess.

Token

The unit the model reads and generates; every limit and cost is measured in tokens. The tokenizer from Claude Opus 4.7 onward produces about 30% more tokens than the old one.

Context window of the 4 current models

1M tokens; max output 128K tokens with the synchronous API (as of 11/2026).

Context rule number 1

Provide the least that is enough; a full context raises cost and latency and buries the important information.

Non-determinism

The same prompt can produce different outputs; design around it with structured outputs, tests, evals and logging input/output instead of relying on temperature.

Temperature on current models

Drop `temperature`, `top_p`, `top_k` entirely; sending them to Opus 5.5 or Sonnet 5.5 returns 400 (see each model's migration guide).

Forms of hallucination when coding

Non-existent APIs, made-up CLI flags, made-up packages, wrong versions, false claims about your code.

Most effective way to reduce hallucination

Give the model tools to check (read files, run tests, `--help`), docs to read, and ask it to cite file:line.

Knowledge cutoff of the 4 current models

June 2026; the model does not know libraries released after that, so state the version and provide docs/changelog.

Effort

The `low`/`medium`/`high`/`xhigh`/`max` parameter controls thinking depth and token usage; thinking is billed as output tokens.

1. LLM mental model – Flashcards – Claude | Học Dev