Skip to content
AI from Scratch
EN

Today's terms: the dictionary that changes every month

The glossary in docs/07 covers the fundamentals, which do not change. This one covers today's vocabulary: what turns up in job postings, articles and conversations, and often gets used without being defined.

It is organized by topic, not alphabetically, because the terms make more sense in groups.


How products get built

RAG · Retrieval-Augmented Generation Searching for information and putting it into the prompt. It is not a special model: it is concatenating text. → Your stage 12.

Agentic RAG The model decides when and what to search for, instead of always searching before answering. Better quality, more cost.

GraphRAG RAG over a knowledge graph instead of loose chunks. Answers questions that require connecting several documents better.

Chunking How you split your documents. It is the most underrated decision in RAG: chunk badly and no vector database will save you.

Reranking A second model, more expensive and more precise, reorders the 20 candidates the fast search returned. The cheapest improvement there is in RAG.

Hybrid search Combining keyword search (BM25/TF-IDF) and vector search, fused with Reciprocal Rank Fusion. It is what actually gets used in production.

Your stage 12.1 measured it: TF-IDF 88% against embeddings 25%. That is why both get used.

Context window How many tokens fit. Today: 128k is normal, 1-2 M in the large ones. And remember: fitting does not mean it reasons equally well over all of it.

Lost in the middle Information in the middle of a long context is used worse than information at the beginning and the end. It has been measured. Put the important thing at the end.


How a model gets adapted

SFT · supervised instruction fine-tuning. Teaches format, not knowledge. → Your stage 09.

LoRA / QLoRA Training two small matrices instead of all the weights. QLoRA adds the base model quantized to 4 bits. → Your stage 09.2.

PEFT · Parameter-Efficient Fine-Tuning. The umbrella covering LoRA, adapters, prefix tuning.

RLHF / DPO / KTO / ORPO / SimPO The preference alignment family. RLHF uses reinforcement learning; DPO skips it; the others are variants fixing specific problems with DPO. → Your stage 10.

RLVR · Reinforcement Learning with Verifiable Rewards RL where the reward comes from an automatic verifier (tests that pass, the correct result). It is what trains the reasoning models.

Distillation A large model ("teacher") generates data used to train a small one ("student"). Almost every good small model today is distilled.

Model merging Combining the weights of several fine-tuned models (SLERP, TIES, DARE). It is cheap and works surprisingly well.

Catastrophic forgetting The model specializes and loses what it knew. Defences: low lr, few epochs, mixing in pre-training data, or LoRA.

Superficial alignment (hypothesis) The base model already knows everything it is going to know; SFT merely teaches it to present it. That is why 1,000 good examples ≈ 100,000 mediocre ones.


Architectures and efficiency

MoE · mixture of experts. More parameters, same compute per token. Saves computation, not memory. → docs/08.

RoPE · positions by rotation. Makes attention relative and lets you extend the context after training (YaRN, NTK scaling).

GQA / MQA · several heads share keys and values. Reduces the KV cache by up to 8×. Standard since 2023.

FlashAttention Computing attention in blocks inside fast memory. Exact, not approximate.

Sliding window attention · each token only looks at the last N.

SSM / Mamba · an alternative to attention with linear cost and a fixed state. Promising on very long sequences; the hybrids are the most interesting part.

Speculative decoding A small model proposes several tokens, the large one verifies them in one pass. It does not change the output distribution: same result, faster.

Quantization: GPTQ, AWQ, GGUF, bitsandbytes, QAT. → Your stage 08.3 measures why the group size is everything.


Agents and tools

Function calling / tool use · the model emits JSON and your code executes. → Your stage 12.3.

MCP · Model Context Protocol. An open protocol for connecting models to tools and data. You write the server once and any client can use it.

ReAct · alternating reasoning and action.

Structured output · forcing a JSON schema by constraining the sampling. Tokens that would break the schema get zero probability — the same idea as your causal mask.

Computer use · the model receives screenshots and returns clicks.

Agent loop / step budget · the limit that stops an agent calling tools forever and bankrupting you.

Human in the loop · confirmation for irreversible actions.

→ All of it developed in docs/13-agentes-y-multiagente.md.


Reasoning and inference-time compute

Chain of thought · generating intermediate steps. It works because every token is a pass through the network: more tokens = more compute.

Reasoning models · trained with RLVR to think a lot before answering.

Inference-time scaling · the second scaling law: more compute when answering, better answer. It changes the economics: one question can cost 100 tokens or 100,000.

Self-consistency · generate N answers and keep the majority one.

Thinking budget · how many reasoning tokens it is allowed. A new dial that did not exist before.


Evaluation

Benchmark · a standard test. Contaminated almost always: the questions are published and end up in the training corpus.

Contamination · the model saw the test during training. You cannot detect it by looking at the score.

LLM as a judge · using one model to evaluate another. Cheap and scalable; biased towards long answers and towards its own style.

Arena / Elo · blind comparisons with human votes. The most reliable thing there is, and even so it measures "what people like more", not "what is correct".

Needle in a haystack · finding a fact hidden in an enormous context. It is passed easily and does not prove the model reasons over long context.

Your own evaluation · 50-200 cases from your problem, published nowhere. The only one that is actually any use to you.


Production and operations

Tokens per second · generation speed. Limited by memory bandwidth, not computation.

TTFT · time to first token. Depends on prefill, that is, on the size of your prompt.

Continuous batching · grouping requests dynamically. It is why the API is cheap and running it just for yourself is expensive.

PagedAttention · managing the KV cache like virtual memory, in pages. It is vLLM's central trick.

Prompt caching · reusing the KV cache of a repeated prefix. If your system always sends the same instructions, this saves a lot of money.

Guardrails · classifiers before and after the model.

Prompt injection · external text the model obeys. Unsolved.

Drift · the world changes and the model gets stale.


What gets said that is not quite right

What gets saidWhat really happens
"the model learns from our conversation"the server resends you the history every time
"it reasons"it generates intermediate tokens that improve the result
"it knows that it does not know"calibration is limited; there is no such signal
"it has forgotten"it fell out of the context and got truncated
"it is deterministic at temperature 0"nearly; dynamic batching breaks ties
"it understands"it has representations that predict well. The rest is a legitimate and open philosophical argument
"AI"in 99% of today's cases: a transformer predicting tokens
"parameters = intelligence"Chinchilla showed otherwise: data weighs just as much
"1 M context"it fits; reasoning well over all of it is another matter
"open source"almost always it means open weights: the data and the training code are not there

How not to get lost

This vocabulary will keep growing. Two criteria that hold up:

1. Always ask "what does this change in the loop?" Every new term touches one of these pieces: the data, the architecture, the training, the sampling, or what surrounds the model. If you know which one, you have understood it.

2. Be sceptical of anything that does not come with a measurement. "Improves reasoning" means nothing. "Goes from 41% to 58% on this test, against a chance level of 25%" does.

It is exactly the criterion this whole project is written with.


Back to the index: 00-mapa.md