AI Field Guide
Concepts

Context engineering

Updated 2026-08-04

Questions this answers

  • What is context engineering, and how is it different from prompt engineering?
  • Why does my agent get worse the longer it runs?
  • People say prompt engineering is dead. What replaced it?
  • How do I decide what to put in the model's context?

The Fix

Context engineering is the practice of deciding what a model sees on each call: the system prompt, the user's message, retrieved documents, past conversation, tool definitions, whatever the agent remembered. Prompt engineering is one slice of that, the wording of the instruction. Context engineering is everything around it, plus the discipline of curating that pile so the model gets what it needs without drowning in what it doesn't.

It matters most for agents. A single question is easy to get right, but an agent running a long loop keeps piling up history and tool output, and a bloated or noisy context quietly makes it dumber. Anthropic frames context engineering as managing that limited window on purpose, deciding what earns a spot and what gets dropped.

When to Use It

The term matters most once you're building agents or multi-step systems rather than firing off single prompts. If your agent starts strong and drifts as a session drags on, that's usually a context problem, too much noise crowding out the signal, and the fix is curation rather than a cleverer prompt.

In practice it looks like trimming what you feed the model, and summarizing old history instead of carrying all of it. For one-off chats you rarely need to think about it, but for anything long-running, it's most of the game.

Best Practices

Related