LLM Foundations

Glossary

Every LLM Foundations term in plain words, with the module that teaches it. Inside modules, any word with a dotted underline explains itself.

LLM Foundations · 84 terms

A

Alignment
Shaping a model's behaviour to be helpful, honest and harmless as intended, typically with preference training after fine-tuning.
Learn it in “Alignment: RLHF, DPO & friends” →
Attention
The mechanism that lets each token take information from other tokens, weighting each by how relevant it is. The core of the transformer.
Think of it as: Glancing back at the words in a sentence that help you understand the current one.
Learn it in “Attention” →
Attention head
One independent attention calculation with its own learned weights. Each head can learn a different pattern of looking.
Learn it in “Attention” →
Automation bias
People's tendency to trust and approve a machine's suggestion, even when it's wrong, especially when they review many of them quickly.
Learn it in “Bias, privacy & responsible use” →

B

Base model
A model straight out of pretraining. It continues text like a document rather than answering like an assistant.
Learn it in “From base model to assistant” →
Batching
Processing several requests together so each read of the model's weights serves all of them. Raises total throughput; each request gets a little slower.
Learn it in “Serving at scale” →
Bias (in AI systems)
When a system's errors or outcomes fall unfairly on some groups more than others. It can come from training data, from the question the system is asked (including stand-in “proxy” features), or from how its answers are used.
Learn it in “Bias, privacy & responsible use” →
Byte-pair encoding (BPE)
A way to learn a tokenizer's vocabulary: start from characters (or bytes) and repeatedly merge the most frequent neighbouring pair into a new token.
Learn it in “Tokens” →

C

Calibration
How well a model's confidence matches reality: a calibrated model's 90%-confident answers are right about 90% of the time. Measured over many predictions, for example with expected calibration error (Guo et al., 2017).
Learn it in “Small & on-device models” →
Causal mask
Blocking attention to later tokens, so each position can only use what came before it, as in next-token prediction.
Learn it in “Attention” →
Chain of thought
Intermediate reasoning steps a model writes before its answer. Because the model's only working space is its own output, writing steps lets it use them.
Learn it in “Reasoning models” →
Chat template
The format that turns a conversation (system instructions, user and assistant messages) into one piece of text with special markers, which the model then continues.
Learn it in “What an LLM actually does” →
Constrained decoding
Blocking, at every step of generation, any token that would break a required format (such as a JSON schema), so the output is guaranteed to fit. It fixes the shape, not the truth.
Learn it in “Structured output & tool calling” →
Context engineering
Choosing, for each request, what goes into a model's context window (instructions, documents, history, tool results) and in what order.
Learn it in “Context engineering” →
Context window
The maximum number of tokens a model can take into account at once, covering instructions, documents, conversation and its own output.
Think of it as: The model's working memory, or the desk it can spread papers on.
Learn it in “Positions & the context window” →
Continuous batching
Letting requests join and leave a running batch at every decode step, instead of waiting for the whole batch to finish. Keeps the GPU busy.
Learn it in “Serving at scale” →
Cosine similarity
A measure of how closely two vectors point in the same direction: 1 for the same direction, 0 at right angles, −1 for opposite.
Learn it in “Embeddings: meaning as coordinates” →
Counterfactual test
Running the same case many times while changing only one detail that shouldn't matter (a name, gender or language) and checking whether the answer changes. A simple, direct bias check.
Learn it in “Bias, privacy & responsible use” →

D

Data minimisation
Collecting and keeping only the personal data a purpose actually needs, for only as long as it's needed.
Learn it in “Bias, privacy & responsible use” →
DPDP Act
India's Digital Personal Data Protection Act, 2023, with the DPDP Rules notified on 14 November 2025. It limits personal data to stated purposes, requires valid consent or a listed legitimate use, and gives people rights to access, correct and erase their data. Most duties apply from 14 May 2027.
Learn it in “Bias, privacy & responsible use” →

E

Embedding
A list of numbers (a vector) that represents a piece of text, placed so that texts with similar meanings have similar vectors.
Think of it as: Coordinates on a map where nearby places have similar meanings.
Learn it in “Embeddings: meaning as coordinates” →
Eval
A set of test inputs with automatic or human checks, run against a prompt or model to measure how well it does, so changes can be compared instead of guessed.
Learn it in “Prompting fundamentals” →

F

