Glossary: AI & LLMs
All 159 cards in this deck
Every AI and LLM term in the glossary, as recall pairs — models, training, agents, evaluation. Answer each question before you open it — then run the review above, which schedules every card with spaced repetition so it comes back right before you would forget it.
Attention (self-attention, scaled dot-product attention)
The operation that lets each token look at every other token and weight how much to listen to each.
Transformer
The neural-network architecture behind virtually every modern language model.
Token
The unit a model actually reads and writes — a sub-word chunk, not a character or a word.
Tokenization (BPE)
Splitting text into tokens, usually with byte-pair encoding that merges frequent character pairs.
Context Window
The maximum number of tokens a model can consider in one request — a hard, shared budget.
Agent
A model wrapped in a loop that lets it call tools, read the results, and act until a task is done.
Loop Engineering (agent loops, outer loop)
Designing the system that prompts your agent for you — trigger, framing, verification, state, and a stopping condition.
Tool Calling (function calling)
How a model reaches beyond text: it emits a structured call and your code runs the function.
Model Context Protocol (MCP) (MCP)
An open standard for connecting models to tools and data through a common server interface.
Prompt Injection
An attack where malicious text in the input overrides the developer’s instructions.
Hallucination
When a model states something fluent and confident that is simply not true.
LLM-as-a-Judge
Using a strong model with a rubric to score other models’ outputs, at scale.
Temperature
The decoding dial that flattens or sharpens the next-token distribution.
Softmax
Turns a vector of raw scores (logits) into a probability distribution that sums to 1.
Cross-Entropy Loss
The training loss that measures how surprised the model was by the correct answer.
Fine-Tuning
Continuing to train a pretrained model on your data to specialize its behavior.
Prompt Caching
Reusing the processed prefix of a prompt so you don’t re-pay to encode it every turn.
Mixture of Experts (MoE) (MoE)
A model that routes each token to a few specialist sub-networks instead of the whole network.
Chain of Thought (CoT)
Prompting a model to reason step by step before answering, improving hard multi-step tasks.
Context Engineering (context management, context curation)
Curating everything the model sees each step — the discipline that replaced prompt-tweaking.
KV Cache (key-value cache)
The stored attention state that lets a model generate each new token without re-reading the whole prompt.
Quantization (int8, int4, FP8)
Storing model weights in fewer bits — smaller, faster, cheaper, with a small quality haircut.
Distillation (knowledge distillation, teacher-student)
Training a small “student” model to imitate a large “teacher” — capability at a fraction of the cost.
Speculative Decoding (draft model, speculative sampling)
A small model drafts several tokens ahead; the big model verifies them in one pass — same output, faster.
LoRA (low-rank adaptation, QLoRA, adapters)
Fine-tuning by training tiny low-rank matrices alongside frozen weights — 1000× fewer trainable parameters.
RLHF (reinforcement learning from human feedback)
Training a model against a learned reward of human preferences — how raw LLMs become helpful assistants.
DPO (direct preference optimization)
Preference alignment as a simple classification loss — RLHF’s results without training a reward model.
GRPO (group relative policy optimization)
The RL method behind DeepSeek-R1: score groups of sampled answers relative to each other, no value network.
Test-Time Compute (inference-time scaling, reasoning models, thinking tokens)
Making a model smarter by letting it think longer at inference — the scaling axis behind o1/R1-class models.
Guardrails
The checks around a model that catch bad inputs and outputs — policy enforced outside the weights.
Jailbreak
A prompt crafted to make a model ignore its safety rules — and the practice of hunting for them.
System Prompt
The standing instructions a model receives before any user input — identity, rules, output contract.
Structured Outputs (JSON mode, constrained decoding)
Forcing model output to match a schema — the difference between text you parse and data you trust.
Few-Shot Prompting
Teaching by example inside the prompt — the model imitates demonstrations without any training.
Top-p Sampling (nucleus sampling)
Sampling from the smallest set of tokens whose probabilities sum to p — adaptive randomness control.
Beam Search
Decoding that keeps the k best partial sequences instead of one — search, not sampling.
Perplexity
How surprised a model is by text — the classic intrinsic measure of language-model quality.
Grounding
Tying model claims to supplied sources — answer from the documents, not from vibes.
Continuous Batching (dynamic batching, in-flight batching)
Serving many users per GPU by advancing all in-flight generations together, admitting new ones mid-flight.
Time to First Token (TTFT)
How long until the first token of the reply appears — the latency number chat users actually feel.
Agent Skills (skills)
Packaged, on-demand instruction bundles an agent loads only when the task calls for them.
Harness (harness engineering)
The orchestration code around a model — the loop, tools, retries, budgets — that turns it into a product.
World Model
A learned simulator of how an environment evolves — imagine outcomes before acting in the real world.
Multimodal Model (VLM, vision-language model)
One model over several modalities — text, images, audio, video — in a shared token space.
A2A Protocol (agent-to-agent protocol, Agent2Agent)
The open standard for agents talking to other agents — discovery, task delegation, and result exchange.
SWE-bench (SWE-bench Verified)
The benchmark behind every coding-agent claim: resolve real GitHub issues in real repos, graded by real tests.
Vibe Coding (agentic coding)
Describing what you want and accepting AI-written code without reading it closely — prototyping’s new superpower and production’s new risk.
Tensor Parallelism
Splitting an individual weight matrix across GPUs so one layer’s math runs cooperatively on several devices at once.
Pipeline Parallelism
Splitting a model’s layers across GPUs, so one device holds the early layers and another holds the later ones.
Data Parallelism
Copying the whole model onto every GPU and splitting the batch across them, syncing gradients each step.
ZeRO / FSDP (ZeRO, Fully Sharded Data Parallel, FSDP)
Sharding optimizer state, gradients, and even parameters across GPUs instead of replicating them on every one.
Gradient Checkpointing (activation checkpointing)
Trading extra compute for less memory by recomputing activations during the backward pass instead of storing them.
Mixed Precision Training (fp16, bf16, AMP)
Running most of training in 16-bit numbers for speed and memory, while keeping a 32-bit master copy of the weights for stability.
Learning Rate Schedule (warmup, cosine decay)
Changing the step size during training — usually a short warmup up, then a long decay down — instead of holding it fixed.
Gradient Clipping
Capping the size of the gradient before applying it, so one unusually large batch can’t blow up training.
Catastrophic Forgetting
Fine-tuning on a new task quietly erodes capabilities the model already had, because every weight is free to move.
Scaling Laws
The empirical, roughly power-law relationship between a model’s size, its training data, its compute budget, and its loss.
Inference
Running a trained model forward to produce an output — as opposed to training, which updates its weights.
Continuous Batching (in-flight batching)
Adding and removing requests from a running batch on the fly, instead of waiting for a fixed batch to fill before starting.
PagedAttention
Managing the KV-cache in fixed-size, non-contiguous memory pages — like an OS managing virtual memory — instead of one big reserved block per request.
RoPE (Rotary Position Embedding) (rotary position embedding)
Encoding a token’s position by rotating its query/key vectors by an angle proportional to position, instead of adding a learned position vector.
FlashAttention
An exact attention algorithm that avoids ever materializing the full attention matrix in slow GPU memory.
Layer Normalization (LayerNorm, RMSNorm)
Rescaling a layer’s activations to a stable range on every forward pass, so deep networks train without exploding or vanishing.
Residual Connection (skip connection)
Adding a layer’s input directly to its output, so gradients have a direct path back through very deep networks.
Model Parallelism
The umbrella term for splitting one model’s compute across multiple devices — tensor parallelism and pipeline parallelism are its two main forms.
Red-Teaming
Deliberately attacking your own model or system to find its failure modes before a real adversary does.
Prompt Leaking
Tricking a model into revealing its own system prompt or hidden instructions that were never meant to be shown to the user.
Data Poisoning
Deliberately corrupting a model’s training data so it learns a hidden backdoor or a biased, attacker-chosen behavior.
Model Extraction (model stealing)
Querying a model enough times to train a cheap substitute that mimics its behavior — effectively stealing it without the weights.
Attribution Graph
A graph tracing which internal features caused a model’s output, used to reverse-engineer its reasoning.
Feature (SAE) (sparse feature, monosemantic feature)
An interpretable direction in a model’s activations, pulled out by a sparse autoencoder as a single human-meaningful concept.
Verifier
A program that scores whether an output is correct — the reward source in reinforcement learning from verifiable rewards.
Rollout
One sampled attempt at a task, start to finish, used to compute a reward during RL training.
Environment Hub
A shared catalog of RL training environments — tasks bundled with their verifiers — that agents train against.
Time Horizon (50%) (50% time horizon, task time horizon)
The length of task an AI agent can complete at 50% reliability — a single trendable measure of capability.
Diffusion LLM (dLLM, text diffusion)
A language model that generates text by iteratively denoising all tokens in parallel, instead of one at a time left to right.
Block Diffusion
A hybrid that runs autoregressively across blocks of tokens but uses diffusion to fill in each block.
Engram
A stored memory trace an agent writes during a task and later retrieves — a durable record of past experience.
Effort Level (reasoning effort, thinking budget)
A control that sets how much reasoning or compute a model spends before answering — usually low, medium or high.
Spec-Driven Development (SDD)
Writing an explicit specification an AI agent implements against, moving the human role to authoring the spec and reviewing the result.
On-Policy Distillation
Distilling a teacher into a student using the student’s own sampled outputs, rather than a fixed teacher-generated dataset.
Backpropagation (backprop)
The algorithm that computes how much each weight contributed to the error, so the network knows which way to adjust.
Gradient Descent (SGD, stochastic gradient descent)
Nudge each weight a little in the direction that most reduces the loss; repeat until it stops improving.
Overfitting
When a model memorizes the training data’s noise instead of the pattern, so it aces training but fails on new data.
Regularization
Techniques that penalize complexity so a model generalizes instead of memorizing.
Epoch
One full pass of the training algorithm over the entire training dataset.
Batch Size
How many training examples the model processes before each weight update.
Logits
The raw, unnormalized scores a model outputs before softmax turns them into probabilities.
Activation Function
The nonlinear function at each neuron that lets a network learn more than straight lines.
Encoder-Decoder (seq2seq)
An architecture that reads an input sequence into a representation (encoder) then generates an output from it (decoder).
Zero-Shot
Getting a model to do a task from instructions alone, with no examples in the prompt.
ReLU (rectified linear unit)
The simplest activation function: pass positive values through, zero out negatives.
GELU (gaussian error linear unit)
A smooth version of ReLU used inside most transformers.
Greedy Decoding
Always pick the single highest-probability next token — deterministic, but can be repetitive.
One-Hot Encoding
Representing a category as a vector of all zeros with a single one — the raw form before dense embeddings.
Cross-Attention
Attention where queries come from one sequence and keys/values from another — how a decoder looks at an encoder.
Positional Encoding
How a transformer is told the ORDER of tokens, since attention itself is order-blind.
Autoregressive
Generating a sequence one token at a time, each conditioned on all the tokens produced so far.
In-Context Learning (ICL)
A model adapting to a task from examples in the prompt, without any weight updates.
Stop Sequence
A string that tells the model to stop generating as soon as it produces it.
Logit Bias
A per-token nudge added to the model’s logits to make specific tokens more or less likely.
Prompt Template
A reusable prompt with placeholders you fill in per request — the unit of prompt reuse in an app.
Byte-Pair Encoding (BPE)
The algorithm most tokenizers use: repeatedly merge the most frequent adjacent symbol pair to build a subword vocabulary.
Lost in the Middle
The tendency of LLMs to use information best at the START and END of a long context, and miss what is buried in the middle.
Golden Dataset (golden set, eval set)
A curated set of inputs with known-good answers, used as the ground truth for evaluating a model or pipeline.
Transfer Learning
Reusing a model pretrained on a big general task as the starting point for a specific one — the foundation of modern AI.
Ensemble (bagging, boosting)
Combining several models’ predictions to beat any single one — averaging out their independent errors.
Hyperparameter
A setting you choose before training (learning rate, batch size, layers) — as opposed to the weights the model learns.
Loss Function (objective function)
The single number training tries to minimize — it measures how wrong the model’s predictions are.
CNN (convolutional neural network)
Convolutional Neural Network: slides small filters over an image to detect local patterns, the workhorse of computer vision.
RNN (recurrent neural network)
Recurrent Neural Network: processes sequences one step at a time, carrying a hidden state — the pre-transformer sequence model.
LSTM (long short-term memory)
Long Short-Term Memory: an RNN with gates that let it remember information over long sequences, mitigating vanishing gradients.
GAN (generative adversarial network)
Generative Adversarial Network: a generator and a discriminator train against each other until the fakes fool the critic.
Autoencoder
A network trained to reconstruct its input through a narrow bottleneck, learning a compressed representation.
Decision Tree
A model that predicts by asking a series of yes/no questions about the features — interpretable but prone to overfitting.
Random Forest
An ensemble of many decision trees trained on random data/feature subsets, averaged — accurate and hard to overfit.
Gradient Boosting (XGBoost, LightGBM)
An ensemble that builds trees sequentially, each correcting the last one’s errors — the top performer on tabular data.
K-Means (k-means clustering)
A clustering algorithm that partitions data into k groups by iteratively assigning points to the nearest center.
PCA (principal component analysis)
Principal Component Analysis: reduces dimensions by projecting data onto the axes of greatest variance.
SVM (support vector machine)
Support Vector Machine: finds the boundary that separates classes with the widest margin — strong for small, clean datasets.
Feature Engineering
Crafting better input features from raw data — often the highest-leverage work in classical ML.
Cross-Validation (k-fold)
Estimating a model’s true performance by training and testing on multiple data splits, not just one.
Bias-Variance Tradeoff
The core tradeoff in ML: too simple a model underfits (high bias), too complex overfits (high variance).
Confusion Matrix
A table of a classifier’s predictions vs. reality — true/false positives and negatives — the basis of most metrics.
ROC-AUC (AUC, area under the curve)
A single number (0.5–1.0) summarizing how well a classifier ranks positives above negatives across all thresholds.
Logistic Regression
A simple, interpretable model for binary classification — outputs a probability via the logistic (sigmoid) function.
Linear Regression
The simplest predictive model: fit a straight line (weighted sum of features) to predict a continuous value.
Data Leakage
When information the model will not have at prediction time sneaks into training — great offline scores, collapse in production.
Early Stopping
Halting training when validation performance stops improving — a simple, effective guard against overfitting.
Momentum
An optimizer trick: accumulate a running average of past gradients to speed up and smooth training.
Weight Decay (L2 regularization, AdamW)
A regularizer that shrinks weights toward zero each step, discouraging over-large parameters and overfitting.
Latent Space
The compressed, abstract representation space a model maps data into — where similar things sit close together.
k-Nearest Neighbors (KNN)
Classify or predict a point by looking at the k closest labeled examples — no training, just distance.
Naive Bayes
A fast probabilistic classifier that assumes features are independent — surprisingly effective for text.
Pruning (model pruning)
Removing unimportant weights or neurons from a trained model to shrink and speed it up with little accuracy loss.
Model Drift (data drift, concept drift)
A deployed model getting worse over time as the real-world data diverges from what it was trained on.
Supervised Learning
Learning from labeled examples — the model sees inputs paired with correct answers and learns to map one to the other.
Unsupervised Learning
Finding structure in unlabeled data — clustering, dimensionality reduction — with no correct answers to learn from.
Reinforcement Learning (RL)
Learning by trial and error: an agent takes actions, gets rewards, and learns a policy that maximizes long-term reward.
Self-Supervised Learning
Learning from unlabeled data by creating the labels from the data itself — predict a hidden part from the rest.
Convolution
The core operation of a CNN: slide a small filter across the input, computing a weighted sum at each position.
Pooling (max pooling, average pooling)
Downsampling a feature map (usually taking the max or average over small regions) to shrink it and add invariance.
Multi-Head Attention
Running several attention operations in parallel, each learning to focus on a different kind of relationship.
Feed-Forward Network (FFN, MLP block)
The per-token MLP inside each transformer block — where much of the model’s knowledge is stored.
Ground Truth
The verified correct answer used to train and evaluate a model — the reference reality it is measured against.
t-SNE
A technique for visualizing high-dimensional data in 2D/3D by preserving which points are neighbors.
UMAP
A faster dimensionality-reduction method for visualization that preserves more global structure than t-SNE.
Model Card
A short document describing a model’s intended use, training data, performance, and limitations — its nutrition label.
Sigmoid
The classic S-shaped activation that squashes any number into (0,1) — used for probabilities and gates.
Tanh (hyperbolic tangent)
An S-shaped activation like sigmoid but centered at zero, squashing inputs to (−1, 1).
Instruction Tuning
Fine-tuning a base model on many (instruction, response) pairs so it learns to follow instructions instead of just completing text.
Active Learning
Letting the model choose which unlabeled examples to have labeled next — labeling the most informative ones first.
Applied AI Engineer
A frontier-lab framing of forward-deployed work: an AI engineer pointed at a specific customer’s deployment.
Agent Engineer
An engineer who builds, tunes and operates customer-specific agents, and owns their behaviour in production.
Inter-Annotator Agreement (inter-expert agreement)
How often two humans doing the same labelling task give the same answer — the practical ceiling on any model’s measured accuracy.
Eval Gate
A CI check that blocks a change when evaluation results fall below agreed thresholds — the point at which an eval stops being a document.
Override Rate
The share of a system’s outputs that a human changes before acting on them — simultaneously a quality signal, a trust signal, and a source of labels.
Last-Mile Gap
The distance between a model that works in a demo and a system that changes a specific organisation’s workflow — the gap FDEs exist to close.
Agent Harness
The scaffolding around a model that turns it into a working system — and, increasingly, the thing engineers build instead of the feature code itself.