The Essay Principle: Why Your AI's Context Window Is an Encyclopedia When It Should Be a Briefing
Here is a truth that most AI system builders learn too late: the context window is not a storage problem. It is a curation problem.
The dominant pattern in the industry right now is what we call the encyclopedia approach. Gather every scrap of potentially relevant information -- conversation history, system prompts, tool definitions, user preferences, retrieved documents -- concatenate it all into one enormous blob, and pray that the model can figure out what matters. When the blob exceeds the token limit, truncate from the top, the bottom, or somewhere in the middle. Whatever was cut is gone. Hope it was not important.
This is how most AI systems handle context today. It is fundamentally wrong.
We have spent the last year building a different approach, and the core insight is embarrassingly simple: any competent human can accomplish a complex task with an essay's worth of instructions, not an encyclopedia's worth.
The Essay Principle
Think about how a skilled surgeon prepares for an operation. Nobody hands them the patient's entire medical history -- every childhood vaccination, every dental cleaning, every insurance claim -- and says "good luck, it's all in there somewhere." Instead, a surgical team prepares a focused briefing: the relevant diagnosis, the specific procedure, the patient's drug allergies, the two prior surgeries that affect the approach. Maybe 2-3 pages. Everything the surgeon needs, nothing they do not.
That is roughly 3,000 words. About 4,000 tokens. An essay.
We call this the Essay Principle: the active context that an AI system works from at any given moment should be a surgically curated essay, not an encyclopedia dump. Every token in that window should justify its presence against the current task. If it cannot, it should not be there.
This does not mean the system should only know an essay's worth of information. A surgeon has years of training and thousands of past cases in their long-term memory. The point is that their working context for any single operation is tight, focused, and deliberately assembled.
The question, then, is what happens to everything that does not make the cut.
The Truncation Trap
Most systems answer that question with truncation: if it does not fit, delete it. This creates a brutal failure mode that we call the "lost forever" problem.
Imagine a system with a 200-line memory file. The user has a detailed conversation about their deployment architecture on Monday. By Wednesday, the memory file is full of newer information, and the deployment details get truncated to make room. On Thursday, the user asks: "Remember that deployment approach we discussed?" The system draws a blank. That knowledge was not archived, indexed, or moved anywhere recoverable. It was simply cut, like pages ripped from a book and thrown in the trash.
This is not an edge case. It is the default behavior of most context management systems, including some very prominent ones. The implicit assumption is that recency equals relevance, so older content can be safely discarded. Anyone who has worked on a real project knows this assumption is wrong. A decision made three weeks ago can be the most critical piece of context for today's question.
Truncation is not context management. It is context destruction.
Tiered Memory: Nothing Is Ever Lost
The alternative is to treat context like a library, not a clipboard. A library does not destroy books when the reading room is full. It moves them to the stacks, then to the archive, then to off-site storage. Every item remains retrievable. The only thing that changes is the access time.
We implement this as a five-tier memory architecture:
Tier 0 -- The Active Prompt. This is the essay. It is what the model actually sees for any given request. It has a strict token budget, and every item in it has been scored for relevance to the current query. This tier is small, fast, and merciless about what earns a seat at the table.
Tier 1 -- Hot Cache. In-process memory with instant recall and a 30-minute time-to-live. This is where recently used context lives after it leaves the active prompt. If the conversation shifts back to a topic discussed five minutes ago, Tier 1 provides it in microseconds without any search overhead.
Tier 2 -- Working Memory. Session-scoped storage with semantic search capability and a one-hour TTL. This tier handles the "we talked about this earlier in our conversation" recall pattern. Content here is indexed for meaning, not just recency, so the system can find it even if the user phrases their callback differently than the original discussion.
Tier 3 -- Long-Term Memory. Persistent, cross-session storage with a seven-day decay curve. This is where Monday's deployment discussion lives on Thursday. Items decay gradually based on a combination of age, access frequency, and relevance scoring. A piece of context that gets recalled frequently resets its decay clock. Knowledge that proves useful survives; knowledge that never gets referenced fades naturally.
Tier 4 -- Knowledge Graph. Permanent, relational, archival storage. This is the bedrock. Facts, relationships, and decisions are encoded as nodes and edges in a graph structure. Nothing at this tier decays. It represents the system's accumulated understanding -- not raw conversation logs, but distilled knowledge extracted from them.
The critical property of this architecture is that movement between tiers is always a demotion, never a deletion. When content is evicted from Tier 0 to make room for more relevant material, it drops to Tier 1. When Tier 1's TTL expires, the content moves to Tier 2. And so on. At no point does any piece of context simply vanish. It becomes harder to access, but it remains accessible.
Query-Conditioned Relevance Scoring
A tiered architecture solves the storage problem, but it does not solve the curation problem. How does the system decide what belongs in the active prompt for any given request?
The answer is query-conditioned relevance scoring. Every candidate piece of context -- every memory, every document chunk, every prior conversation turn -- receives a relevance score computed against the current query. Not against the conversation topic in general. Not against the user's profile. Against the specific words the user just typed.
When a user asks about Docker deployment, their prior discussion about container networking scores high. Their preferences about code formatting score near zero. When the same user then asks about code style, the scores invert. The deployment context drops out of Tier 0 and the formatting preferences get promoted in.
This is not retrieval-augmented generation in the traditional sense. RAG typically retrieves a fixed number of chunks and injects them wholesale. What we are describing is a continuous re-ranking of all available context at every turn, with aggressive eviction of anything that scores below a relevance threshold. The result is a prompt that reshapes itself around each query like water filling a container.
The scoring function itself can be surprisingly simple. A combination of semantic similarity (embedding distance between the query and the candidate), recency weighting (more recent items get a slight boost), and access frequency (items that have been useful before get a reliability bonus) covers most cases. The key insight is not the sophistication of the scorer but the discipline of applying it ruthlessly at every turn.
Dynamic Budgeting
Not every query deserves the same amount of context. A greeting -- "hey, good morning" -- needs maybe 500 tokens of context: the user's name, the time of day, perhaps a brief note about what they were working on yesterday. Stuffing 32,000 tokens of project history into the prompt for a greeting is not just wasteful; it is actively harmful. It dilutes the model's attention and increases latency for no benefit.
A complex architectural refactoring, on the other hand, might legitimately need 30,000 tokens of context: the current codebase structure, the target architecture, the constraints, the prior decisions that led to this point, the test coverage requirements.
We use a dynamic budget that scales with query complexity. A lightweight classifier estimates the depth of the incoming request -- is this a quick factual lookup, a conversational exchange, a deep analytical task, or an exhaustive multi-step operation? -- and sets the token budget accordingly. The context assembly pipeline then fills exactly that budget with the highest-scoring content, and stops.
This means the system is fast when it can be fast and thorough when it needs to be thorough. The budget shrinks to the minimum required, rather than padding to a static ceiling. A side effect is that simpler queries get faster responses, because the system spends less time assembling and processing context it does not need.
The OODA Loop: Autonomous Context Management
All of the above describes what happens on a per-request basis. But the most interesting part of this architecture is what happens between requests.
We run a continuous management loop modeled on the OODA cycle from military decision theory:
Observe. The manager monitors tier occupancy, access patterns, and decay curves across all five tiers. It knows how full each tier is, which items are approaching their TTL, and which items have been repeatedly promoted back to Tier 0.
Orient. It scores every item in every tier against recent query patterns and conversation trajectories. Items that align with the current thread of work score high. Items from abandoned topics score low.
Decide. Based on scores and tier pressure, it decides on promotions and demotions. A Tier 2 item that keeps getting recalled to Tier 0 should be promoted to Tier 1 for faster access. A Tier 1 item that has not been touched in 20 minutes should be demoted to Tier 2 before its TTL forces a less graceful transition.
Act. It executes the moves. Content flows up and down the tier stack continuously, positioning itself for maximum retrieval speed based on predicted future relevance.
This loop runs autonomously, without any user intervention. The user never thinks about context management. They just notice that the system seems to remember what matters and forget what does not -- which is, of course, the entire point.
The Practical Impact
The difference between encyclopedia-style context management and surgical context management shows up in three measurable ways.
Relevance. When the active prompt contains only high-scoring content, the model's responses are more focused and accurate. It is not distracted by irrelevant context that happens to be recent, and it does not miss relevant context that happens to be old.
Latency. Smaller, tighter prompts process faster. Dynamic budgeting means simple queries get simple prompts and fast responses. The system does not pay a 32K-token processing cost for a question that needs 500 tokens of context.
Continuity. Nothing is ever lost. The conversation from last week, the decision from last month, the preference expressed once in passing -- all of it remains in the tier stack, retrievable when relevant. Users stop having the uncanny experience of an AI that forgets things it definitely knew yesterday.
Build It Yourself
The patterns described here are not proprietary magic. They are architectural decisions that any team building an AI system can implement:
- Set a strict token budget for your active prompt and enforce it ruthlessly.
- Build at least three tiers of storage with increasing latency and decreasing eviction pressure.
- Score every piece of candidate context against the current query, not just the conversation topic.
- Scale your context budget to match query complexity, not a static ceiling.
- Never truncate. Always spill to a lower tier.
- Run a background process that continuously re-ranks and repositions content across tiers.
The hardest part is not the implementation. It is the discipline to stop treating the context window as a dumping ground and start treating it as the most valuable real estate in your system. Every token that earns a place in the active prompt displaces another token that might have been more useful. Curation is not optional. It is the entire game.
The encyclopedia approach was fine when context windows were 4K tokens and there was not much to manage. At 128K and beyond, with persistent memory, tool use, and multi-session continuity, it is a liability. The systems that win will not be the ones with the largest context windows. They will be the ones that use their context windows most surgically.
An essay, not an encyclopedia. That is the principle. Everything else follows from it.