Glossary
294 terms. Each links to the lesson where it is explained properly.
A convolution with a 1×1 kernel, i.e. a per-pixel linear layer across channels. Used to change channel counts cheaply in bottlenecks and Inception modules.
Agent-to-Agent protocol: a standard for agents from different vendors to discover each other, exchange tasks and stream results.
Removing or altering one component at a time to measure its contribution to a result. The evidence that separates real improvements from lucky configurations.
The elementwise nonlinearity applied after a linear layer (sigmoid, tanh, ReLU, GELU). Without it, stacked linear layers collapse into a single linear map.
An optimizer keeping bias-corrected running averages of the gradient () and squared gradient () and stepping per parameter. AdamW applies weight decay directly to the weights and is the standard choice for training transformers.
An input with a tiny, deliberately crafted perturbation, for example (FGSM), that flips a model's prediction while looking unchanged to a human.
A language model that runs in a loop: observe (context and tool results), reason, act (call tools), and repeat until a goal is met or a budget is exhausted. It chooses its own steps, unlike a workflow with a fixed path.
The software around the model: tool definitions, the loop, state and progress files, verifiers, permissions, budgets and logging. For long-running agents the harness determines reliability as much as the model does.
The control loop that sends the conversation to the model, executes any tool calls it returns, appends the results, and repeats until the model stops calling tools or a step or cost budget is reached.
What an agent keeps beyond the current prompt: working memory (the context), episodic memory of past runs, semantic memory in retrievable stores, and procedural memory as instructions, skills and tools.
Packaged folders of instructions, scripts and resources that an agent loads on demand to perform a specialized task reliably; procedural memory shipped as files.
Letting the model decide when and what to retrieve, run several searches, and critique or verify results (Self-RAG, corrective RAG) instead of a single fixed retrieval step.
Attention with Linear Biases: instead of position embeddings, subtract a penalty proportional to the distance between query and key from the attention scores. Simple and extrapolates to longer sequences than seen in training.
Making a model's behaviour match intended goals and values (helpful, honest, harmless) and keeping it so under distribution shift and optimization pressure. Verified, not assumed.
Finding near vectors quickly by accepting a small loss in recall, using indexes such as inverted files (IVF), product quantization or HNSW instead of comparing against every vector.
A weighted average of value vectors whose weights come from the compatibility between a query and a set of keys. It lets a model focus on the relevant positions instead of compressing everything into one fixed vector.
An encoder that compresses the input to a low-dimensional latent code and a decoder that reconstructs it, trained on reconstruction error. Learns representations without labels; a linear autoencoder recovers PCA.
Automatic differentiation: the framework records every tensor operation in a graph and, when you call backward(), applies the chain rule in reverse to produce exact gradients for all parameters.
Producing a sequence one token at a time, each conditioned on all previous tokens, by sampling from and appending the result.
Reverse-mode automatic differentiation for neural networks: compute the loss in a forward pass, then propagate gradients backward through the computational graph with the chain rule, reusing intermediate values. Cost is about the same as the forward pass.
Backpropagation applied to an RNN unrolled over time. Gradients are multiplied through every step, which is why they vanish or explode and why truncation and clipping are used.
A base model continues text; an instruct (chat) model has been fine-tuned and aligned to follow instructions in a conversation format; a reasoning model has additionally been trained, usually with RL, to think in long chains before answering.
Normalizing each feature to zero mean and unit variance over the mini-batch, then rescaling with learned and . Speeds and stabilizes training but couples examples within a batch and behaves differently at inference (running statistics).
: posterior is proportional to likelihood times prior. The engine of probabilistic inference and of the Naive Bayes classifier.
Decoding that keeps the most probable partial sequences at each step instead of only the best one (greedy). Common in translation; rarely used for open-ended chat because it favours bland, repetitive text.
The recursive identity relating a state's value to its successors'. The basis of dynamic programming, temporal-difference learning and Q-learning.
A fixed dataset and metric for comparing models (MMLU, GSM8K, HumanEval, SWE-bench, GPQA). Subject to saturation, contamination and eval awareness, so headline numbers need error bars and scrutiny.
A bidirectional transformer encoder pretrained with masked language modeling and fine-tuned per task. The foundation of modern text classifiers, taggers and the embedding models used in retrieval.
A bi-encoder embeds the query and each document separately, so documents can be pre-indexed (fast, slightly less accurate); a cross-encoder reads query and document together and scores the pair (accurate, slow). Retrieve with the first, rerank with the second.
Expected squared error decomposes as . Simple models have high bias; flexible models have high variance; regularization, ensembling and more data move the balance.
A machine-translation metric based on modified n-gram precision against reference translations with a brevity penalty. Cheap and standard, but it correlates imperfectly with human judgments.
A probabilistic keyword ranking function scoring documents by saturated term frequency and inverse document frequency with length normalization. The strong sparse baseline and the lexical half of hybrid search.
Estimating the variability of a statistic by resampling the dataset with replacement many times and recomputing it. A general way to put error bars on any evaluation metric.
The rule by which arrays of different shapes combine element-wise by virtually repeating size-1 dimensions, so a bias can be added to an matrix without a loop.
A subword tokenizer trained by repeatedly merging the most frequent adjacent pair of symbols into a new token until the vocabulary is full. Byte-level BPE (GPT-2, tiktoken) can encode any text with no unknown tokens.
Loss of previously learned abilities when a model is fine-tuned on new data. Mitigated by mixing in general data, small learning rates, fewer steps or parameter-efficient methods.
Attention where future positions are masked to before the softmax so each token sees only its past. Required for autoregressive generation and for training on all positions at once.
Sums or averages of many independent random variables are approximately Gaussian regardless of the individual distributions. It is why sample means have predictable error bars and why Gaussian noise models are so common.
; in many variables, a product of Jacobians. Backpropagation is the chain rule applied systematically over a computational graph.
Prompting or training a model to write intermediate reasoning steps before its answer, which markedly improves multi-step accuracy in large models. Reasoning models learn long chains through reinforcement learning.
The exact string format, with special tokens marking system, user and assistant turns, that a chat model was trained on. Feeding a different format silently degrades outputs.
A saved snapshot of model weights (and usually optimizer and scheduler state) taken during training, used for resuming, evaluation, early-stopping selection and deployment.
The compute-optimal allocation from Hoffmann et al.: for a fixed training budget, use roughly 20 tokens per parameter. Modern models deliberately over-train past this point to make inference cheaper.
Splitting documents into retrievable pieces by fixed size, recursive separators, semantic boundaries or document structure, usually with overlap. Chunk size trades retrieval precision against the context each chunk carries.
When one class is far rarer than others, accuracy misleads (predicting the majority class scores high). Use class weights, resampling, threshold tuning and precision–recall metrics.
Steering a diffusion model toward a condition by extrapolating between conditional and unconditional predictions, . Larger guidance scale trades diversity for prompt fidelity.
A pair of image and text encoders trained contrastively on hundreds of millions of image–caption pairs so matching pairs have high cosine similarity. Enables zero-shot classification and provides the text conditioning for text-to-image models.
An agent that reads, writes, runs and tests code in a repository (Claude Code, Cursor's agent, SWE-agent). Code's verifiability (tests, compilers) makes it the leading agent domain.
Summarizing or pruning the older parts of a long agent conversation so it fits the context window while preserving the state needed to continue.
A directed acyclic graph of operations from inputs and parameters to the loss. The forward pass evaluates it; the backward pass traverses it in reverse to accumulate gradients at every node.
An agent controlling a computer through screenshots or accessibility trees and mouse and keyboard actions, to operate software that has no API.
A range computed from data that would contain the true value in a stated fraction (for example 95%) of repeated experiments. Benchmark scores without one cannot be compared honestly.
A privileged component tricked into misusing its authority on an attacker's behalf. An agent holding the user's credentials and following injected instructions is the modern example.
The table of true positives, false positives, false negatives and true negatives for a classifier at a chosen threshold; every classification metric is computed from it.
Using a written set of principles and AI-generated critiques, revisions and rankings in place of most human labels to train harmlessness. RLAIF is the general term for RL from AI feedback.
Restricting generation at every step to tokens allowed by a grammar or JSON schema, guaranteeing syntactically valid structured output.
Benchmark questions or answers appearing in a model's training data, inflating its scores. Detected with canary strings, n-gram overlap and freshly written held-out sets.
Deliberately curating what enters the model's context at each step (instructions, retrieved facts, tool results, summaries) and what is left out. The successor to prompt engineering for agents.
The degradation of model performance as the context fills with long, stale or irrelevant material. A reason to compact, retrieve just in time and keep working memory small.
The maximum number of tokens a model can attend to at once. Everything the model knows about the current task must fit in it or be retrieved into it; attention cost and KV-cache memory grow with it.
Prepending an LLM-written sentence or two describing where a chunk sits in its document before embedding and indexing it, so the chunk remains retrievable out of context.
Learning embeddings by pulling positive pairs together and pushing negatives apart, usually with the InfoNCE loss with temperature . Powers SimCLR, CLIP and text-embedding models.
A function whose chords lie above its graph, so every local minimum is global and gradient descent provably converges. Linear and logistic regression are convex; deep networks are not.
Sliding a small kernel over the input and taking a dot product at every position (technically cross-correlation in deep learning libraries). It shares weights across locations, is translation-equivariant and has far fewer parameters than a dense layer.
: similarity of directions ignoring length. The default score for comparing embeddings in search and RAG.
Attention whose queries come from one stream (the decoder) and whose keys and values come from another (the encoder output, an image, or retrieved text). How encoder–decoder models and text-to-image conditioning connect modalities.
: the expected surprise when the data follow but you predict . Minimizing it over is maximum likelihood, which makes it the standard loss for classification and language modeling.
Splitting data into folds and training times, each time holding out a different fold, to estimate generalization with less variance than one split and to tune hyperparameters without touching the test set.
In high dimensions data become sparse, random vectors are nearly orthogonal and distances concentrate, so neighbourhood methods degrade and the volume needed to cover the space grows exponentially.
Generating label-preserving variants of training examples (crops, flips, color jitter, noise, paraphrases) to enlarge the effective dataset and regularize. The strongest regularizer in vision.
Information from the test set or the future reaching training: duplicated rows, features derived from the target, or random splits of time-ordered data. It produces optimistic metrics that collapse in deployment.
Ways to split training across accelerators: replicate the model and split the data (data parallel), split one layer's matrices across devices (tensor parallel), or put different layers on different devices (pipeline parallel). ZeRO and FSDP additionally shard optimizer state and weights.
The surface in input space where a classifier's prediction changes class: a hyperplane for linear models, curved for kernels, trees and neural networks.
A model that splits data by thresholding one feature at a time, choosing splits that maximize purity (information gain or Gini decrease) until leaves are pure or a stopping rule fires. Interpretable but high-variance.
A generative model that learns to reverse a gradual noising process: a network is trained to predict the noise added to data at a random step, then samples are produced by iteratively denoising from pure noise.
Optimizing on preference pairs directly with the loss , derived from the closed-form optimum of the RLHF objective. No reward model, no sampling loop.
: a single number measuring how aligned two vectors are. Neuron pre-activations and attention scores are dot products.
The observation that test error can fall again as a model grows past the point where it interpolates the training data, contradicting the classic U-shaped bias–variance curve and explaining why huge networks generalize.
Randomly zeroing a fraction of activations during training and scaling the rest by , so units cannot rely on specific partners. Disabled at inference; acts like training an ensemble of thinned networks.
Running long workflows with persisted state and checkpoints so they survive crashes, restarts and waits for human input, resuming exactly where they stopped.
Halting training when validation loss stops improving. A regularizer that limits how far parameters travel from their initialization.
A vector with : the matrix only stretches it by the eigenvalue . Eigen-decompositions underlie PCA, spectral methods and stability analysis of optimizers.
A learned dense vector representing a discrete item (token, word, user, image, document) such that geometric relations encode semantic ones. Produced by an embedding table or by an encoder network.
An encoder trained contrastively to map text (or images) to vectors whose cosine similarity reflects semantic relatedness. The retrieval backbone of RAG; compared on the MTEB leaderboard.
Choosing the model that minimizes the average loss on the training sample, , as a proxy for the true expected risk on new data. The gap between the two is generalization error.
An encoder maps an input to a representation and may use bidirectional context; a decoder generates output one token at a time, attending to the encoder's output through cross-attention and to its own past through causal self-attention.
A transformer with a bidirectional encoder and an autoregressive decoder joined by cross-attention (T5, BART, Whisper). Strong for translation, speech and structured transformation; less common for open-ended chat.
Combining several models' predictions. Averaging independent models reduces variance (bagging, random forests); fitting models sequentially to the residual errors reduces bias (boosting).
, the expected surprise of a distribution in bits (log base 2) or nats (natural log). Uniform distributions have maximal entropy; deterministic ones have zero.
An epoch is one full pass over the training set; a batch is the subset processed in one step; an iteration is one parameter update. Steps per epoch equals dataset size divided by batch size.
One model generates a response, another evaluates it against explicit criteria, and the loop repeats until the evaluator is satisfied. Useful when good evaluation criteria exist.
: reconstruction quality minus a KL regularizer. The training objective of VAEs and the starting point for diffusion's loss.
The probability-weighted average or . Every loss in machine learning is an expectation that we estimate by averaging over data.
An algorithm for models with latent variables that alternates computing the expected latent assignments given current parameters (E-step) and maximizing the likelihood given those assignments (M-step). Fits Gaussian mixture models; k-means is its hard-assignment special case.
Transforming raw data into informative model inputs: scaling, encoding categories, binning, interactions, date and text features, handling missing values. Still decisive for tabular models.
The per-token MLP in each transformer layer, typically expanding to hidden units and projecting back. It holds about two-thirds of the parameters and behaves like a key–value memory of facts.
Including a handful of worked examples in the prompt so the model infers the task and format by in-context learning. Zero-shot gives only instructions.
An exact attention algorithm that tiles the computation so the score matrix is never written to slow GPU memory, giving large speed and memory savings and making long contexts practical.
Floating-point operations, the unit of compute. Training a transformer costs about FLOPs for parameters and tokens (forward , backward ); inference costs about per token.
Training a network to predict the velocity field that transports noise to data along (usually straight) paths, then integrating it with an ODE solver. A simpler, often faster alternative to noise-prediction diffusion and the default in recent image and video models.
An API pattern in which the model emits a structured call to a declared function with arguments, the application executes it and returns the result, and the model continues. The basis of tool use in agents.
The bell-shaped density . It appears through the central limit theorem and as the noise model behind squared-error loss and diffusion.
Smooth variants of ReLU: and (also called Swish). Used in transformer feed-forward layers; SwiGLU gates one linear projection with the SiLU of another.
A generator and a discriminator trained against each other in a minimax game. Produces sharp samples but trains unstably and suffers mode collapse, where the generator covers only part of the data distribution.
Generative models learn or (Naive Bayes, VAEs, language models); discriminative models learn or the decision boundary directly (logistic regression, SVMs, most classifiers).
A curated set of questions with reference answers and relevant documents used to evaluate a system repeatably. The most valuable asset of an LLM application and the basis of regression testing.
Generative Pre-trained Transformer: a decoder-only transformer trained on next-token prediction over large corpora. The lineage from GPT-1 through GPT-3 to modern chat and reasoning models.
A saliency method that weights the last convolutional feature maps by the gradient of the class score flowing into them, producing a heatmap of the regions that drove a prediction.
The vector of partial derivatives . It points in the direction of steepest ascent, so learning steps move against it.
Building an additive model by fitting each new tree to the negative gradient of the loss with respect to current predictions (the residuals for squared error), scaled by a learning rate. XGBoost, LightGBM and CatBoost are optimized implementations.
Rescaling the gradient when its norm exceeds a threshold so no single step is huge. Standard in RNN and transformer training to prevent loss spikes.
: repeatedly step against the gradient of the loss with learning rate . The basic optimization algorithm of machine learning.
Building a knowledge graph of entities and relations from a corpus, summarizing its communities, and retrieving over the graph to answer global or multi-hop questions that chunk retrieval misses.
Always choosing the single most probable next token. Deterministic, but prone to repetition and to locally good, globally poor sequences.
Tying a model's answer to provided evidence, typically with citations, so each claim can be checked against a source.
Sharing one key/value head among several query heads to shrink the KV cache several-fold with little quality loss. Multi-query attention (MQA) is the extreme with a single KV head.
Group Relative Policy Optimization: sample a group of responses per prompt, use their rewards normalized within the group as advantages (no learned critic), and update with a clipped PPO-style objective plus a KL term. The algorithm behind DeepSeek-R1's reasoning training.
Input and output checks around a model (classifiers, rules, schema validation, policy filters) that block unsafe or off-topic content and enforce formats before anything reaches the user or a tool.
A fluent output that is false or unsupported by any source. Reduced by retrieval grounding, calibration, abstention and verification; not eliminated.
Transferring control of a conversation from one agent to another, more specialized agent, carrying the relevant state along.
Training examples that resemble the positive but are wrong. Mining them sharpens embedding models and rerankers far more than random negatives.
The matrix of second partial derivatives . Its eigenvalues describe curvature; a positive-definite Hessian certifies a local minimum, and everywhere-positive-semidefinite means convex.
Hierarchical Navigable Small World graph: a multi-layer proximity graph searched greedily from coarse to fine layers. The most common vector index; recall is tuned with the efSearch parameter at the cost of latency.
Requiring human approval for consequential or irreversible actions (payments, deletions, sending messages) inside an agent's workflow.
Combining sparse (BM25) and dense (embedding) retrieval, typically fused with reciprocal rank fusion, to capture both exact keyword matches and semantic similarity.
Hypothetical Document Embeddings: ask the LLM to write a plausible answer, embed that text and use it as the query vector. Helps when questions and documents are phrased very differently.
Designing an action so that repeating it has no additional effect, which makes retries after failures safe for agents that call external systems.
A model performing a new task from instructions or examples placed in its prompt, with no weight updates. It emerged clearly at GPT-3 scale and underlies few-shot prompting.
A two-head attention circuit that finds an earlier occurrence of the current token and copies whatever followed it. The mechanism behind much in-context pattern completion.
The assumptions built into a model family (locality and weight sharing in CNNs, permutation equivariance in attention, smoothness in kernels) that let it generalize from finite data. Less bias needs more data.
Split criteria for trees. Information gain is the reduction in entropy from a split; Gini impurity measures how mixed a node is (zero when pure).
Area of overlap divided by area of union between a predicted and a true box or mask. The matching criterion for detection and segmentation metrics; also used directly as a loss.
The matrix of all first partial derivatives of a vector-valued function, . Autograd never builds it explicitly; it computes vector–Jacobian products, which is all a scalar loss needs.
An input crafted to make a model violate its safety training. Distinct from prompt injection, which hijacks an application's instructions through data the model reads.
Clustering by alternating two steps: assign each point to its nearest centroid, then move each centroid to the mean of its points. Each step lowers the within-cluster squared distance, so it converges (to a local optimum).
Predict by majority vote (or average) of the closest training points under a distance metric. No training phase, all the cost at query time; the conceptual ancestor of vector search.
The small learned weight tensor a convolution slides over its input. Each filter detects one pattern and produces one output channel, called a feature map.
Computing inner products in a high- or infinite-dimensional feature space through a kernel without ever constructing . RBF and polynomial kernels are standard.
: the expected extra bits paid for using when the truth is . Asymmetric. It regularizes VAEs and penalizes drift from the reference model in RLHF.
The date after which a model's training data contains nothing. Anything newer must be supplied through retrieval or tools.
Storing each layer's keys and values for all past tokens so that generating a new token only computes attention against the cache instead of recomputing the whole prefix. Its memory grows linearly with context length and dominates long-context inference.
Replacing one-hot targets with on the true class and on the others, which discourages over-confident logits and improves calibration.
A model of the probability of text, usually factored autoregressively as . n-gram models estimate it by counting; neural models predict each factor with a network.
Running the diffusion process in the compressed latent space of a pretrained autoencoder instead of in pixel space, cutting cost by an order of magnitude. The design of Stable Diffusion.
The compressed representation space inside a model (an autoencoder bottleneck, a VAE's , a transformer's residual stream) where semantically similar inputs lie near each other.
Normalizing across the features of each individual example rather than across the batch, so it works for any batch size and sequence length. The normalization used in transformers; RMSNorm is a cheaper variant that only divides by the root mean square.
The step size in gradient descent. Too large and training diverges or oscillates; too small and it crawls. Usually warmed up then decayed by a schedule.
A rule that changes the learning rate during training: a linear warmup avoids early instability, then cosine or step decay lets the optimizer settle into a minimum.
Granting an agent only the tools, data and permissions the task requires, scoped and revocable. The primary structural defence against injection and mistakes.
Simon Willison's term for an agent that combines access to private data, exposure to untrusted content and the ability to communicate externally. With all three, an injection can exfiltrate data; remove one leg to be safe.
viewed as a function of the parameters with the data fixed. Maximizing it over is maximum likelihood estimation.
Predicting by minimizing squared error. Closed form , or gradient descent for large data.
Using a strong model to grade outputs against a rubric or in pairwise comparison. Cheap and scalable but biased toward position, verbosity and its own style; it must be calibrated against human labels.
, computed stably as with . The trick that makes softmax cross-entropy safe from overflow.
A linear classifier that outputs as a probability and is trained by minimizing cross-entropy. Equivalently a one-layer neural network; the multiclass version uses softmax.
The raw, unnormalized scores a model outputs before softmax or sigmoid. Losses are computed from logits (not probabilities) for numerical stability.
Low-Rank Adaptation: freeze and learn an update with , and small rank . Trains well under 1% of the parameters and can be merged into for zero inference overhead; QLoRA does this on a 4-bit quantized base.
The scalar objective measuring how wrong the predictions are, whose gradient drives learning. Chosen to match the output distribution: MSE for Gaussian targets, cross-entropy for categorical ones.
The finding that models use information at the start and end of a long context far better than information in the middle. Argues for reranking and placing the most important evidence at the edges.
Gated recurrent cells whose additive cell state lets gradients survive long sequences. The LSTM has input, forget and output gates; the GRU merges them into update and reset gates with fewer parameters.
The formal setting of reinforcement learning: states, actions, transition probabilities, rewards and a discount factor , with the Markov property that the future depends only on the current state and action.
BERT's pretraining objective: hide a fraction of input tokens (15%) and predict them from bidirectional context. Produces strong encoders for classification and embeddings but does not generate text.
A rectangular array that represents a linear map. A dataset is a matrix of examples by features, and a linear layer multiplies its input by a weight matrix.
Maximizing likelihood times prior, . Equivalent to MLE plus a regularizer: a Gaussian prior gives (ridge), a Laplace prior gives (lasso).
Choosing parameters that make the observed data most probable, . Mean squared error and cross-entropy are negative log-likelihoods under Gaussian and categorical models.
The detection metric: average precision (area under the precision–recall curve) per class at one or several IoU thresholds, averaged over classes.
. The regression loss that equals negative log-likelihood under Gaussian noise; its root (RMSE) is in the units of .
Reverse-engineering the computations inside a network into human-understandable features and circuits, rather than only measuring input–output behaviour.
Training with 16-bit floats (fp16 or bf16) for most computation while keeping fp32 master weights, roughly halving memory and doubling speed. fp16 needs loss scaling to avoid underflow; bf16 usually does not.
Replacing each feed-forward block with many expert FFNs and a router that sends each token to the top- experts. Total parameters grow while per-token compute stays small; a load-balancing loss keeps experts evenly used.
An open protocol that lets AI applications (hosts) connect through clients to servers that expose tools, resources and prompts in a standard way, so any model can use any integration without bespoke glue code.
Accumulating an exponential moving average of gradients, , , so steps build speed along consistent directions and cancel oscillations. Nesterov momentum looks ahead before computing the gradient.
Several agents with distinct roles or tools communicating to solve a task. Adds parallelism and specialization at the cost of coordination failures and multiplied token spend.
Running attention operations in parallel on lower-dimensional projections and concatenating the results. Different heads learn different relations (syntax, position, copying).
A stack of linear layers with nonlinear activations between them, . The basic feed-forward network and the FFN block inside every transformer layer.
A language model that predicts the next token from only the previous tokens using smoothed counts. The baseline that perplexity was invented to compare and the ancestor of neural language models.
A generative classifier that assumes features are conditionally independent given the class and applies Bayes' theorem: . Fast and surprisingly strong for text.
The sequence , with cumulative , that controls how quickly data is destroyed in the forward diffusion process, so that . Linear and cosine schedules are common.
Removing duplicate detections by keeping the highest-scoring box and discarding others that overlap it above an IoU threshold, class by class.
A length function on vectors. The norm is , the norm is , the norm is ; norms define distances and regularizers.
Representing a categorical value as a vector with a single 1 and zeros elsewhere. The input form that embedding layers replace with dense learned vectors.
A model whose parameters are published for download and local use (the Llama, Qwen, DeepSeek, Mistral and Gemma families). The license may still restrict uses; training data and code are often not released.
A central model breaks a task into subtasks, delegates them to worker agents (often in parallel, each with its own context) and synthesizes their results.
Overfitting: low training error but high test error because the model fit noise. Underfitting: high error on both because the model is too simple or under-trained. Validation curves tell them apart.
Adapting a large model by training a small number of new or selected parameters (LoRA, adapters, prompt tuning) while the original weights stay frozen. Cuts memory and makes many task-specific variants cheap to store.
pass@k is the probability that at least one of attempts succeeds (a best-case metric); pass^k is the probability that all attempts succeed (a reliability metric). Production agents need high pass^k.
A single neuron with a threshold output, , trained by Rosenblatt's error-correction rule. It can only learn linearly separable problems, which is why hidden layers were needed.
The exponential of the average negative log-likelihood per token, . Roughly the number of equally likely next tokens the model is choosing between; lower is better.
Having the model first write a plan of subtasks, then execute each (possibly with cheaper models or tools), replanning when results surprise. Separates deliberation from action.
The agent's behaviour : a distribution over actions given the state. In reinforcement learning for language models, the LLM itself is the policy and a response is the action.
Improving a policy by ascending , where is the advantage. REINFORCE is the simplest form; actor–critic methods learn a baseline to reduce variance.
Downsampling a feature map by taking the maximum or average over local windows. Global average pooling collapses each channel to one number before the classifier.
Information about token order injected into the model, because attention by itself is permutation-equivariant. Sinusoidal, learned absolute, relative biases, RoPE and ALiBi are the main families.
Where normalization sits relative to the residual addition. The original transformer normalized after the add (post-norm); normalizing the block input (pre-norm) trains more stably and is the modern default.
Precision (how many flagged items are right), recall (how many positives were found), and F1 is their harmonic mean. Raising the threshold trades recall for precision.
The two phases of LLM inference: prefill processes the entire prompt in parallel (compute-bound, sets time to first token); decode generates one token per step (memory-bandwidth-bound, sets tokens per second).
The first and largest training stage: next-token prediction on trillions of tokens of web text, code and books. Produces a base model with broad knowledge and no instruction-following behaviour.
Projecting centred data onto the top eigenvectors of its covariance matrix (equivalently the top right singular vectors of the data matrix), the directions of maximal variance. A linear dimensionality reduction and the best rank- reconstruction.
Compressing vectors by splitting them into sub-vectors and replacing each with the index of its nearest centroid from a small codebook, enabling billion-scale search in memory.
Reusing the processed key–value state of a repeated prompt prefix across requests, cutting latency and cost for long system prompts and shared documents.
Decomposing a task into a fixed sequence of model calls where each step's output feeds the next, with optional programmatic checks between steps.
Attacker-written instructions placed where the model will read them (a web page, email, document or tool result) to hijack the application's task. Indirect injection arrives through retrieved or fetched data rather than the user's message.
A policy-gradient method that clips the ratio to so each update stays close to the previous policy. The RL algorithm behind classic RLHF.
Learning action values with . Off-policy; Deep Q-Networks represent with a neural network and use experience replay.
Storing weights (and sometimes activations and KV cache) in fewer bits (int8, int4, NF4) to cut memory and speed up inference, with small accuracy loss when calibrated carefully.
The three projections in attention: queries ask, keys are compared with queries to produce weights, values are what gets averaged. , , .
Faithfulness (are the answer's claims supported by the retrieved context?), answer relevance, context precision and context recall. The standard reference-light evaluation set for RAG pipelines.
An ensemble of decision trees each trained on a bootstrap sample with a random subset of features considered at every split. Robust, hard to overfit badly, and a strong tabular baseline.
A quantity whose value depends on chance, described by a distribution: a probability mass function for discrete values or a probability density function for continuous ones.
The number of linearly independent columns (equivalently rows) of a matrix, i.e. the dimension of its column space. Low rank means the matrix carries less information than its size suggests, which LoRA exploits.
Reason + Act: interleaving thought text, actions and observations in one trace so that reasoning guides tool use and tool results ground the reasoning. The ancestor of modern tool-calling loops.
A language model trained, mostly with reinforcement learning on verifiable tasks, to produce long internal chains of thought before answering. Trades inference tokens and latency for accuracy on math, code and planning.
Retrieval metrics: recall@k is the fraction of relevant documents found in the top ; MRR is the mean reciprocal rank of the first relevant hit; nDCG rewards relevant documents ranked higher with a logarithmic discount, normalized by the ideal ranking.
The region of the input that can influence one activation. It grows with depth, kernel size, stride and dilation; deep layers see the whole image.
Merging ranked lists by giving each document the score (often ). Simple and robust because it needs no score calibration between systems.
A network that processes a sequence one step at a time, updating a hidden state with the same weights at every step.
An agent critiquing its own failed attempt in natural language and storing the reflection in memory so the next attempt avoids the mistake; learning without weight updates.
Any technique that discourages complexity to improve generalization: and penalties, weight decay, dropout, early stopping, data augmentation.
Training with rewards computed by an automatic checker (answer key, unit tests, compiler) instead of a learned preference model. The signal behind DeepSeek-R1-style reasoning models.
: cheap, non-saturating for positive inputs, and the default activation of the deep learning era. Units whose input is always negative output zero forever and are called dead.
Writing a sample as with so that gradients can flow through the sampling step to the encoder.
Learning useful features automatically from data instead of designing them by hand. The core promise of deep learning and the reason pretrained models transfer.
Re-implementing a paper's method and re-running its experiment, usually at smaller scale, to confirm the result and surface omitted details. The fastest route from reading to understanding.
Adding a block's input to its output, , so gradients flow through an identity path. Makes very deep networks trainable and defines the transformer's residual stream.
The running sum of all block outputs that flows through a transformer. Each attention head and MLP reads from it and writes back into it; the central object of mechanistic interpretability.
Retrieving documents relevant to a query and placing them in the prompt so the model answers from evidence. Reduces hallucination and lets models use private or recent information without retraining.
A policy exploiting flaws in the reward model or verifier to score well without doing the intended task (verbosity, sycophancy, gaming unit tests). The reason RLHF uses a KL penalty and RLVR needs robust checkers.
A model trained to score responses so preferred ones score higher, usually with the Bradley–Terry loss on winning and losing responses. The stand-in for human judgment during RLHF.
Adding (ridge, ) shrinks all weights smoothly; adding (lasso, ) drives some weights to exactly zero because the ball has corners on the axes.
Reinforcement learning from human feedback: train a reward model on human preference comparisons, then optimize the policy against it with RL (typically PPO) under a KL penalty that keeps it close to the reference model.
The ROC curve plots true-positive rate against false-positive rate over all thresholds; AUC is the area under it, equal to the probability that a random positive scores above a random negative. Use precision–recall curves instead when positives are rare.
Rotating each query and key pair of dimensions by an angle proportional to its position, so that the dot product depends only on the relative offset . The standard in Llama-style models.
Classifying an input and sending it to a specialized prompt, model or workflow. Separates concerns and lets easy cases use cheap models.
An isolated execution environment (container or VM with restricted filesystem and network) where code and tools run by an agent can fail or be attacked without harming the host.
. Dividing by keeps the scores' variance near one so the softmax does not saturate.
Empirical power laws relating loss to model size, dataset size and compute over many orders of magnitude. They predict the return on more resources and guide how to split a budget between parameters and tokens.
Attention in which queries, keys and values all come from the same sequence, so every position gathers information from every other position in one step.
Sampling several reasoning chains for the same question and taking the majority answer. A simple, effective form of test-time compute.
Manufacturing labels from the data itself (predict the next token, the masked word, or whether two augmented views match) so that unlabelled corpora become training signal. How language models and modern vision backbones are pretrained.
Returning a stored answer when a new query's embedding is close enough to one already answered, avoiding a model call.
Semantic segmentation labels every pixel with a class; instance segmentation separates individual objects; panoptic does both at once.
A single vector representing a sentence or passage, produced by pooling an encoder's token outputs and trained contrastively so that semantically similar texts are close. The retrieval representation in RAG systems.
An encoder that reads an input sequence into a representation and a decoder that generates an output sequence from it. Introduced with RNNs for translation; transformers kept the framing.
Per-feature contributions to one prediction derived from Shapley values in cooperative game theory, summing exactly to the prediction minus the baseline. The standard model-agnostic explanation for tabular models.
, squashing any real number into with derivative . Used for binary probabilities and in LSTM gates.
for any matrix, with orthogonal and non-negative singular values on the diagonal of . Keeping the top singular values gives the best rank- approximation (Eckart–Young), the basis of PCA and the intuition behind low-rank adaptation.
turns a vector of scores into a probability distribution. It is the output layer of classifiers and language models and the normalizer inside attention.
An overcomplete autoencoder with a sparsity penalty trained on a model's activations to decompose them into interpretable, mostly monosemantic features. The main tool for mapping features in frontier models.
A small draft model proposes several tokens which the large model verifies in one parallel forward pass; accepted tokens are emitted and the first rejection is resampled. Produces the same output distribution faster.
Modelling an agent as a graph of nodes (model calls, tools, checks) and edges (transitions) over explicit state, as in LangGraph, so control flow, retries and approval points are inspectable and resumable.
A sequence model with a linear recurrent state that can also be computed as a long convolution, giving linear-time processing. Mamba makes the state-transition parameters input-dependent (selective), closing much of the gap to transformers.
Gradient descent using the gradient of a random mini-batch, an unbiased but noisy estimate of the full gradient. Cheaper per step, and the noise often helps generalization.
Stride is the step between kernel positions (downsampling when greater than 1); padding adds a border of zeros so spatial size is controlled. Output size is .
Model output constrained to a schema (JSON with typed fields), enforced by constrained decoding or by validation and retry. The interface between language models and ordinary code.
A network representing more features than it has neurons by assigning them to nearly orthogonal directions in activation space, which makes individual neurons polysemantic.
Continuing training on curated prompt–response pairs so a base model learns the desired format and behaviour. The first post-training stage, before preference or RL training.
Learning a mapping from inputs to targets from labelled examples : classification when is a category, regression when it is a number.
A classifier that maximizes the margin between classes, penalizing violations with hinge loss . Kernels make it nonlinear; the solution depends only on the support vectors.
A benchmark of real GitHub issues that an agent must resolve by editing the repository so that hidden tests pass. SWE-bench Verified is the human-validated subset used for headline numbers.
Instructions given to a chat model ahead of the conversation that set its role, rules, tools and output format. Distinct from user turns and a frequent target of injection attacks.
Nonlinear methods that map high-dimensional points to two or three dimensions while preserving local neighbourhoods. Excellent for visualizing embeddings; unreliable for reading distances or cluster sizes.
Training a decoder by feeding it the true previous token rather than its own prediction. Fast and stable, but creates exposure bias because at inference the model must consume its own mistakes.
A divisor applied to logits before the softmax, . sharpens toward the most likely tokens, flattens toward randomness, and recovers greedy decoding.
An -dimensional array: a scalar (0-d), vector (1-d), matrix (2-d) and beyond, with a shape and a dtype. The basic data type of NumPy and PyTorch; a batch of RGB images is a 4-d tensor.
Spending more computation at inference (longer reasoning, multiple samples, verifiers, search) to improve answers. A third scaling axis alongside parameters and training data.
Term frequency times inverse document frequency, , weighting words that are frequent in a document but rare across the corpus. The classic sparse text representation and the basis of BM25.
Keshav's technique for reading papers: a ten-minute triage of title, abstract, headings and conclusion; a one-hour read that skips proofs and studies figures; and a multi-hour virtual re-implementation.
Latency from sending a request to receiving the first streamed token, dominated by prefill of the prompt. Tokens per second then measures decode speed; both belong in a latency budget.
The unit a language model reads and writes: a subword piece, character or byte sequence mapped to an integer id. Roughly three-quarters of an English word; tokenization determines what the model can see.
Giving a model declared functions (search, code execution, file access, APIs) described by JSON schemas that it can call. The model emits calls, the harness executes them and feeds back results.
Truncating the next-token distribution before sampling: top-k keeps the most likely tokens; top-p keeps the smallest set whose cumulative probability exceeds ; both renormalize what remains.
Recording every prompt, retrieval, tool call, token count, latency and cost of a request as a tree of spans (LangSmith, Langfuse, Arize) for debugging, evaluation and cost analysis.
Training data fits parameters; validation data chooses hyperparameters and when to stop; test data is touched once for the final estimate. Reusing the test set for decisions turns it into a validation set.
The full record of one agent run: every model turn, tool call, tool result and final output. The unit that agent evaluations grade and that tracing tools display.
Reusing a model pretrained on a large dataset as a starting point for a new task: freeze it and train a new head (feature extraction) or update all weights with a small learning rate (fine-tuning).
An architecture built from stacked blocks of multi-head self-attention and position-wise feed-forward layers with residual connections and normalization, processing all positions in parallel. The basis of modern language, vision and multimodal models.
Exploring multiple reasoning branches as a search tree, with the model evaluating partial states and backtracking, instead of committing to a single linear chain.
A network with one hidden layer and enough units can approximate any continuous function on a compact set to any accuracy. It says nothing about how many units are needed or whether gradient descent will find them.
Finding structure in data without labels: clustering, density estimation and dimensionality reduction.
The expected discounted return from a state, , or from a state–action pair, . Estimated by critics and used to bootstrap learning and reduce variance.
Gradients shrink or blow up as they are multiplied through many layers or time steps, because the product of many Jacobians has norms that decay or grow exponentially. Mitigated by ReLU, careful initialization, normalization, residual connections and gradient clipping.
, the expected squared deviation from the mean; its square root is the standard deviation.
A generative latent-variable model trained by maximizing the ELBO: an encoder outputs a distribution , a decoder reconstructs from samples of , and a KL term keeps the latent space close to a prior. The compressor inside latent diffusion.
An ordered list of numbers, equivalently an arrow in . Every input, parameter block and embedding in machine learning is a vector or a stack of them.
A store that indexes embeddings for approximate nearest-neighbour search with metadata filtering (pgvector, Chroma, Qdrant, Weaviate, Milvus, Pinecone). For small corpora a plain table with brute-force search is enough.
A transformer applied to images by splitting them into fixed-size patches, linearly embedding each patch as a token and adding position embeddings. Needs more data or pretraining than CNNs but scales very well.
A language model that also accepts images (and often audio or video), usually by projecting a vision encoder's features into the language model's token space or by training natively on interleaved modalities.
The fixed set of tokens a model knows, typically 32k to 256k entries. Larger vocabularies shorten sequences but enlarge the embedding and output matrices.
Shrinking weights toward zero at every step, . Identical to regularization under plain SGD, but under Adam only the decoupled form (AdamW) behaves as intended.
Sharing the input embedding matrix with the output unembedding matrix, saving parameters and regularizing. Common in smaller language models.
A dense vector per word learned so that words appearing in similar contexts are close. word2vec trains them by predicting context words (skip-gram) or the centre word (CBOW) with negative sampling; GloVe fits co-occurrence statistics.
A workflow orchestrates model calls along predefined code paths; an agent lets the model dynamically direct its own process and tool use. Anthropic's guidance: start with the simplest workflow that works and add autonomy only when it pays.
Drawing initial weights with variance (Xavier/Glorot, for tanh-like activations) or (He, for ReLU) so that activation and gradient scales stay roughly constant through depth.
A benchmark of multi-turn interactions between an agent, a simulated user and tool APIs under domain policies, whose pass^k metric measures how reliably the agent succeeds across repeated trials.