Language Models Explained
Tokens, context, RAG, quantization and hallucinations, explained without hype.

ExplainerData checked
What a system prompt is and how to write one
A system prompt sets a model's role, rules and format before the user types. How OpenAI, Claude and Gemini handle it, what it costs and why it is not secret.
ExplainerData checked
What is a mixture of experts (MoE) model?
Mixture of experts explained: how MoE models route each token to a few experts, why total parameters set memory and active ones set speed, and how to run them.
ExplainerData checked
LLM temperature: what it does and why the newest models ignore it
What LLM temperature, top_p and top_k do, which APIs still accept them in 2026, why temperature 0 is not deterministic and what to use instead.
ExplainerData checked
What are embeddings: the vectors behind semantic search
What embeddings are, how semantic search and retrieval use them, which models OpenAI, Gemini, Voyage and Ollama offer, what they cost and the mistakes to avoid.
ExplainerData checked
Are machine-text detectors accurate? What the evidence shows
Are machine-text detectors accurate? OpenAI withdrew its own, a study saw 61% of non-native essays flagged and Turnitin reports 4% false positives per sentence.
ExplainerData checked
Model hallucinations: why they happen and how to reduce them
What model hallucinations are, why language models make things up (training and grading reward guessing), and the techniques Anthropic documents to reduce them.
ExplainerData checked
What is a context window in a language model?
What a context window is, how big it is for Claude, GPT and Gemini in 2026, what happens when it fills up, why bigger is not always better and what it costs.
ExplainerData checked
Reasoning models: what thinking tokens are and what they cost
What a reasoning model is: how thinking works in OpenAI, Claude, Gemini and DeepSeek, why you pay for reasoning you never see and how to control its depth.
How-toData checked
Prompt engineering basics: nine techniques from OpenAI's and Anthropic's documentation
Prompt engineering basics from OpenAI's and Anthropic's docs: be clear, give context and roles, use examples, structure long prompts and test what you write.
ExplainerData checked
What is a token in a language model?
What a token is in a language model, how many words it equals, why Spanish and French need more tokens than English (we measured it) and how they are billed.
ExplainerData checked
What is an LLM? How large language models work, in plain English
What is an LLM: how a large language model predicts tokens, how it is trained, the Transformer, what parameters mean, its limits and how it relates to chatbots.
ExplainerData checked
What is quantization in LLMs, and what do Q4_K_M and Q8_0 mean?
What quantization is in LLMs, what Q4_K_M, Q8_0 and MXFP4 mean, how much memory each saves and how much quality it costs, with measured data and how to choose.
ExplainerData checked
What is RAG (retrieval-augmented generation)?
What RAG (retrieval-augmented generation) is, how it works step by step, when to use it instead of pasting everything into a prompt and how to improve it.
ComparisonData checked
RAG vs fine-tuning: which one do you need?
RAG vs fine-tuning: what each changes, when to use one, the other or both, what OpenAI recommends, how LoRA cuts training cost and a short decision guide.
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:
- 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.
- 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.
- 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.
- 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:
- 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.
- 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.
- 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.
- What are embeddings? covers the vectors behind semantic search and RAG: the models from OpenAI, Google, Voyage and Ollama, their dimensions and prices, and the mistakes that break retrieval.
- LLM Temperature Explained: What It Does and When to Use It explains temperature and top_p, and why the newest models from OpenAI, Anthropic and Google limit or ignore them.
- What Is a Mixture of Experts (MoE) Model? Total vs Active explains why models list total and active parameters, what that means for memory and speed, and how llama.cpp runs large MoE models on a normal PC.
- What is a system prompt? explains how a system prompt sets a model's role, rules and format before the user types, how OpenAI, Claude and Gemini handle it, what it costs and why it is not secret.
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.
What to read next
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

Assistants & Chatbots
16 guides

LLM APIs & Costs
11 guides

Agents & Automation
8 guides

Local Models & Hardware
11 guides