Context windows: the core model's short-term mind.
The context window is the most text a model can process in a single interaction. It is measured in tokens; one token is about three quarters of a word.
It works like RAM
The context window is working memory. Every time you hit Enter, the entire conversation (your words, its replies, the full history) is bundled up and sent again. Between prompts, the model remembers nothing.
Self-attention
Frontier models are built on an architecture called the Transformer. It relies on self-attention, which maps the mathematical relationship between every token in the context window and every other token.1
The limits
Huge windows. Steep limits.
Frontier models now advertise windows of 128,000 tokens, and some reach one or two million. Size doesn't solve two problems.
Computational cost
Standard self-attention scales quadratically: O(N²). Double the window and you quadruple the compute. Latency rises. Infrastructure costs climb.
The middle goes soft
A model may accept 1,000,000 tokens, but that doesn't mean it reads them all with equal clarity. Studies show models retrieve information well from the very beginning or the very end of a long prompt. Accuracy drops significantly when the crucial information is buried in the middle.2
Over the limit
What happens when you go past it?
The model can't absorb any more, so the system has to drop data. The failures are specific.
Hard truncation
The oldest messages are deleted from what gets sent to the model.
Loss of early instructions
The rules you set at the start of the conversation get pushed out. Formatting slips. The persona shifts. The objective fades.
Contradictions and hallucinations
Early facts fall away. The model contradicts itself. It fills in the blanks by making things up.
How browser and desktop apps fake a memory.
Context windows are expensive and finite. So consumer apps, like the browser and desktop versions, use workarounds that create the illusion of persistent memory. They keep track of you in two main ways.
Workaround 1
Rolling windows: summarize and delete.
When a chat gets too long, the app quietly asks a smaller, faster model to summarize the earliest part. Then it deletes the original messages and puts the summary at the top.
A game of telephone
Granular details go. Nuance goes. Code snippets go. Names go. The model ends up reacting to the cliff notes, not the complete record.
Workaround 2
Vector databases and RAG.
When an app says it remembers you across separate chats (your job, your birth year, your preferences), it uses retrieval-augmented generation, or RAG. It draws on a small database it keeps about you.
- You state a fact: “I work as a bartender.”
- The app decides it's a lasting preference and pulls the fact out.
- It saves the fact as a mathematical embedding in a vector database on a server.
- Tomorrow, in a new chat, the app searches that database for relevant facts.
- It silently adds them to the hidden instructions of your new message.
These memory stores don't hold millions of words per user. They hold a few hundred explicit memory slots: a few megabytes of text, at most.
How RAG memory fails
The wrong memory wins
Conflicting memories compete. The system pulls the wrong background and carries on from the wrong information.
Out of sync with reality
Life changes. The old memory isn't deleted or overwritten. The AI stays anchored to outdated data, and its answers are confident but wrong.
Facts without the story
Memories arrive as isolated facts, not a continuous narrative. The AI knows what you prefer, but not why, or how that preference came about.
So what is memory here?
Memory is a scattershot of what you have told the model. It is never the whole story.
Your marketing is the whole story: years of customers, campaigns and results. That's why I built AtmaOS. See how it works →
Need a team that remembers?
Notes
- Ashish Vaswani et al., “Attention Is All You Need,” in Advances in Neural Information Processing Systems 30 (2017). arxiv.org/abs/1706.03762 ↩
- Nelson F. Liu et al., “Lost in the Middle: How Language Models Use Long Contexts,” Transactions of the Association for Computational Linguistics 12 (2024): 157–73. arxiv.org/abs/2307.03172 ↩