Concepts
Short entries on how AI works. Each one links to the explainer where you can see it in action.
Search concepts and explainers/A to Z
A
- Agent loop
- The cycle inside an agent - the model reads the context and outputs a tool call, the harness runs it and appends the result, then the model reads again.
- AI agent
- A language model that outputs tool calls, plus ordinary software that runs them and feeds the results back, repeating until a stop condition is met.
- Attention
- How each token in a transformer weighs the tokens it can see (in a model that writes text, only earlier ones) and takes a weighted average of what they offer.
B
- Backpropagation
- How a neural network works out each weight's share of the blame for an error, by applying the chain rule from the loss back through every layer.
C
- Context engineering
- Choosing what goes into a model's context on each turn, from instructions and tool descriptions to retrieved passages and earlier results, and what is left out.
E
- Embedding
- A list of numbers that represents a token or a piece of text, learned so that things used in similar ways end up pointing in similar directions.
G
- Grouped-query attention
- A form of attention in which groups of query heads share one key/value head, which shrinks the KV cache with little loss in quality.
H
- Harness
- The ordinary software around the model in an agent - it builds the context, offers the tools, runs the calls, enforces permissions and applies the stop rules.
- Human in the loop
- A point in an agent loop where the harness pauses and a person must approve, change or refuse an action before it runs.
K
- KV cache
- The stored keys and values of every token a model has already read, kept so each new token needs only its own key and value computed.
L
- Learning rate
- How far each training step moves a network's weights against their gradient; too small and training crawls, too large and it overshoots.
- Logits
- The raw numbers a language model outputs, one for every token in its vocabulary, before softmax turns them into probabilities.
M
- Memory for weights and KV cache
- What running a model locally needs in memory, which is its weights plus a KV cache that grows with the context, plus room for the runtime.
- Mixture of experts
- A model design where each layer has many smaller expert blocks and a router that runs only a few of them for each token.
P
- Prefill and decode
- The two phases of a reply, where prefill reads the whole prompt in parallel and decode then writes the answer one token at a time.
- Prompt injection
- Text that reaches a model as data, such as a web page or a file, but contains instructions the model may follow as if they came from the user.
Q
- Quantisation
- Storing a model's weights with fewer bits, in blocks that share a scale, so the model takes less memory and runs faster at a small cost in quality.
R
- Retrieval
- Searching your own documents for the passages that best match a question and handing them to a language model with the question.
S
- Sampling
- Choosing the next token at random from a model's probabilities, after temperature and filters such as top-k, top-p and min-p reshape them.
- Softmax
- A function that turns a list of numbers into probabilities that add up to 1, by exponentiating each one and dividing by the total.
- Stop condition
- A rule in the harness that ends an agent loop, such as the model giving a final answer, a step limit, a token budget or an error.
T
- Token
- One piece of text from a model's fixed vocabulary, such as a word, part of a word or a single byte, stored as a whole-number ID.
- Tokenisation
- Cutting text into the pieces a language model reads, using a fixed vocabulary learned from a large sample of text.
- Tool calling
- A model outputting a structured request, such as a tool name and its arguments, that ordinary software reads, checks and runs on the model's behalf.
- Trace
- A step-by-step record of one agent run, with each model call, tool call and result, used to find what went wrong and improve the harness.
- Training memory
- The memory needed to train a model, which is its weights plus their gradients plus the optimiser's running state, before counting activations.
V
- Verification loop
- A loop where a grader, such as a test, a rule or another model call, checks an output and sends it back with feedback until it passes or a limit is hit.
W
- Workflow graph
- A fixed map of steps written in ordinary software, where code chooses which step runs next and a model fills in only some of the steps.