EN

Language

Our editions

Written for each audience, not translated word for word.

Language Models Explained

Tokens, context, RAG, quantization and hallucinations, explained without hype.

A 3D lattice of thin steel lines and nodes with a few pathways lit in orange, like a neural network

Learn the ideas behind the tools

Every chatbot and assistant you use is built from the same handful of ideas: text is cut into tokens, a model reads a limited amount of them at once, it can be shrunk, taught or given documents, and it sometimes states false things with total confidence. The guides in this section explain those ideas in plain English and tie each one to a number you can check. They quote the vendors' own documentation and research papers, say when a figure is our own calculation, and carry the date we verified them. If a term in a pricing page or a product announcement confuses you, it is probably explained here.

Where to start

The first four guides explain how a model sees text, and they are worth reading in this order:

  1. What is a token? is the foundation. Tokens are the unit of text a model reads and writes, and everything else is measured in them: prices, limits and speed. In English OpenAI estimates 100 tokens at about 75 words, and in our own count of the same legal text Spanish needed 22% more tokens than English and French 33% more.
  2. What is a context window? covers the amount of text a model can consider in one request, with the sizes the vendors list today and the reason a bigger window is not automatically better: Anthropic says accuracy and recall degrade as the token count grows.
  3. Prompt engineering basics collects nine techniques that OpenAI and Anthropic both document: be clear and direct, use roles, structure the prompt, show three to five examples, put long documents before the question and specify the output format.
  4. model hallucinations explains why models state false things fluently. OpenAI's research points to training on next-word prediction and to scoreboards that reward guessing, and the practical fix is to allow "I don't know", supply sources and verify what matters.
  • What is an LLM? puts the four together: how a large language model predicts one token after another, how pretraining, fine-tuning and human feedback shape it, what the Transformer and parameters are, and why a 1.3 billion parameter model trained on human feedback beat the 175 billion parameter GPT-3 in OpenAI's tests.
  • Are machine-text detectors accurate? sums up the evidence: OpenAI withdrew its own detector, one study saw 61% of non-native English essays flagged as machine-written, and Turnitin reports about 4% false positives per sentence.
  • Reasoning models explains thinking tokens: why OpenAI, Anthropic, Google and DeepSeek bill reasoning you never see as output, and how to control its depth with effort settings.

The remaining three are about adapting a model to your needs:

  1. What is RAG? shows how a system looks up passages in your documents and adds them to the prompt before the model answers, so you do not have to retrain the model every time your information changes.
  2. RAG vs fine-tuning helps you choose between giving the model knowledge and changing its behavior, and follows OpenAI's advice to start with evaluations and prompt engineering before you train anything.
  3. What is quantization? explains Q4_K_M, Q8_0 and the other formats that make a model small enough to run on your own computer, with measured data on how much quality each step costs.

Which guide answers which question

If a bill surprised you, start with tokens, and then with how API prices work. If a model forgot the start of a long conversation or a document, read about the context window. If an answer was confident and wrong, read about hallucinations and then about RAG, because grounding a model in your own sources is the most common mitigation. If you want the model to follow a format or a tone, read about prompts first and fine-tuning last. If you are trying to fit a model on a graphics card, read about quantization and then use our VRAM calculator.

How we write these guides

We explain a concept only as far as we can support it. Where a vendor publishes a number, we quote it and link the page; where we measured something, such as the tokens in a text or the size of a quantized model, we say how. We do not claim that one technique always beats another, because the vendors themselves say results depend on the task, and we tell you to test on your own examples. These guides are reviewed on a schedule, and the "what may change" box on each page lists the facts most likely to move.

When you are ready to apply the ideas, the practical guides are how to run an LLM locally, what an agent is and prompt caching explained. If you use language models at work in Europe, read what the Regulation (EU) 2024/1689 already asks of you.

Other topics