The context window is the maximum amount of text, measured in tokens, that an AI model can take into account at once: your messages, its answers, the instructions and any documents you give it. Whatever falls outside that window does not exist for the model. That is why it seems to forget the beginning of a long chat.
💬Conversation history→📱The app builds context→📏Token limit→🤖The model answers
Put it to the test
A question from the app. Pick an answer.
What does it look at to predict what comes next?
It looks at much more: all the text that fits in its context window.
If randomness is used, it is guided by probabilities computed from the context.
Your message and what it already wrote, up to a limit called the context window. That is why context matters.
The model keeps no memories between one message and the next. For each answer, the app sends it the conversation again along with your new message. While everything fits in the window, it seems to remember. When the chat grows too big, the app usually cuts the oldest part or replaces it with a summary.
An example: at the start you tell a bakery assistant you are celiac. Forty messages later you ask for a bread recommendation and it suggests one with gluten. One possible cause: that detail fell out of the window. It can also slip while still inside, but in a long chat it is the first thing to suspect.
What takes up room in the window
Not just your messages. The instructions the app gives the model (which you do not see), the files you attach, the chunks a RAG search brings in and the answer the model is writing all count too. Everything shares the same space, and choosing what goes in is context engineering.
With example numbers: if the window were 8,000 tokens and you paste a 6,000 token contract, about 2,000 are left for the instructions, the chat and the answer. That is why, after pasting a long document, the AI can lose track of the conversation sooner.
Other languages fill it faster
Many tokenizers split languages like Spanish or Portuguese into more pieces than English. So the same chat written in one of those languages usually takes more tokens and fills the window sooner. If you use AI in a language other than English and it seems to forget quickly, it is not always the model: the language weighs in too.
Common mistakes and what to do
"With a huge window it remembers everything perfectly." Not always: in very long texts, many models pay less attention to what sits in the middle. "The window is the app's memory." No: some apps keep notes separately and send them again with every message, but that is a different piece.
What to do: if a detail is key, repeat it close to your question. If the chat is already very long, ask for a summary, open a new chat and start by pasting that summary.