Context is a budget, not a container: what to cut first
A context window is a number of tokens, not a quantity of understanding. Every token spent on context is a token unavailable for the answer, and the failure is not a clean error at the limit: recall degrades before the window is full, and the model answers confidently from the half it still holds. So the useful question is not "does it fit" but "what is this costing me in attention".
The catalogue behind this site puts the smallest window at 32,000 tokens and the largest at 10,000,000, which is a spread of about 312 times. The order below matters more than the number, because it is the same order on both ends.
A working budget, in tokens
One developer, one task, six files, eight turns of conversation. These are the figures a session spends before anyone notices:
| What it is | Tokens | Notes |
|---|---|---|
| System prompt and rules | 2,300 | 900 for the role, 1,400 for the project rules |
| The task | 400 | The ticket, restated in your own words |
| Six files | 13,200 | 2,200 each, which is a 300-line file |
| Eight turns of conversation | 2,800 | 350 each, and it grows every turn |
| Total before the answer | 18,700 | 14.6% of a 128,000-token window |
Two readings of the same 18,700. On a 128,000-token window it is 14.6%, comfortable, with room for a 4,000-token answer and several more turns. On the 32,000-token window at the small end of the catalogue it is 58.4%, and the first follow-up question pushes past the point where the earliest file is still being read. Nothing in the session changed; the window did.
That is the whole argument for treating this as a budget: the same conversation is affordable on one row of the catalogue and improvident on another, and the difference is a number you can read at /model-limits before you start.
What to cut first, in order
- The rule you have written three times. In most long sessions the same prohibition appears in the system prompt, in the task and in a later correction. Two of those are duplicates, and the duplicate is pure cost with no additional weight. This is almost always the largest saving available.
- Whole files where one function would do. A 300-line file is 2,200 tokens to say 200. Paste the function under change and the interface it satisfies, not the module around them.
- Turns that have been resolved. An exchange where you corrected the model and it agreed has done its work; keeping it means paying to re-read a mistake every turn afterwards.
- Examples beyond the second. One example defines a format, a second defines an edge, a fifth defines nothing new. If example five is different in a way that matters, it is a rule, and rules are shorter.
- Tool output you already summarised. A test log of 900 lines, quoted in full and then described in a sentence, is the description plus 900 lines. Keep the sentence and the last ten lines.
- The model's own earlier reasoning. Long chains of thought are the most expensive text in the window and the least reusable. Keep the conclusion, drop the derivation.
What not to cut, even when the budget is tight
- The check. A prompt with no verification line is a prompt that cannot fail visibly, which is worse than one that fails. If you cut down to three sentences, one of them is the check.
- The prohibition with its reason. "Never edit
db/migrations/**, already applied in production" is 12 tokens that prevent an unrecoverable mistake. - The one example that defines the format. A shape described in prose is interpreted; a shape shown once is copied.
- The stop condition. "If two files disagree about the schema, quote both and stop" is the cheapest instruction in any prompt, because it converts a confident wrong answer into a question.
Measure it in one line
Characters divided by four is close enough for a budget. Paste the prompt into the free scorer at /tools/prompt-score, and its length category will tell you where you stand against the window you selected: full marks between 5% and 15% of the window, falling away below 0.5% and above 30%. Below 5% the prompt is often too thin to be checkable; above 30% you are paying for context the model will not use well.
The lessons that go further, in the site's course, are context windows and tokens, then the five that treat the window as a budget: context is a budget, what deserves to be in the window, compaction and summarising, retrieval and ranking and measuring whether it worked. The next question, what the tokens cost on each of 245 models, is the calculator.
Related guides
Part of the guides index. Two that follow this one: Token and cost calculator for 245 models and Ollama and LM Studio system prompt settings.
Cite this page as: TPEE, the Toptronic® Prompt Engineering Editor — https://tpee.app/guides/context-is-a-budget. Ask: support@tpee.app.