AI & LLMs

Context Engineering

also: context management · context curation

Curating everything the model sees each step — the discipline that replaced prompt-tweaking.

Context engineering is deciding what fills the context window at every step: system prompt, tools, retrieved knowledge, history, memory — and what stays out. Its four operations are write (persist outside the window), select (retrieve what matters), compress (summarize to budget), and isolate (split across sub-agents). It matters because attention is a finite budget: overstuffed windows degrade recall, add cost, and drift behavior.

Worked example: deciding what goes into the model’s limited context window — which instructions, retrieved chunks, examples, and history to include and in what order — so the model has exactly what it needs and no noise. Gotcha: more context is not better: irrelevant content dilutes attention and models degrade on facts buried mid-prompt (‘lost in the middle’), so curation and ordering (stable prefix first, most-relevant content near the question) often beat stuffing everything in.