Context and RAG

Context: the AI’s desk, and why it forgets

What the AI can see while it answers, what quietly takes up space, and what happens when the desk is full.

5 min1 / 4

A language model does not remember you between messages the way a colleague does. Its general knowledge was learned once, before release, and is the same for everyone. Each time you press “Send”, it starts fresh and rereads everything that is currently in front of it. That “everything in front of it” is called the context.

Picture a desk

Think of the context as a desk. Everything the AI uses to write its answer has to fit on that desk at the same time. The size of the desk is the , measured in , small pieces of text of roughly three quarters of a word. Claude’s current models can hold up to about a million tokens, which is several thick novels. What a chat app actually puts on the desk can be smaller, depending on the app and plan.

It is not just your message

A common surprise: the desk holds far more than what you type. Several invisible layers share the same space, every single turn:

  • Hidden instructions from the app that tell the AI how to behave.
  • Memory and project instructions: saved facts and rules that get placed on the desk for you.
  • Files you uploaded and results from tools such as a web search.
  • The whole chat so far: every earlier question and every earlier answer.
  • And finally, your new message.

Fill the AI’s desk

Switch things on and off and drag the slider. The numbers are rough estimates in tokens, for illustration.

  • Hidden instructions from the app: 5,000
  • Memory about you: 1,500
  • Chat history (20 messages): 24,000
  • Your new question: 150

30,650 of 200,000 tokens used (15%) Plenty of room, and little to distract the AI.

Why the AI “forgets”

Because the whole desk is reread every time, a long chat gets heavier with every message. When it no longer fits, developer tools show an error, but chat apps usually act quietly: they summarise or drop the oldest messages. That is why, an hour into a chat, the AI can suddenly ignore a rule you gave it in your first message. It did not decide to ignore you. The rule was simply no longer on the desk.

It also costs you usageA longer desk means more tokens for every single message, so long chats use up your plan’s limit faster. Try it in the Token calculator.

Context, memory and projects: three different things

TermWhat it isLasts
ContextThe desk for one chatOnly this chat
MemoryA few saved facts about you, placed on the desk in new chatsAcross chats
ProjectA workspace with fixed instructions and reference filesFor all chats in the project

Memory and project files also end up on the desk when they are used. They are convenient, but they take space like everything else.

Try it now: In a long chat, ask: “Which instructions from the start of this chat are you still following?” You will see what is still on the desk.

Check yourself

1. What does the AI read when you send a new message in a long chat?
2. Why might an AI ignore a rule you gave at the start of a very long chat?
3. Which of these is NOT on the desk unless it is used in this chat?

Tip: use ← and → to move between lessons.