Learn AI /Large Language Models /Context
Context
Also called: conversation history.
Back to the milestone you came from
In five seconds
What it is
The text, images or other inputs a model can currently use to shape its next output in a session.
In plain words
It is the information the model can see right now when it writes its next reply.
An everyday example
At a scholarship office, a clerk reviews one application folder at a time. The folder may contain the form, a checklist, a passport copy and earlier notes from another staff member. The clerk can only judge completeness based on the papers currently inside that folder and on the office instructions on the desk. If one important page is missing or removed because the folder is too full, the clerk may give the wrong answer about whether the application is complete.
A human clerk can deliberately inspect pages, notice missing items from general knowledge and ask targeted follow-up questions. A language model does not inspect documents in that human way. It processes tokens and generates likely next tokens from patterns in data. Also, some systems may retrieve extra information automatically, which is more than a single paper folder suggests.
Remember thisA model generates from the material available now. If an instruction or fact is missing, truncated or buried in the context, the next reply may change.
Understand it
Understand it
Why it matters
If you use chat assistants, context helps explain why a reply can be accurate one moment and wrong the next. The reply is shaped by current material together with patterns learned during training. Context affects whether the system follows your instructions, keeps track of names and dates, uses the right tone and stays on task. For decision-making, check what information is actually present rather than assuming the system remembers everything from earlier. This also helps you recognise when to repeat key facts, when to shorten a long conversation, and why sensitive information should be handled carefully in approved systems only.
How available material shapes the next reply
Show that a model's next reply depends on the text and other inputs currently available, and that older material may stop affecting the reply if it no longer fits.
01
Inputs arrive
The system collects the current user message plus other available items, such as earlier messages, system instructions and sometimes attached files or images.
Draw four small boxes on the left labelled 'system instructions', 'earlier messages', 'current message' and 'attachments/images'. Use arrows from each box toward the centre.
02
Combined into available context
These items are assembled into the material the model can use for this turn.
Draw a large centre box labelled 'available context for this reply'. Place the incoming items inside as stacked strips.
03
Size limit applies
Only a limited amount can fit at once. If there is too much, some earlier material may be shortened, omitted or no longer included.
Add a vertical capacity meter on the side of the centre box. Show the box nearly full, with the oldest strip faded and partly below a cutoff line.
04
Model generates the next reply
The model processes the available tokens and predicts the next tokens for the response.
Draw an arrow from the centre box to a box on the right labelled 'model predicts next tokens'.
05
Output reflects what was available
The final reply is shaped by what remained in context, not by everything ever said everywhere.
Draw a final box labelled 'reply' with a note beneath it: 'depends on current context'.
A left-to-right flow diagram. Several labelled input boxes feed into one combined context panel, then into a model panel, then to one output box. A size meter on the context panel shows that if too much material arrives, older items fade or drop off. Read from left to right.
Hovering over each input strip highlights how it contributes to the combined context; moving a simple slider labelled 'more earlier text' fills the capacity meter and fades the oldest strip to show loss of influence.
Describe this without the diagram
The diagram explains that a model's next reply is based on material currently available for that turn. On the left are four sources: system instructions, earlier messages, the current message, and possible attachments or images. Arrows lead to a central box called available context for this reply. A capacity meter beside it shows there is a size limit. When more earlier text is added, the oldest material fades below a cutoff line, meaning it may no longer be included. The context then flows to a model box labelled predicts next tokens, and then to a reply box. The main point is that the reply reflects what fits in current context, not permanent memory.
With reduced motion: A static left-to-right diagram with the same boxes and arrows. The capacity meter is shown almost full, and the oldest context strip is already faded below a cutoff line to indicate that older material may stop affecting the reply when space runs out.
In chat systems, this means the material available right now as the model produces its next reply. That often includes the current user message, earlier messages in the same conversation, and hidden instructions set by the service. In some systems, it can also include attached documents or images.
What goes in is a bundle of input pieces. The system represents these pieces in forms the model can process. Text is split into tokens, such as words or parts of words. Images use other machine-readable representations. The model uses the resulting sequence, including reply tokens already generated, to predict the next token.
What comes out is a response shaped by that available material. If important facts or instructions are in the available material, the reply is more likely to reflect them. If they are missing, unclear or pushed out because there is too much text, the reply may ignore them or make mistakes.
Context is not the same as a prompt. A prompt is an input intended to guide the output, while context is all the material currently available. Context is also not long-term memory, which stores information for later sessions, or the context window, which limits how much material can fit at once.
How “A clerk checking application folders” maps onto the real thing
| In the story | In the AI system |
|---|---|
| The papers inside the folder | The current messages, documents or images available to the model |
| The office instructions on the desk | System instructions that guide the model's behaviour |
| The clerk's judgement about completeness | The model's next output |
| A page removed because the folder is too full | Earlier content no longer fitting into the available context |
A worked example
The officer asks the approved assistant to revise a de-identified lessons-learned draft for clearance by the chief of section.
Starting from: Available context: an instruction to use the headings Findings, Limitations and Follow-up; de-identified feedback extracts; the latest draft; and the request, “Shorten this to 250 words and retain any qualifications.” An earlier message explaining one qualification is no longer present.
- The model represents the instructions, feedback extracts, latest draft and current request that remain in context.
- It uses their content and order to estimate the next tokens, including the requested headings and shorter format.
- Because the earlier explanation is absent, the model cannot reliably preserve that qualification, even though the officer referred to it in the request.
- The officer compares the revision with the file, restores the missing qualification and sends the corrected draft for clearance.
Result: The assistant produces a concise, correctly structured draft, but omits the qualification that had fallen outside the available context. The omission is a context failure, not evidence that the model reviewed the full exchange and rejected the point.
In a United Nations workplace
A human resources officer in an inter-agency secretariat is preparing a note for the file before close of business on lessons from a recruitment-support assistant pilot. The approved workspace contains the drafting instruction, de-identified feedback extracts and an earlier summary, but the first part of the exchange has been truncated.
The model can shape the note only from material still available in its context. If the earlier summary contained an important qualification, truncation may produce a cleaner but less accurate account. The order of the feedback extracts and the latest drafting instruction can also affect what the model emphasises.
Before you try thisDo not enter applications, interview notes, performance records, medical details or other personal information into a tool that has not been approved for that material. Removing names may not prevent identification. Even in an approved workspace, use only the minimum authorised content and check the resulting note against the source record.
Where you may hear it
- A vendor demo for an ICT governance board
- A lessons-learned meeting after an assistant pilot
- A design review for a retrieval-enabled assistant
- A procurement clarification meeting on conversation limits
Avoid confusion
Avoid confusion
Often confused with
Context window
The maximum amount of input and prior output a language model can use at one time while producing the next part of a response.
Long-term memory (in AI systems)
Stored information an AI system can retrieve across separate sessions to personalise, continue tasks, or reuse past facts and preferences.
Prompt
The text, image or other input that guides a model on what kind of output to produce next.
Common misconceptions
Common misconception: Context means the model has human-like understanding of the whole situation.
Correction: People often use the word loosely, but here it means the input material available for generating the next output. The model may produce a useful reply from that material, but this does not by itself show human-style understanding.
Common misconception: If I said something earlier in the chat, the model will always remember it.
Correction: Earlier messages may influence later replies only if they are still included in the current context. In long exchanges, some systems summarise, trim or drop older material because of size limits.
Common misconception: Context and context window are the same thing.
Correction: They are related but different. Context is the actual material available right now. The context window is the system's capacity limit for how much of that material can fit at once.
Quick check
Which statement best describes context in a chat with a language model?
Context is the material available for the current turn, such as the current message, earlier messages still included, and system instructions. Training data, permanent memory and the latest message alone are different ideas.
Go deeper
Go deeper
The simple version
It is the information the model can see right now when it writes its next reply.
The technical version
In a language model system, context is the material available for the current generation step. It can include system instructions, user and assistant messages, tool outputs, retrieved text, prior generated output, and sometimes image or audio representations in multimodal systems. The model conditions its next-token probabilities on representations of this material. The exact reply depends on what is present, its order, and whether earlier material has been truncated, summarised or excluded to fit the context window. Context is temporary working input, not the same as parameters or any separate long-term memory mechanism.
Reviewed external resources
EncyclopaediaWikipedia search: Context (opens in a new tab)Wikipedia
This Wikipedia search results page helps readers find different articles related to context and suits people who want broad starting points rather than one fixed explanation.
search results, not one pagelink checked 2026-07-31
CourseLLM Course (opens in a new tab)Hugging Face
This course gives a structured introduction to how language models use input text and suits readers who want a guided technical overview.
Deeperlink checked 2026-07-31
VideoLarge language models, explained visually (opens in a new tab)3Blue1Brown
This video offers a visual explanation of large language models and suits readers who learn best through intuition and diagrams.
Intermediatelink checked 2026-07-31
VideoVideo explanations: Context (opens in a new tab)YouTube search
This YouTube search results page helps readers compare multiple video explanations of context and suits people looking for different teaching styles.
search results, not one pagelink checked 2026-07-31
DiscussionCommunity discussion: Context (opens in a new tab)Reddit search
This Reddit search results page shows community discussions about context and suits readers who want to see common questions and informal explanations.
search results, not one pagelink checked 2026-07-31
Where this came from
Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.
The one thing to remember
A model generates from the material available now. If an instruction or fact is missing, truncated or buried in the context, the next reply may change.