AI Glossary
101 AI terms, briefly explained.
All terms
- Accuracy
- Activation function
- Agent
- Alignment
- API
- Artificial general intelligence (AGI)
- Artificial intelligence (AI)
- Attention
- Autoregressive generation
- Backpropagation
- Batch
- Beam search
- Benchmark
- Bias
- Chain of thought (CoT)
- Chatbot
- Checkpoint
- Classification
- Context window
- Cross-entropy
- Dataset
- Decoder
- Decoding
- Deep learning
- Diffusion model
- Distillation
- Dropout
- Embedding
- Encoder
- Epoch
- Evaluation
- Feed-forward network (FFN)
- Few-shot prompting
- Fine-tuning
- Foundation model
- Generative AI
- Gradient
- Gradient descent
- Graphics processing unit (GPU)
- Grounding
- Hallucination
- Hyperparameter
- In-context learning
- Inference
- Instruction tuning
- KV cache
- Large language model (LLM)
- Latent space
- Learning rate
- Logits
- LoRA
- Loss
- Machine learning (ML)
- Mixture of experts (MoE)
- Model
- Model Context Protocol (MCP)
- Multimodal model
- Neural network
- Normalization
- Open weights
- Optimizer
- Overfitting
- Parameters and weights
- Perplexity
- Positional encoding
- Precision
- Prefill
- Pretraining
- Prompt
- Prompt caching
- Prompt injection
- Quantization
- Reasoning model
- Recall
- Regression
- Regularization
- Reinforcement learning (RL)
- Reinforcement learning from human feedback (RLHF)
- Retrieval-augmented generation (RAG)
- Self-supervised learning
- Small language model (SLM)
- Softmax
- Speculative decoding
- Supervised learning
- Synthetic data
- Temperature
- Tensor
- Token
- Tokenizer
- Tool calling
- Top-k sampling
- Top-p sampling
- Training
- Training data
- Transfer learning
- Transformer
- Unsupervised learning
- Validation data
- Vector database
- Vision-language model (VLM)
- Zero-shot prompting
Accuracy
The fraction of predictions that are correct. In classification, high accuracy can hide poor results on rare classes.
Reference: scikit-learn: Metrics and scoring
Activation function
A function applied to a layer's outputs. Nonlinear activations let stacked layers represent relationships that a purely linear network cannot.
Reference: PyTorch: Build the Neural Network
Agent
A system that uses a model to choose actions, use tools and work toward a goal over multiple steps.
Reference: Anthropic: Building effective agents
Alignment
Training and system design intended to make a model's behaviour match desired goals, instructions or preferences.
Reference: Hugging Face: Reinforcement learning from human feedback
API
An interface through which software uses another system. An AI API can accept prompts and return generated outputs.
Reference: MDN: API
Artificial general intelligence (AGI)
AI with broad competence across many cognitive tasks, often compared with human performance. Definitions and proposed thresholds differ.
Reference: Levels of AGI
Artificial intelligence (AI)
The field of building systems that perform tasks such as learning, perception and reasoning. Machine learning is one approach.
Attention
An operation that combines information from different positions using learned relevance scores. Self-attention relates positions within the same sequence.
Reference: Attention Is All You Need
Autoregressive generation
Generating a sequence one step at a time, with each new token conditioned on the preceding ones.
Reference: Hugging Face: Text generation
Backpropagation
Computing gradients backward through a network so an optimizer can adjust its parameters.
Reference: PyTorch: Optimizing Model Parameters
Batch
A group of examples processed together. Batch size affects training throughput, memory use and the gradient estimate.
Reference: PyTorch: Optimizing Model Parameters
Beam search
A decoding method that keeps several candidate sequences at each step and ranks their extensions by a scoring rule.
Reference: Hugging Face: Generation strategies
Benchmark
A standardized set of tasks and scoring rules for comparing models. Its score describes performance on those tasks.
Reference: Hugging Face: Evaluate
Bias
Bias can mean a systematic skew in model outputs, or an additive learned offset in a network layer.
Reference: Google: ML Fundamentals
Chain of thought (CoT)
Intermediate reasoning steps generated before an answer. Producing such steps can improve performance on tasks requiring several deductions.
Reference: Chain-of-Thought Prompting
Chatbot
An application with a conversational interface. It may use a language model; whether it acts autonomously is a separate question.
Reference: Anthropic: Building effective agents
Checkpoint
Saved model state. A training checkpoint can also include optimizer state and progress, allowing training to resume.
Reference: TensorFlow: Training checkpoints
Classification
Predicting a category or set of categories, such as whether a message is spam. Contrast with predicting a numerical value in regression.
Reference: scikit-learn: Metrics and scoring
Context window
The maximum sequence a model can process in one request, usually measured in tokens. Input and generated tokens compete for that space.
Reference: Google: Generative AI Glossary
Cross-entropy
A loss that penalizes low predicted probability for the target outcome. Next-token training commonly minimizes cross-entropy over the correct tokens.
Reference: PyTorch: CrossEntropyLoss
Dataset
A collection of examples used for training or evaluation. Separate splits serve different purposes, such as learning and validation.
Reference: Hugging Face: Dataset features
Decoder
A network component that produces outputs from representations. An autoregressive Transformer decoder predicts new tokens using the preceding context.
Reference: Hugging Face: Transformer Architectures
Decoding
The rule for selecting output tokens from a model's predicted probabilities, such as choosing the most likely token or sampling.
Reference: Hugging Face: Text generation
Deep learning
Machine learning using neural networks with multiple layers, allowing successive layers to build increasingly complex representations.
Reference: PyTorch: Build the Neural Network
Diffusion model
A generative model trained to reverse a noising process. Generation typically refines noise into structured content over several steps.
Reference: Hugging Face: Diffusion pipelines
Distillation
Training a student model using a teacher model's outputs or internal signals, often to transfer capabilities into a smaller model.
Reference: Hugging Face: Knowledge distillation
Dropout
Randomly setting some activations to zero during training to reduce overfitting. Ordinary inference uses the network without this random dropping.
Reference: Keras: Dropout
Embedding
A learned vector representation of an item, such as text. Retrieval systems compare embeddings to find related content.
Reference: Retrieval-Augmented Generation
Encoder
A network component that turns input into representations. A text Transformer encoder typically lets each position attend to both earlier and later positions.
Reference: Hugging Face: Transformer Architectures
Epoch
One pass through a training dataset. Streaming or repeated datasets may instead use a fixed number of steps per epoch.
Reference: Keras: Training and evaluation
Evaluation
Measuring a model's behaviour on chosen tasks using metrics, human assessment or both. The test setup determines what the result means.
Reference: Hugging Face: Evaluate
Feed-forward network (FFN)
A network whose computations flow forward without recurrent connections. Transformer blocks typically apply an FFN independently at each token position.
Reference: PyTorch: Build the Neural Network
Few-shot prompting
Giving a model a few examples of the desired task in its prompt, without updating its weights.
Reference: Hugging Face: Prompt engineering
Fine-tuning
Further training of an existing model on selected data to adapt its behaviour or capabilities.
Reference: Hugging Face: How Transformers work
Foundation model
A model trained on broad data that can serve as a starting point for many downstream tasks or applications.
Reference: On the Opportunities and Risks of Foundation Models
Generative AI
AI that produces content, such as text, images or audio, from patterns learned during training.
Reference: Google: Generative AI Glossary
Gradient
A vector of derivatives showing how a scalar quantity, such as loss, changes with each parameter.
Reference: PyTorch: Automatic Differentiation
Gradient descent
An optimization method that updates parameters in the direction opposite to the loss gradient, scaled by a learning rate.
Reference: PyTorch: Automatic Differentiation
Graphics processing unit (GPU)
A processor designed for highly parallel computation. Neural networks use GPUs for operations such as matrix multiplication during training and inference.
Reference: NVIDIA: CUDA Programming Guide
Grounding
Connecting generated answers to external evidence, such as retrieved documents or search results, rather than relying solely on learned weights.
Reference: Google Cloud: Grounding overview
Hallucination
Generated content that is factually false or unsupported by the supplied information, even when presented fluently and confidently.
Reference: Google: Generative AI Glossary
Hyperparameter
A configuration choice, such as layer count or learning rate, set outside the ordinary parameter-learning process.
Reference: Google: ML Fundamentals
In-context learning
Adapting to a task using instructions or examples in the current context, without changing the model's weights.
Reference: Hugging Face: Prompt engineering
Inference
Running a trained model to produce predictions or outputs. Ordinary inference does not update the model's learned parameters.
Reference: Hugging Face: How Transformers work
Instruction tuning
Fine-tuning on instructions paired with desired responses, teaching a model to respond to requests in useful ways.
Reference: Hugging Face: Supervised Fine-Tuning
KV cache
Stored key and value tensors from attention. Reusing them avoids recalculating those tensors for earlier tokens during generation. See why memory matters.
Reference: Hugging Face: How caching works
Large language model (LLM)
A language model with a large number of parameters, trained on extensive data. There is no universal size threshold.
Reference: Hugging Face: How Transformers work
Latent space
A space of learned representations of data. A latent diffusion model generates in this space before decoding the result into an image.
Reference: Hugging Face: Diffusion pipelines
Learning rate
A setting controlling the scale of parameter updates during training. It can change according to a schedule.
Reference: PyTorch: Automatic Differentiation
Logits
Raw model scores before conversion to probabilities. Language models produce a score for each candidate next token.
Reference: PyTorch: Softmax
LoRA
Low-rank adaptation: fine-tuning small added matrices while keeping the original weights fixed, reducing the number of trainable parameters.
Reference: Hugging Face: LoRA
Loss
A numerical objective used to train a model. Lower loss means better performance on that objective, not necessarily every useful task.
Reference: PyTorch: Optimizing Model Parameters
Machine learning (ML)
Methods that learn patterns or decision rules from data rather than requiring every rule to be written explicitly.
Reference: Google: Machine Learning Glossary
Mixture of experts (MoE)
An architecture that routes inputs to selected expert networks. Total parameter count can greatly exceed the parameters used for each token.
Reference: Hugging Face: Mixture of Experts Explained
Model
A computational structure with learned parameters that maps inputs to predictions or outputs. A chatbot or agent builds an application around it.
Reference: Google: Machine Learning Glossary
Model Context Protocol (MCP)
A standard protocol connecting AI applications to external tools, data sources and reusable prompts through servers.
Reference: Model Context Protocol: Introduction
Multimodal model
A model that handles more than one kind of data, such as text and images. Supported input and output types can differ.
Reference: Google: Generative AI Glossary
Neural network
A model built from connected layers of numerical operations, whose learned parameters transform inputs into useful representations and outputs.
Reference: Attention Is All You Need
Normalization
Rescaling values to control their numerical range or statistics. Layer normalization operates on each example's activations rather than across a batch.
Reference: Layer Normalization
Open weights
Model weights made available for download and local use under a stated licence. This alone does not make the whole system open source.
Reference: Open Source Initiative: Open weights
Optimizer
An algorithm, such as Adam, that updates model parameters using gradients and its own update rules.
Reference: PyTorch: Optimizing Model Parameters
Overfitting
Learning details of the training data that do not generalize, producing a model that performs worse on unseen examples.
Reference: Google: Machine Learning Glossary
Parameters and weights
The numerical values learned during training. Weights are parameters; the parameter count measures model size, not intelligence.
Reference: PyTorch: Optimizing Model Parameters
Perplexity
Exponentiated average negative log-probability of the observed tokens. Lower values mean better prediction on the same evaluation data and tokenization.
Reference: Hugging Face: Perplexity
Positional encoding
Information representing token positions or relative distances, allowing attention to distinguish different sequence orders.
Reference: Attention Is All You Need, §3.5
Precision
Among examples predicted positive, the fraction that are actually positive. It measures how often a positive prediction is correct.
Reference: scikit-learn: Metrics and scoring
Prefill
Processing the input context before generating new tokens. In a cached Transformer, this also builds the input's KV cache.
Reference: Hugging Face: How caching works
Pretraining
The initial broad training phase that gives a model its general capabilities before more targeted adaptation.
Reference: Hugging Face: How Transformers work
Prompt
Input supplied to guide a model, including instructions, examples or task data. Applications may assemble it from several sources.
Reference: Anthropic: Building effective agents
Prompt caching
Reusing previously computed state for a matching input prefix across requests, saving repeated prefill work.
Reference: Anthropic: Prompt caching
Prompt injection
An attempt to redirect an AI system through adversarial instructions, including instructions hidden in documents or tool results it processes.
Reference: Anthropic: Prompt injections
Quantization
Representing weights or activations with fewer bits to reduce memory use and potentially computation, with possible changes in accuracy. Try our browser model.
Reference: Hugging Face: Quantization
Reasoning model
A model trained to solve tasks through intermediate reasoning, often spending extra generation steps before its final answer.
Reference: DeepSeek-R1: Reasoning via reinforcement learning
Recall
Among examples that are actually positive, the fraction the model identifies. High recall means fewer missed positives.
Reference: scikit-learn: Metrics and scoring
Regression
Predicting a numerical value, such as temperature or a house price, rather than choosing a category.
Reference: scikit-learn: Metrics and scoring
Regularization
Techniques that discourage overfitting, for example by penalizing large weights or applying dropout during training.
Reference: Keras: Regularizers
Reinforcement learning (RL)
Learning a policy for choosing actions to maximize expected reward. Language-model training can use rewards assigned to generated responses.
Reference: Google: Machine Learning Glossary
Reinforcement learning from human feedback (RLHF)
Using human feedback to define a reward signal for reinforcement learning, often by training a reward model on preference comparisons.
Reference: Hugging Face: Reinforcement learning from human feedback
Retrieval-augmented generation (RAG)
Retrieving relevant information and supplying it to a model for generation. Retrieved documents need not be incorporated into the model's weights.
Reference: Retrieval-Augmented Generation
Self-supervised learning
Learning from targets derived from the data itself, such as predicting the next token in text, without manually labelling each example.
Reference: Google: Self-supervised learning
Small language model (SLM)
A language model small enough for a chosen resource budget. Like LLM, the name has no fixed parameter cutoff. Build one with us.
Reference: Hugging Face: How Transformers work
Softmax
A function that converts scores into positive values summing to one, commonly used as probabilities over candidate tokens.
Reference: PyTorch: Softmax
Speculative decoding
Accelerating generation by proposing several tokens with a cheaper draft process and verifying them with the target model.
Reference: Hugging Face: Generation strategies
Supervised learning
Learning from examples paired with target outputs, such as images with labels or prompts with desired responses.
Reference: Google: ML Fundamentals
Synthetic data
Artificially generated examples used for training or evaluation, for instance responses produced by another model.
Reference: Hugging Face: Synthetic Data Generator
Temperature
A setting that reshapes token probabilities before sampling. Lower values concentrate choices; higher values flatten the distribution.
Reference: Hugging Face: Text generation
Tensor
A numerical array with zero or more dimensions. Neural networks represent inputs, weights and intermediate results as tensors.
Reference: PyTorch: Tensors
Token
A unit a model processes, such as a word fragment, character or byte. A token is not necessarily a word.
Reference: Hugging Face: Text generation
Tokenizer
The component that converts text into token IDs and decodes token sequences back into text.
Reference: Hugging Face: Text generation
Tool calling
A model emits a structured request for a function or service. The surrounding application executes it and returns the result.
Reference: Anthropic: Handle tool calls
Top-k sampling
Sampling the next token only from the k highest-scoring candidates, after renormalizing their probabilities.
Reference: Hugging Face: Generation parameters
Top-p sampling
Sampling from the smallest set of highest-probability tokens whose cumulative probability reaches p. Also called nucleus sampling.
Reference: Hugging Face: Generation parameters
Training
Adjusting a model's parameters using data and an optimization objective. This is when the model learns, rather than simply runs.
Reference: PyTorch: Optimizing Model Parameters
Training data
Examples used to update a model's parameters. Performance on these examples alone does not show how well the model generalizes.
Reference: Keras: Training and evaluation
Transfer learning
Reusing knowledge learned on one task or dataset for another, often by adapting a pretrained model instead of training from scratch.
Reference: Keras: Transfer learning and fine-tuning
Transformer
A neural-network architecture built around attention and feed-forward layers. Many language models generate text with a decoder-only Transformer.
Reference: Attention Is All You Need
Unsupervised learning
Learning structure from data without supplied target labels, for example grouping similar examples into clusters.
Reference: scikit-learn: Unsupervised learning
Validation data
Held-out examples used to assess progress and choose settings during development, rather than directly update model parameters.
Reference: Keras: Training and evaluation
Vector database
A database that stores vectors and supports similarity search, often used to retrieve text through its embeddings.
Reference: Google Cloud: Vector Search
Vision-language model (VLM)
A model that combines visual and language information, for example to answer questions about an image.
Reference: Hugging Face: Image-text-to-text
Zero-shot prompting
Asking a model to perform a task without providing demonstrations of that task in the prompt.
Reference: Hugging Face: Prompt engineering