Context
Context engineering: what belongs in the window.
A useful working model
The layer between asking and operating
AI practice did not move through three clean eras. People still write prompts, curate context and build larger systems around both. But a three-layer history is a useful working model: first we concentrated on how to ask, then on what evidence to place beside the question, and now on the operating system that coordinates the work.
The middle layer is context engineering. It is the deliberate selection, ordering and maintenance of the material a model receives for a task. That includes instructions, source documents, examples, tool results and prior decisions. Its hardest question is not how much information you can load. It is which information deserves the model's attention now.
The question changed
Good instructions still need the right evidence
A prompt tells the model what job it is doing, which constraints matter and what form the answer should take. That remains important. Yet a precise instruction cannot supply facts it does not contain. “Explain why the forecast changed” is a clear request, but the answer will still be weak if the model receives an old forecast, conflicting definitions or no record of the latest pricing decision.
Context is the evidence and working state placed around that instruction. Once models became more capable at following ordinary language, many failures that looked like prompt problems were better diagnosed as evidence problems: missing records, stale records, contradictory sources or too much unrelated material competing with the useful parts.
Capacity is not attention
A large window can still contain a small signal
A context window is the model's raw capacity: the maximum amount of text and other input it can accept in one request. Usable attention is the smaller, task-dependent portion it can apply reliably. Relevance, document order, contradictions, task complexity and the model itself all affect that portion. A larger window therefore creates room. It does not guarantee that every item in the room will influence the answer equally.
Too little context forces the answer to rest on unsupported inference. Too much low-value or conflicting context can weaken retrieval and make the result harder to verify. The figure below is conceptual, not a measured universal curve. Its point is practical: aim for the smallest set that is sufficient for the decision, then test whether adding or removing material improves the result.
Build context by relevance, not volume
A context window has capacity, while the task has a narrower evidence requirement.
- Task contract Outcome, constraints and definition of done.
- Primary evidence Current source files, policies, data and user state.
- Decision history Only the prior choices that change this task.
- Examples and tools Representative cases and the means to inspect reality.
- Excluded residue Stale outputs, duplicated text and unrelated exploration stay out.
There is no fixed attention band. Selection quality is part of the work.
A selection method
Filter for relevance, freshness, authority and proximity
Suppose the task is to explain a changed quarterly forecast and draft the decision note. The available folder contains last year's board deck, a current CRM export, three pricing policies, meeting notes and a finance memo approved yesterday. Loading the entire folder feels safe. It also puts obsolete and authoritative material side by side without telling the model which should win.
I use four filters. Relevance: does this item bear directly on the forecast? Freshness: was it current when the numbers changed? Authority: who owns or approved it? Task proximity: does it help answer this exact question, or is it merely about the same broad subject? In this case, keep the current CRM definitions, yesterday's approved memo and the active pricing policy. Include one prior forecast only if comparison is required. Leave the rest available for retrieval rather than placing it in the first request.
The method is not a scoring formula. It is a way to make inclusion explainable. If a source is present, you should be able to say what work it is there to do.
The operating practices
Retrieve, order, compact and remove
Selection is only the start. Retrieval brings in evidence when the task needs it. Ordering places instructions and decisive sources where the workflow expects them. Compaction turns an older exchange into a shorter working record, provided important decisions and unresolved questions survive. Removal keeps obsolete or distracting material out. Each practice spends capacity in service of usable attention.
The failure state I call the dumbzone is not a precise token threshold. It is the point where output remains fluent while task performance has become less dependable. That can happen because instructions are buried, sources conflict or earlier decisions were compressed badly. The remedy is not always a shorter context. It is a context whose contents and transformations can be inspected.
The layers remain active
Prompts direct, context informs, the harness coordinates
In the move from prompts to the harness, context management becomes an operating responsibility rather than a one-off preparation step. A harness is the surrounding system that assembles instructions and sources, calls tools, records state, runs evaluations and routes exceptions. It can automate context work, but it cannot make curation disappear.
All three layers stay active. The prompt defines the task and constraints. Context supplies the evidence and current state. The harness decides when and how those pieces are assembled, then checks what happened. The diagram uses historical absorption as a shorthand, not a claim that prompts vanished. Mature systems keep each layer visible enough to test, version and repair.
Prompting now lives across several layers
The task prompt still matters, but it no longer carries the full operating contract by itself.
- Task prompt Names the immediate outcome and local constraints.
- Standing instructions Carry durable conventions and authority boundaries.
- Context selection Supplies the evidence the model should reason over.
- Tool contracts Define what actions mean and which side effects are allowed.
- Evaluators Test whether the combined system earned the claim.
Prompt engineering was absorbed into a larger system, not retired.
A practical rule
Make every inclusion earn its place
There is no universal ideal context size. A legal review may need broad source coverage. A classification task may need only a definition and a few examples. Different models and retrieval systems behave differently, so the working set has to be evaluated on representative tasks rather than chosen by folklore.
The student in me likes accumulation: another paper, another transcript, another source in case it helps. Context engineering taught me a more professional discipline. Preserve access to the wider library, but make each item in the active working set earn its place through relevance, freshness, authority or task proximity.
Capacity tells you what will fit. Context engineering decides what belongs.