Marcel Headlam

Library/How AI works

What a Context Window Is, and Why It's the Thing That Bites

By Marcel Headlam·4 min read

Picture a desk with no drawers. The desk is wide and flat, and it holds everything the AI can see right now. That means your messages, its replies, any files you've uploaded and any standing instructions.

There's no filing cabinet behind the desk, and there's no memory of other desks either. The only extra is a small note pinned to the corner, if the memory setting is switched on. When the AI writes a reply, it reads the whole desk first, and nothing else.

That desk is called the context window, which means the amount of text an AI can keep in view at one time. Nothing about these tools is more useful to understand. When a chat seems to have gone stupid, it has usually run out of desk.

The desk only ever fills up

The desk is big, and today's tools can hold about a long novel's worth of text on it. But the desk is a fixed size, and a conversation only ever adds to it. Every message you send and every reply the AI gives goes on the pile.

There's no moment of "it understood that, so we can clear it off". What the AI understood is the pile.

The pile isn't shared evenly, either. The AI's replies are usually longer than your messages, so most of the desk is the AI's own words. A long document you uploaded sits there in full, and so does every image.

Paste in a forty-page contract on your third message, and that contract takes up a quarter of the desk for the rest of the chat.

None of this shows on screen. A chat that has run all afternoon looks exactly like one you started five minutes ago, until suddenly the AI starts forgetting.

The oldest sheets go first

Once the pile reaches the edge of the desk, something has to go. What goes is whatever has been there longest, and usually that's the part where you said what you wanted.

Some tools now quietly summarise the old part of a long chat. That helps, but it means what the AI "remembers" of your fifth message is only a summary of it, and the small details go first.

Memory features don't change any of this. The note in the corner stays small, and the desk stays the same size.

The AI doesn't notice the gap

When something falls off, the AI doesn't know it's gone, because it can't see an empty space where your instruction used to be. All it sees is a desk, so it reads that desk and answers from what's there.

Say at the start you wrote "no bullet points". Forty messages later, you get bullet points, because bullet points are its habit and your rule has fallen over the edge. Or early on you gave it the client's name and the budget, and now it makes up a likely-sounding budget instead of asking.

Each of these mistakes comes out in the same confident voice the AI used when it was right. The voice was never linked to whether the AI actually knew.

Long chats are one of five places where AI invents things, and the page on why AI makes things up lists all five. In those examples, facts fell off the edge, and the AI filled the gaps with the most likely guess.

The desk is a simple picture of something more complicated. In the real thing, the AI doesn't pay equal attention to the whole pile, and in a long chat the middle is often the haziest part. Different tools also handle the edge in different ways.

Still, the desk predicts the failures well enough to help you avoid them. Desks get bigger every year, but that only moves the edge further out.

Deciding what goes on the desk

Here are four habits, in order of how much they help.

Give the permanent things their own place. Your instructions, reference files and the facts about your situation can go in a Project. A Project is a saved space that puts those things back on the desk at the start of every chat.

Project or Skill? explains which of the two you need.

Of the four habits, this one fixes most of the problem.

Give each job its own chat. Use one chat for the email and another for the plan, because short chats never reach the edge. The page one chat, one job covers this habit in full.

Pack up before you move. When a chat has grown long and useful, ask the AI for a short handover note that covers the goal, the decisions made and what's left to do. Then start a fresh chat with that note.

You'll find the exact words to use on the long-chat page.

Attach rather than paste. A document uploaded as a file gets handled more cleverly than forty pages pasted in as text.

Some tools don't keep the whole file on the desk at all. Whichever tool you use, upload the file once, in its own chat.

The AI reads the whole desk, every time. You decide what earns a place on it.

Get one of these every week

One short, free guide each week. A way to use AI you can try that day, where AI falls short, and what stays yours.

Unsubscribe whenever. I'll only use your email to send the guide. Privacy.