AI in PracticeSeptember 27, 2026·6 min read

What Is Context in AI? Why It Makes or Breaks Your Results

Context is what an AI model can see when it answers you. Learn how context works, why long chats lose the thread, and how to give the model what it needs.

You asked for a birthday message for your sister and got back something that could describe a stranger. The model didn't fail at writing. It was missing information: who she is, what she likes, what you wanted the message to sound like.

That information is called context, and it's one of the simplest ways to improve an AI answer. This post covers what context is, why it runs out, and how to hand it over on purpose.

What context means in AI

Context is the information an AI can use for one response: your latest message, the earlier messages in the conversation, any files you've uploaded, and any instructions the app adds. If an important detail isn't available there, the model has to guess, and guesses tend to come out generic.

Context is also different from the knowledge a model picked up during training. Training gives it general ability, like how to write clearly. Context gives it this situation: your sister, your project, your report. For any single answer, the context is what tailors the response to you.

A simple way to picture it: the model answers from a stack of notes, and the stack is the conversation so far plus anything you've uploaded. A detail that never made it into the stack isn't available to the model.

The context window: how much fits at once

Everything in the stack shares one limit, called the context window: the maximum amount of text a model can take into account at once. It's measured in tokens, which are small chunks of text.

Modern windows are large. OpenAI's documentation lists GPT-5's context window at 400,000 tokens, roughly 300,000 words, and Google's Gemini models have advertised windows of a million tokens or more. Large, but not infinite, and two things matter more than the size.

First, the window holds the whole conversation, not just your latest message. Every question you asked and every answer the model gave fills the window together. A chat that started yesterday with a long document upload has less room today than a fresh one.

Second, quality can fade long before the window fills up. A long chat may start ignoring an earlier instruction, repeating itself, or giving vaguer answers even though nothing hit a limit. Size is the ceiling; it's not a promise of quality all the way up to it.

Why long conversations lose the thread

Conversations degrade in a few distinct ways as they get longer.

Missing context is the common one: the model never had the detail it needed. You asked about "the report" without uploading it, or asked for a rewrite without saying who the audience is. When important details are missing, the model has to infer them, and those guesses tend to sound generic.

Buried context shows up in long chats. In a 2023 study, Stanford researchers found that language models answer best when the relevant detail sits near the beginning or end of what they can see, and worst when the same detail is buried in the middle. A message you sent on Monday is deep in the middle by Thursday.

Reliability also fades as the input grows. A July 2025 technical report from Chroma tested 18 models and found that performance tends to drop as input length increases, even inside the window. In practice: the model still has your text available, but it may have a harder time finding and using the detail that matters.

None of this makes long chats bad. It means the deeper a chat goes, the more the model has to sort through, and the more help it needs from you.

Giving context on purpose

The fix we use costs about a minute: before the request, hand over what a competent stranger would need. A short description of what you're trying to do and who the output is for, any constraints (length, tone, format), and what you've already tried. Two sentences of setup can save a page of re-asking later.

Three habits keep the window clean as a conversation goes on:

This is also where the prompting habit changes. A prompt isn't a magic word combination; it's a delivery mechanism for context. The more complete the delivery, the less the model has to guess.

Does more context always help?

No. Dumping everything into the window tends to dilute an answer: the model has to sort the relevant from the filler, and the Chroma report shows accuracy dropping as input grows. The right ingredients beat a bigger pile, so curating context usually beats expanding it.

Frequently Asked Questions

What is context in AI?

Context is the information an AI model can use for one response: your current message, the earlier conversation, uploaded files, and any instructions the app adds. The model can't draw on details that aren't in that set, so supplying relevant background usually improves the answer.

What is a context window?

A context window is the maximum amount of text a model can take into account at once, measured in tokens. GPT-5's context window is 400,000 tokens (roughly 300,000 words) according to OpenAI's documentation, and Google's Gemini models have advertised windows of a million tokens or more. The whole conversation shares the window, not just the latest message.

Why does ChatGPT forget what I said earlier in the conversation?

A few things cause it: the relevant message may sit in the middle of a long conversation, where models are least reliable; accuracy tends to drop as total input grows even inside the window; or the detail never made it into the chat at all. Restating the key points in a fresh message usually brings them back.

Is context the same as memory?

No. Context is what the model sees in the current conversation, and it resets when the chat ends. Memory is a separate feature some apps offer, where a few saved details carry over into future chats. Even with memory on, the model works from the context in front of it during each conversation.

Can I add context after sending a message?

Yes. The model sees the whole conversation on every reply, so adding a detail in your next message works: "one more thing, the message is for my sister, keep it casual." It also re-surfaces anything the chat lost along the way.

Should I start a new chat or keep the same conversation going?

Keep the same chat while earlier messages still matter, since anything you've said is context the model can use. Start a new one when the topic changes or the chat gets long, then restate the background that matters for the new task.


Want to go further?

Want to keep going?

Get the next one delivered.

If you liked this, the next one is worth an inbox slot.