Few-shot prompting
Including a few worked examples (input and ideal output) in the prompt so the model copies their style and shape. With no examples it's called zero-shot.
Learn it in “Prompting fundamentals” →
Finish reason
A field in an LLM API's response saying why generation stopped: the model finished (“stop”, “end_turn”, “STOP”), it hit the output limit (“length”, “max_tokens”, “MAX_TOKENS”), it called a tool, or a safety filter stepped in. Names differ by provider; a hit limit means the answer was cut off.
Learn it in “Capstone: the assistant that misbehaves” →

G

Grounding
Giving a model trusted sources in its context and asking it to answer only from them, ideally with citations, so answers can be checked.
Learn it in “Hallucinations” →

H

Hallucination
A fluent, confident model output that is false or unsupported, such as an invented fact, name or citation.
Learn it in “Hallucinations” →
Human in the loop
A design where a person reviews or approves an AI system's output before it has a real effect, especially for decisions that matter to someone.
Learn it in “Bias, privacy & responsible use” →

I

Inference
Running a trained model to produce outputs, as opposed to training it. For an LLM: reading the prompt (prefill), then generating tokens one at a time (decode).
Learn it in “Inference: prefill, decode & the KV cache” →
Instruction tuning
Fine-tuning a base model on examples of instructions and good responses so it follows requests helpfully.
Learn it in “From base model to assistant” →

J

JSON schema
A precise description of the JSON a program expects: which fields, their types, allowed values and which are required. Used to check data, and to constrain model output.
Learn it in “Structured output & tool calling” →

K

Knowledge distillation
Training a small “student” model to reproduce a bigger “teacher” model's outputs (ideally its full probabilities), so the student gains much of the teacher's skill at a fraction of the cost.
Learn it in “Small & on-device models” →
KV cache
Stored keys and values for every token already processed, so each new token only computes its own. It grows with the context and can use as much memory as the model itself.
Learn it in “Positions & the context window” →

L

Large language model (LLM)
A neural network trained on huge amounts of text to predict the next token. Chat assistants are LLMs that generate replies one token at a time.
Think of it as: Phone autocomplete, scaled up enormously.
Learn it in “What an LLM actually does” →
Least privilege
Giving a system only the powers it needs. For an AI agent: the fewest tools, narrowest permissions and tightest limits, so a fooled model can do little harm.
Learn it in “Prompt injection & data leakage” →
Lethal trifecta
The dangerous combination of access to private data, exposure to untrusted content, and a way to send data out. When all three are present, a prompt injection can steal data. Removing any one breaks it.
Learn it in “Prompt injection & data leakage” →
Logit lens
A research technique that reads a model's prediction from the middle of its layer stack, to see how the answer forms.
Learn it in “The transformer block” →
LoRA (low-rank adaptation)
A cheap fine-tuning method that freezes the original weights and trains small low-rank matrices added on top.
Learn it in “From base model to assistant” →
Loss
A number measuring how wrong a model's predictions are during training (for LLMs, how surprised it was by the actual next token). Training works by making it smaller.
Learn it in “Pretraining & scaling laws” →

M

Memory bandwidth
How many bytes per second a chip can read from its memory. Because every generated token needs a full read of the weights, it caps decode speed.
Learn it in “Inference: prefill, decode & the KV cache” →
Mixture of experts (MoE)
A model whose feed-forward layers are split into many experts, with a router choosing a few per token. All experts must be in memory, but each token uses only a fraction of the parameters.
Learn it in “Model size, memory & quantization” →
Model Context Protocol (MCP)
An open standard for connecting tools and data sources to AI applications, so a tool server written once works with any MCP-capable app.
Learn it in “Structured output & tool calling” →
Model licence
The legal terms for using a model's weights: whether commercial use is allowed, with what conditions (attribution, user limits, acceptable-use rules) and whether you can modify and share it.
Learn it in “Open vs closed models” →
Model routing
Sending each request to the cheapest model that can handle it well, for example easy questions to a small model and hard ones to a large model.
Learn it in “Cost & latency estimation” →
Multi-head attention
Running several attention heads side by side in a layer and combining their results.
Learn it in “Attention” →
Multimodal model
A model that works with more than one kind of data, such as text plus images, audio or video, usually by turning each into tokens one transformer can process.
Learn it in “Multimodal models” →

N

