A language model can only work with what is in front of it when it answers. Context engineering is the practice of deciding exactly what that is, so the model has what it needs and as little as possible of what it doesn't.
What the context window is
Every time you send a message to a large language model (LLM), the app sends the model a block of text. That block is the context, and the most it can hold is the context window. It is measured in tokens, small chunks of text that are often a whole word and sometimes part of one.
The context usually holds far more than the message you typed:
- Instructions: the system prompt that sets the model's role and rules.
- Chat history: earlier messages in the conversation, sent again on every turn.
- Files and documents: code, specs or pages the app pasted in.
- Tool definitions and results: what tools the model may call, and what came back when it did.
- Examples: sample inputs and outputs showing the style or format wanted.
The model itself is stateless between calls. It doesn't remember your last message; the app sends the history again each time. That is why the context window is best thought of as working memory, not long-term memory. What the model learned in training is its general knowledge. The context window is the desk: whatever is on it right now is all the model can look at for this answer. On most models the reply it writes counts towards the same limit, so a packed desk also leaves less room to answer.
Why a bigger window isn't a free win
A small window forces hard choices: a long spec and a long chat history may not both fit. So bigger windows sound like the answer, and they do help. They leave room for more rules, more examples, whole documents and the results of many tool calls.
Wondering how this was made? How we make these