Context engineering is the evolution of “prompt engineering”: it covers everything the model sees at generation time, not just a user-visible prompt.
What Counts as Context
- System instructions
- Tool definitions
- Conversation history
- Retrieved documents
- External state (memory)
Why It Matters for Agents
Agents fail as contexts grow: irrelevant information accumulates, important constraints get diluted, and long-horizon coherence degrades.
Key Ideas
- Prefer just-in-time retrieval over dumping large corpora.
- Use progressive disclosure (only reveal what is needed).
- Regularly compact and summarize state.