Next-token prediction
The task LLMs are trained on: given the text so far, give a probability for every possible next token. Generating text repeats this one token at a time.
Learn it in “What an LLM actually does” →

O

Open weights
A model whose trained parameters can be downloaded and run by anyone, under a licence. Unlike full open source, the training data and code are usually not published.
Learn it in “Open vs closed models” →

P

PagedAttention
vLLM's technique of storing the KV cache in small fixed-size pages allocated on demand, like virtual memory, so far less GPU memory is wasted and bigger batches fit.
Learn it in “Serving at scale” →
Parameter
One of the learned numbers (weights) inside a model. Model size is usually given as a parameter count, such as 8 billion.
Learn it in “The transformer block” →
Perplexity
A measure of how surprised a language model is by real text: the exponential of its average loss. Lower is better; comparing it before and after a change shows what was lost.
Learn it in “Model size, memory & quantization” →
Pivot translation
Translating a user's question into a “pivot” language (usually English) with a dedicated translation model, answering in that language, then translating the answer back. It uses fewer tokens and a model's strongest language, at the cost of some nuance and extra delay.
Learn it in “Capstone: choose and size a model” →
Positional encoding
Information added to tokens so the model knows their order. Most modern models use rotary position embeddings (RoPE), which rotate queries and keys by an angle based on position.
Learn it in “Positions & the context window” →
Pretraining
The first, largest stage of training: predicting the next token across trillions of tokens of text, which gives a model its general knowledge and skills.
Learn it in “Pretraining & scaling laws” →
Prompt
Everything you send a model for one request: instructions, background, examples and the input to work on. It is the model's whole brief.
Learn it in “Prompting fundamentals” →
Prompt caching
Reusing the provider's work on a prompt's unchanged beginning across requests, so those tokens are billed at a steep discount and processed faster.
Learn it in “Context engineering” →
Prompt injection
An attack where untrusted text (in a user message, an email, a web page or a document) is treated by the model as instructions, making it act against the operator's intent. Indirect injection hides the instruction in content the model reads.
Learn it in “Prompt injection & data leakage” →

Q

Quantization
Storing a model's numbers with fewer bits (for example 8 or 4 instead of 16), so it needs less memory and runs faster, usually at a small cost in quality.
Learn it in “Model size, memory & quantization” →
Query, key and value
Three vectors computed for each token in attention: the query says what it looks for, keys say what each token offers, and values carry the information that gets mixed in.
Think of it as: Your question, the labels on library shelves, and the books themselves.
Learn it in “Attention” →

R

Reasoning model
A model trained to write out its thinking (often at length) before giving a final answer, which improves results on hard, multi-step problems.
Learn it in “Reasoning models” →
Reward model
A model trained on human (or AI) comparisons to score how good an answer is; used to steer another model during training.
Learn it in “Alignment: RLHF, DPO & friends” →
RLHF
Reinforcement learning from human feedback: people compare answers, a reward model learns their preferences, and the model is trained to score highly on it.
Learn it in “Alignment: RLHF, DPO & friends” →

S

Sampling
Choosing the next token from the model's probability distribution, rather than always taking the most likely one.
Learn it in “From scores to words: sampling” →
Scaling law
A formula, fitted to experiments, that predicts how a model's loss falls as parameters, training data and compute grow.
Learn it in “Pretraining & scaling laws” →
Small language model
A model with millions to a few billion parameters, small enough to run cheaply on a laptop, phone or a single modest GPU; often best at narrow, well-defined tasks.
Learn it in “Small & on-device models” →
Softmax
A function that turns a list of scores into probabilities that add up to 1, by exponentiating each and dividing by the total.
Learn it in “From scores to words: sampling” →
Streaming
Sending an answer to the user token by token as it's generated, instead of all at once at the end, so reading can start after the first token.
Learn it in “Cost & latency estimation” →
Supervised fine-tuning (SFT)
Further training a pretrained model on example conversations (prompt and ideal answer), usually counting loss only on the answer tokens.
Learn it in “From base model to assistant” →
Sycophancy
A model telling users what they want to hear (agreeing, flattering) rather than what's true or useful, often learned from preference training.
Learn it in “Alignment: RLHF, DPO & friends” →
System prompt
Standing instructions sent in a separate message before the conversation (the role, rules and tone) that apply to every turn. Some APIs call it the developer message.
Learn it in “Prompting fundamentals” →

