Context and memory, why AI "forgets"
After an hour of chatting, AI seems to forget what you agreed at the start. It isn't absent-minded: the model remembers nothing, it rereads everything each time, and space is limited. Here is how the context window works and how to make it work for you.

On this page
In 30 seconds
- The model has no memory between messages: for every answer it rereads the whole conversation from the start.
- Everything it can “see” at that moment is the context window. On top models it reaches about 1 million tokens (about 1,500 pages), but in apps it is often much smaller.
- Long conversations degrade: information in the middle gets less weight. Better to restart with a summary.
- “Memory”, “projects” and RAG are tricks to put the right information into the context at the right time.
If you already know what the context window is, skip to “Where to put important things”.
You’ve spent an hour polishing a document with AI. At the start you agreed on the tone, the audience and three points not to touch; towards the end you notice the tone has shifted and one of the three points has vanished. It isn’t absent-mindedness: it’s how the context window works.
The model doesn’t remember: it rereads
This may be the most counter-intuitive thing about AI assistants. When you chat, it seems the model remembers what you said. Actually, every time you send a message, the app sends the model the whole conversation from the beginning, plus hidden system instructions, plus any files. The model reads it all, writes the answer and “forgets” everything. At the next message it starts again, with one more piece.
Two immediate consequences:
- Long conversations cost more and are slower, because each turn has more text to reread.
- There is a limit: when the conversation exceeds the context window, the oldest parts are cut or summarised by the app. At that point the model really no longer “knows” what you agreed at the start.
How big the window is
The context window is measured in tokens (see the lesson on how an LLM works). On top models it reaches about a million tokens, that is, hundreds of pages.
But beware: in apps the window is often smaller than the model’s via API, and it changes with the plan and the mode (quick answer or reasoning). On free plans it may be enough for a dozen pages, on higher plans for hundreds. The exact figure for your plan is on the service’s pricing page.
Use the calculator to see how much a document “weighs”:
- Estimated tokens
- 26,000
- Of a 1M window
- 2.6%
- Cost to read it once
- US$0.052
- Space reserved for the answer
- 32K token
Flat-rate API scenario without caching. Assumes 500 words per page and 1.3 tokens per English word. Of the 1,000,000 total tokens, 32,000 are reserved for the answer. Allow separately for instructions, history, tools and output cost.
Why long conversations degrade
Even when everything fits, not everything gets equal weight. A 2023 study (Lost in the Middle) showed models use information at the start and end of the context better than in the middle. Today’s models are much improved, but the effect hasn’t vanished: with long, meandering conversations, quality drops. Developers call it context rot.
Signs you’ve passed the useful point:
- the model repeats mistakes you already corrected;
- it forgets a constraint given at the start (“max 200 words”, “no bullet lists”);
- it mixes details from two versions of the same document.
The summarise-and-restart technique
When a chat gets long, write: “Summarise as a list everything we’ve decided so far: goal, constraints, choices made, open questions.” Copy the summary, open a new chat and paste it as the first message. You restart clean, with only what matters.
Where to put important things
Since the start and end weigh more:
- put instructions and constraints at the start of the message;
- when pasting a long document, repeat the question at the end, after the document;
- for very long documents, first ask for a map (“list the sections with page numbers”) and then work section by section.
Memory, projects and custom instructions
Apps have added features that look like “memory”, but they all work the same way: they automatically insert text into the context.
- Custom instructions: text you write once (“I’m an accountant, be concise”) added at the start of every chat.
- Memory: the assistant saves notes about you during conversations (“works with freelancers”) and reinserts them in later chats. You can view, edit and delete them in settings.
- Projects: a folder with instructions and files placed in the context of every chat in the project. The best way to work on one topic over time (a client, a book, a course).
Careful with memory
Memory is handy but can also “pollute” answers with old or off-topic information. Check what it saved now and then, and use temporary or incognito chats when you don’t want a conversation to leave traces.
RAG: search before answering
When there’s too much information for the context (all of a company’s documents, all of a site’s pages) you use RAG, Retrieval-Augmented Generation:
- documents are split into chunks and indexed;
- when a question arrives, a search engine finds the most relevant chunks;
- only those chunks go into the context, with the question;
- the model answers from them and can cite them.
That’s exactly how this site’s chatbot works: when you ask about the site, it searches the relevant passages across all guides and pages, reads them and answers with links. For fresh news it does the same on four external sites.
Tools like Gemini Notebook (formerly NotebookLM) and Projects in ChatGPT and Claude apply the same idea to your files: upload PDFs, notes, videos, and the assistant answers only from those sources, showing where each claim comes from.
Caching: why it sometimes costs less
If via API you often send the same opening text (same instructions, same document), providers can cache the part already read and charge much less for it on later requests. Quality is unchanged, but for chatbots and automations it can cut costs significantly. Anthropic, for example, further reduced cache-read costs for Sonnet 5.5 in October 2026.
In practice
- One chat per topic. Don’t use the same conversation for different things.
- Restart with a summary when the chat gets long or the model starts slipping.
- Instructions at the start, question also at the end when pasting long texts.
- Use projects for recurring work, with instructions and reference documents.
- Check the app’s memory now and then and delete what you don’t need.
- For many documents, use RAG: Gemini Notebook, Projects or a dedicated system.
Ready-made requests
Prepare a summary to continue this work in a new chat: goal; constraints and preferences I gave you; decisions made; documents or data that are authoritative; open items; the next step. Lists only, no comments. Don’t include ideas we discarded.
List what you remember about me and my work from previous conversations or memory. For each point tell me since when you know it and whether it might be outdated. Mark the ones that seem to contradict each other.
Try it in 10 minutes
Reopen your longest chat in one of the assistants you use. Ask about a constraint you gave at the start (“what word limit did I ask for?”). If it gets it wrong or hesitates, use “Summary to start over”, open a new chat with the summary and compare the quality of the next answers.
In one lineThe model doesn't remember, it rereads: you decide what goes in front of it, and you restart from a summary when the chat gets long.
Sources
Informational content. Prices, models and rules change often: check official sources before deciding. Written with the support of AI tools.

