Common AI Terminology
Practical AI and Language-Model Concepts
1. Large language models
A large language model (LLM) is a neural network trained to predict the next token in a sequence. Given some text, it estimates what token is likely to come next, appends or generates that token, and repeats the process to produce a longer response.
For example, after the phrase “All that glitters,” a model may predict “is,” then “not,” then “gold.” The model generates one token at a time, although its response may appear to the user as a complete sentence.
An LLM is a model category defined by what it does and how it is trained; it is not one particular algorithm. Many modern LLMs use the transformer architecture, but the terms LLM and transformer are not interchangeable.
2. Tokenization
Tokenization is the process of dividing input text into discrete units called tokens before the model processes it. A token may be a whole word, part of a word, punctuation, or a space-related unit. The exact divisions depend on the tokenizer.
For instance, a familiar word might be represented as one token, while a rare or long word might be divided into several subword tokens. Tokenization does not necessarily split text at spaces: doing so would make it harder to represent word parts that appear across many different words.
Subword tokens can help a model recognize recurring patterns. For example, a token representing a common ending may appear in several words. However, a token is primarily a unit for representing text computationally; it does not automatically contain a complete grammatical or semantic meaning.
The model’s input text is converted into tokens, which are then represented numerically for further processing.
3. Vectors and embeddings
A vector is an ordered collection of numbers that can represent an item’s position in a mathematical space. In language models, words or tokens are mapped to vectors called embeddings.
The goal of an embedding is to represent useful patterns about a token. Tokens that occur in similar contexts or have related meanings may have vectors that are relatively close to each other. For example, words associated with fruit may be closer to one another than to words associated with financial reporting.
Vector representations make it possible for a model to process language mathematically. They also support similarity comparisons: systems can compare vectors to find words, passages, or documents that are semantically related, even when they do not use identical wording.
A token’s vector alone does not always capture its intended meaning in a particular sentence. The word “apple,” for example, can refer to fruit, a company, or a person described as “the apple of someone’s eye.” Contextual processing helps the model represent which meaning is relevant.
4. Attention
Attention is a mechanism that lets a model use relationships among tokens to interpret the current input. Rather than treating each token as meaningful only by itself, the model can weigh information from other tokens in the sequence.
Consider “a tasty apple” and “Apple’s revenue.” The word “apple” is spelled the same way in both phrases, but nearby words indicate different meanings. “Tasty” supports the fruit interpretation; “revenue” supports the company interpretation. Attention helps the model use such surrounding information.
In a transformer, attention computes relationships between tokens and uses those relationships to update their representations. This is more precise than simply adding word vectors: the model learns how strongly different tokens should influence one another in a particular context.
Attention can also connect words that are separated in a sentence, allowing the model to represent relationships that are not limited to immediate neighbors. In a standard full-attention transformer, the amount of pairwise token comparison grows approximately with the square of the sequence length, written as O(n2) for a sequence of length n.
5. Self-supervised learning
Self-supervised learning trains a model using patterns or targets derived from the data itself, rather than requiring a human to label every training example. The data provides a learning task, and the model attempts to predict a missing or future part.
A familiar example is completing a sequence. If a model sees “All that glitters,” the existing text provides a target for what comes next. Training can compare the model’s prediction with the next token in the original text.
A typical next-token training process works as follows:
A text sequence is used as input.
The model predicts possible next tokens at positions throughout the sequence.
Its predictions are compared with the tokens that actually follow in the text.
The model’s error is measured as a loss.
The model’s weights are adjusted to reduce future prediction errors.
Because text already exists in large quantities, this method can create many training examples without a person writing a separate answer for each one. Similar approaches can be used with images by hiding patches and asking a model to predict them, or with video by predicting missing content or patterns of movement.
Self-supervised learning differs from supervised learning in how the targets are obtained. In supervised learning, humans or other processes provide explicit labels or desired answers; in self-supervised learning, the training target is generated from the structure of the data itself.
6. Transformers
A transformer is a neural-network architecture that uses attention to process relationships among input tokens. It is one common way to build a language model, but it is not synonymous with an LLM.
A simplified transformer layer includes:
An attention operation, which lets token representations use information from other tokens.
A feedforward neural-network operation, which further transforms each representation.
Additional layers that repeat and refine these operations.
As layers are stacked, the model can represent increasingly complex relationships. Early processing may help resolve a word’s local meaning; later processing can contribute to more complex interpretations, such as implications or relationships across a sentence.
The final representations are used to predict the next token. Transformer models may contain many layers, but the number of layers varies by model. Other architectures could also be used to build systems that generate or process text.
7. Fine-tuning
Fine-tuning is additional training that adapts an already pretrained model to a particular task, domain, or style. A general model may first learn broad language patterns from large datasets, then be trained further on examples that encourage more specialized or useful responses.
For example, a general model could be fine-tuned on question-and-answer examples related to medicine, customer support, or finance. The additional training adjusts the model’s weights so that its responses are more suited to the target use case.
Fine-tuning can teach a model to:
Use domain-specific terminology.
Follow a preferred response format.
Answer a particular class of questions more consistently.
Avoid responses that are undesirable for the intended application.
The result is not guaranteed to be accurate simply because the model has been fine-tuned. The quality of its training data, task design, and evaluation still matters. A specialized model may also perform well on its target task while being less capable on unrelated tasks.
8. Few-shot prompting
Few-shot prompting provides a model with a small number of examples in the prompt before asking it to complete a task. The examples demonstrate the desired pattern, format, or type of answer.
For instance, a system might show examples of customer questions paired with the preferred style of response, then provide a new question. The model uses the examples as context when generating its answer.
Few-shot prompting happens at inference time—when the model is being used to produce a response—not by changing its learned weights. This makes it different from fine-tuning. The examples are supplied with the request, and the model conditions its answer on them.
Few-shot prompting is useful when a system needs to guide an already trained model without conducting additional training. Its effectiveness depends on the relevance and clarity of the examples.
9. Retrieval-augmented generation
Retrieval-augmented generation (RAG) combines document retrieval with language-model generation. Instead of relying only on information already learned during training, a system retrieves relevant material and provides it to the model alongside the user’s query.
A basic RAG workflow is:
A user submits a query.
The system searches a collection of documents for material relevant to that query.
The retrieved material is added to the model’s context.
The model generates an answer using the query and retrieved information.
For example, a company-support system could retrieve relevant policy documents or terms and conditions before answering a customer’s question. The query gives the user’s immediate need; the retrieved documents supply company-specific context.
RAG is a general approach, not a single database type or retrieval algorithm. Documents might be found using vector similarity search, conventional search, a graph database, or other methods. The key idea is to retrieve context, add it to the model’s input, and then generate a response.
RAG can provide information that was not part of the model’s original training, but it does not automatically guarantee a correct answer. Retrieval quality and the model’s use of the retrieved evidence both affect the result.
10. Vector databases
A vector database stores vectors and supports efficient searches for vectors that are similar to a query vector. It can be used to find documents that are related in meaning, rather than only documents containing the exact same words.
Suppose a customer says they are upset about a payment and want a refund. A company’s policy documents may not contain the word “upset,” but they might discuss low customer ratings, failed payments, or refund procedures. A similarity search can help retrieve relevant material even when the wording differs.
A typical process is:
Documents are converted into vector representations.
A user query is also converted into a vector.
The system compares the query vector with stored document vectors.
The closest or most relevant documents are returned for use as model context.
Vector similarity helps match semantically related content, but a vector database is only one part of a retrieval system. It stores and searches representations; another component generally turns retrieved documents into a useful response.
11. Model Context Protocol
Model Context Protocol (MCP) is a protocol for connecting an AI application to external tools or data sources through a shared communication structure. It can help a model access information or capabilities that are outside its own parameters.
A simplified MCP interaction may work as follows:
A user asks a question or requests an action.
The model or surrounding application identifies a need for an external tool or source.
An MCP client communicates with an appropriate MCP server.
The server provides data or carries out a supported operation.
The result is returned to the application and may be passed back to the model.
The model generates a response, or the application performs a further action.
An MCP server may act as an interface to a database, service, or tool. For example, a travel assistant might retrieve flight details from an airline service and then request a booking through a supported action.
MCP expands what an AI system can access, but the protocol does not itself ensure that the model chooses the right tool or that the external information is accurate. Those depend on the model, application logic, and connected services.
12. Context engineering
Context engineering is the broader task of deciding what information an AI system should provide to a model, and how that information should be organized, updated, and limited. It includes prompt design, but also covers retrieval, examples, conversation history, user preferences, and external tool results.
A system may combine several kinds of context:
The user’s current query.
Examples that demonstrate a preferred response pattern.
Relevant company documents retrieved through RAG.
Results returned by external tools or services.
Important information retained from earlier conversations.
Context has practical limits: sending too much material can increase cost, consume the model’s available input capacity, and make it harder to focus on the most relevant information. Systems therefore need methods for selecting and summarizing context.
For example, a system might keep recent conversation turns in full and summarize older turns. It could also summarize retrieved documents before passing them to a more capable model. The chosen strategy depends on the task and the importance of retaining details.
Context engineering and prompt engineering
Prompt engineering focuses on the content and structure of a particular prompt, such as instructions and examples given to the model. Context engineering is broader: it manages the information available to the system over time, including retrieved documents, conversation history, user preferences, and tool results.
A prompt may be stateless in the sense that it is assembled for a single request. A context-engineering system may maintain or update relevant information across requests, subject to its design and privacy rules.
13. Agents
An AI agent is a system that can pursue a user’s goal through multiple steps, using a model and possibly external tools or other agents. Unlike a system that only returns a response to a single request, an agent may continue working, gather information, make decisions, and take actions.
A travel agent, for example, could be designed to:
Check flights and hotels.
Apply a user’s stated preferences.
Compare available options.
Carry out a booking when authorized.
Manage related tasks, such as handling email while the user is away.
Agents can use language models to interpret instructions and choose among available actions. They may also use APIs, databases, and other software systems.
An agent’s ability to act makes planning, permissions, and reliability important. Access to tools does not guarantee that actions are appropriate: systems need safeguards to ensure that consequential actions are authorized and that the agent’s results are checked when necessary.
14. Reinforcement learning and human feedback
Reinforcement learning trains a system using feedback about the outcomes of its actions. In language-model training, a model may generate responses, and a signal indicates which outputs are preferred or discouraged. The model is then adjusted to make desirable behavior more likely.
In reinforcement learning from human feedback (RLHF), human judgments help provide this preference signal. A simplified example is a person comparing two responses to the same query and selecting the better one. The preference can be used to train or guide a reward model, which then helps optimize the language model.
The process encourages outputs that receive higher reward. However, the training signal is an imperfect representation of what people value. A model may learn patterns that score well according to feedback while still making factual errors or behaving poorly in cases that were not adequately represented.
The source describes positive and negative rewards as if they were distributed uniformly over every token in a response. That is a useful simplification, but actual RLHF methods are more involved: they use optimization procedures to adjust model behavior based on response-level rewards or preferences.
Reinforcement learning is powerful, but it is not the same as building a complete mental model of the world. Feedback can teach a system which actions or outputs tend to receive favorable outcomes; it does not necessarily give the system a human-like understanding of why those outcomes occur.
15. Chain of thought and reasoning models
Chain of thought refers to a step-by-step approach in which a model works through intermediate stages before producing a final answer. Training or prompting a model with examples of structured reasoning may help it handle problems that require multiple deductions.
A reasoning model is designed to spend more effort on problems that benefit from extended analysis. It may use different strategies, including stepwise reasoning, branching through alternatives, or using tools. The amount of effort can vary with the difficulty of the task.
Chain of thought is one possible reasoning approach, not the only one. Related approaches include:
Tree of thought: exploring multiple possible reasoning paths.
Graph of thought: representing relationships among multiple reasoning steps or ideas.
Tool-assisted reasoning: using external tools or sources to support problem-solving.
A step-by-step method can improve performance on some tasks, but producing a long explanation does not by itself prove that an answer is correct. Reasoning quality must still be evaluated against the task and reliable evidence.
16. Multimodal models
A multimodal model can process or generate more than one type of data, or modality. Text, images, audio, and video are examples of different modalities.
A multimodal model might:
Answer questions about an image.
Count or identify objects in a picture.
Generate or modify images from instructions.
Process video and describe events or movement.
Combine text with visual or audio input.
Training across modalities can help a model connect language with visual or other non-textual information. For example, associating words such as “cat” and “feline” with images of cats may support tasks that require both language and image understanding.
Multimodal capability has potential applications in areas such as media creation, advertising, and analysis of visual content. Model quality varies by task; the ability to accept or generate a modality does not mean that the model will interpret it accurately in every case.
17. Foundation models
A foundation model is a broadly trained model that can serve as a starting point for many downstream tasks. It may be adapted through prompting, fine-tuning, or other methods for a particular application.
The term describes the model’s role as a reusable base; it does not specify one particular architecture, size, or data type. A foundation model can be large and general-purpose, while a model adapted from it may be more specialized.
Organizations may use foundation models as the basis for company-specific systems, but they may also choose smaller or task-specific models when those better meet their needs.
18. Small language models
A small language model (SLM) is a language model with fewer parameters than a large language model. The number of parameters is not the only measure of model capability, but smaller models often require fewer computational resources to run.
A company might train or adapt a smaller model for a specific task, such as customer support or sales assistance. Such a model may perform well in its area of focus while being less capable on broad or unrelated questions. For many applications, specialized performance matters more than general-purpose ability.
Smaller models can be attractive when an organization wants lower inference costs, easier deployment, or more control over where data is processed. Their advantages depend on the use case, model quality, and available hardware.
Parameter-count ranges such as millions for some smaller models and billions for some larger models are illustrative, not universal definitions. Models vary considerably, and size alone does not determine their quality.
19. Distillation
Knowledge distillation trains a smaller student model to imitate a larger teacher model. The teacher produces outputs for selected inputs, and the student is trained to produce similar outputs with fewer parameters.
A simplified distillation process is:
The same input is given to the teacher model and the student model.
The teacher provides a target output or other training signal.
The student’s output is compared with the teacher’s.
The student’s weights are adjusted when its behavior differs from the target.
The aim is to retain useful capabilities in a smaller, less costly model. A distilled model may be faster or easier to host, but distillation does not guarantee that it will match the teacher in every task. Its performance depends on what the teacher demonstrates and what the student is trained to reproduce.
20. Quantization
Quantization reduces the precision used to represent a model’s numerical weights. For example, a system might represent weights using fewer bits than the original model.
In an idealized comparison, changing each weight from 32 bits to 8 bits reduces the storage used for those weights by 75%. The actual reduction in total system memory or cost may be smaller because other components—such as activations, attention mechanisms, and runtime overhead—also require resources.
Quantization is mainly used to reduce model storage and inference cost during deployment. It is commonly applied after a model has been trained, so it does not necessarily reduce the cost of the original training process.
Using fewer bits can affect model quality, so quantization involves a trade-off between efficiency and performance. Its practical impact depends on the quantization method, model, hardware, and task.

Ask anything
We've read this whole study set, so questions about it get the best answers.