T

Temperature
A sampling setting that divides the scores before softmax: below 1 makes likely tokens even likelier (more predictable), above 1 flattens the distribution (more varied, eventually nonsensical).
Learn it in “From scores to words: sampling” →
Test-time compute
Computation spent when answering (for example, thinking tokens) rather than during training. More can improve accuracy on hard problems, at a cost in time and money.
Learn it in “Reasoning models” →
Throughput
Total work done per unit of time, such as tokens per second across all users. Contrasts with latency, how long one request takes.
Learn it in “Serving at scale” →
Time to first token (TTFT)
How long after sending a request the first output token arrives. Mostly the prefill of the prompt, plus queueing and network time.
Learn it in “Inference: prefill, decode & the KV cache” →
Token
A chunk of text (a word, part of a word, a punctuation mark or a space) from a model's fixed vocabulary. Models read and write tokens, and are priced and limited by them.
Learn it in “Tokens” →
Tokenizer
The program that splits text into tokens and turns them into ID numbers, and back again.
Learn it in “Tokens” →
Tool calling
Letting a model ask for a function to be run (by writing its name and arguments). Your code runs it and sends the result back. Also called function calling or tool use.
Learn it in “Structured output & tool calling” →
Top-k sampling
Only the k most likely tokens may be chosen; the rest are discarded before sampling.
Learn it in “From scores to words: sampling” →
Top-p (nucleus) sampling
Only the smallest set of most likely tokens whose probabilities add up to p may be chosen.
Learn it in “From scores to words: sampling” →
Trace (LLM)
A record of one request to an LLM app: the user's input, the system prompt version, any retrieved pages or tool calls, the settings (model, temperature, max tokens), the output with its token counts and finish reason, and timings. The first thing to read when an answer goes wrong.
Learn it in “Capstone: the assistant that misbehaves” →
Transformer
The neural network design behind modern LLMs (2017): a stack of identical blocks, each with an attention layer and a feed-forward layer.
Learn it in “The transformer block” →
Transformer block
One repeating unit of a transformer: attention (tokens exchange information) followed by a feed-forward network (each token processed on its own), each added back into the running vector.
Learn it in “The transformer block” →

V

Vision transformer (ViT)
A transformer that reads an image as a sequence of small square patches, each turned into a vector, instead of a sequence of words.
Learn it in “Multimodal models” →
Vocabulary
The fixed set of tokens a model knows, each with an ID number. Modern vocabularies hold about 100,000 to 260,000 tokens.
Learn it in “Tokens” →

General terms · shared by every track

A

ACID
Four guarantees for transactions: Atomic (all or nothing), Consistent (rules hold), Isolated (concurrent work doesn't interfere), Durable (once done, it stays done).
Learn it in “ACID on object storage” →
Atomic
All or nothing. An atomic change either happens completely or not at all, and nobody ever sees it half done.
Think of it as: Handing over a sealed envelope: the other person has it or doesn't. There's no half-handed envelope.
Learn it in “Object storage: the ground floor” →

B

Batch processing
Processing data in scheduled chunks, such as every night or every hour.
Learn it in “Getting data in” →

C

CSV
Comma-separated values: plain text, one row per line. Easy to read, slow and large for analytics, and no schema.
Learn it in “Rows vs columns: file formats” →

I

Idempotent
Safe to run twice: running the job again gives the same result instead of duplicating data.
Learn it in “Medallion architecture” →

J

JSON
A text format of nested key-value objects, like {"id": 7}. Common for app events and APIs, and used by Delta's transaction log.
Learn it in “Rows vs columns: file formats” →

M

Metadata
Data about data: which files exist, their schema, sizes and statistics. Engines read metadata first to plan work.
Learn it in “What makes a table a table” →

S

Schema
The structure of a table: its column names and types, such as order_id: long, amount: decimal.
Learn it in “Schema evolution & enforcement” →
SQL
The standard language for querying tables: SELECT … FROM … WHERE …
Learn it in “Hands-on: query in your browser” →
Streaming
Processing data continuously as it arrives, within seconds or minutes.
Learn it in “Getting data in” →

T

Transaction
A group of changes that succeeds or fails as one unit.
Think of it as: A money transfer: debit one account and credit the other, or do neither.
Learn it in “ACID on object storage” →