New: the Lumen ebook, the history and tools of AI in one bookDiscover it →

Context and memory, why AI "forgets"

The context window is everything the model sees at once. How big it is, why long conversations degrade, and how memory, projects and RAG work.

Mattia PanattaUpdated 15 October 202611 minBeginner
A long paper scroll passing through a glowing window, faded in the middle
AI-generated illustration

In short

  • 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.

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 guide on how an LLM works). As of October 2026, according to Artificial Analysis, almost all top models have a window of about 1 million tokens: Claude Opus and Sonnet 5.5, GPT-6.1 Sol, Gemini 4 Argon. Llama 4 Scout reaches 10 million.

But beware: in apps the window is often smaller than the model’s via API. For example, ChatGPT’s pricing page lists for Instant mode a total context of 27,000 tokens on Free (about 12 pages of text), 54,000 on Go and Plus and 128,000 on Pro; for reasoning it rises to 256,000 on Go and Plus and 400,000 on Pro. Claude states “up to 1M, varies by model” on every plan.

Use the calculator to see how much a document “weighs”:

Estimated tokens
Of a 1M window
Cost to read it once
Fits ChatGPT Free?

Estimate: 500 words per page, 1.3 tokens per English word. Cost with GPT-6.1 Sol ($2 per million input tokens) and Claude Haiku 5.5 ($0.10). ChatGPT Free takes about 12 pages in Instant mode (27,000 total context tokens).

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:

  1. documents are split into chunks and indexed;
  2. when a question arrives, a search engine finds the most relevant chunks;
  3. only those chunks go into the context, with the question;
  4. the model answers from them and can cite them.

That’s exactly how Lumen’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

  1. One chat per topic. Don’t use the same conversation for different things.
  2. Restart with a summary when the chat gets long or the model starts slipping.
  3. Instructions at the start, question also at the end when pasting long texts.
  4. Use projects for recurring work, with instructions and reference documents.
  5. Check the app’s memory now and then and delete what you don’t need.
  6. For many documents, use RAG: Gemini Notebook, Projects or a dedicated system.

Sources

Informational content, current as of the date shown. Prices, models and rules change often: always check official sources. Written with the support of AI tools and reviewed by the author.

The Lumen ebook

All of AI, in one book.

History, inner workings, tools and future of AI, explained with the lights on. For those who want to really understand, from start to finish, and keep it at hand.

Next guide →Hallucinations, why AI makes things up and how to protect yourselfNon-existent rulings, wrong numbers, quotes never said. Where hallucinations come from, when they are most likely, and a six-step method to avoid being fooled.