Context is the new prompt

A model only knows what is in its context window. Deciding what goes in, in what order and in what amount, now matters more than clever prompt wording. A practical way to think about it.

Headline 'Context is the new prompt' beside a window frame filled with layers of history, facts and instructions

For a while the craft of working with language models was prompt writing: find the right phrasing and the model behaves. With agents that approach runs out. An agent works across many steps, pulls in documents, calls tools and builds up history. What it sees at each step decides what it does, and that is a design problem, not a wording problem.

This is context engineering: deciding what the model sees at each step.

What belongs in the window

Instructions, facts, recent history and tool results feeding a context builder, then the model and the answer
  • Instructions. The role, the rules and the format of the answer. These stay stable from step to step.
  • Retrieved facts. The documents and data that matter for this step, and no others.
  • Recent history. The last few turns, summarised once they get long.
  • Tool results. Output from calls, cut down to what the next step needs.

Too little, too much, just enough

Three vessels: too little context, just enough and too much with the key line buried

With too little, the model guesses. It invents a detail, ignores a constraint it was never shown, or answers a different question. With too much, the important line is buried among irrelevant ones and the model loses the thread. Long context windows make this easier to get wrong, because there is always room to add more.

The aim is the smallest set of information that makes the right answer likely, in a clear order.

Habits that help

  • Put the most important instructions where they cannot be missed, and repeat the critical constraint near the end.
  • Retrieve by relevance to the current step, not by what is nearby or recent.
  • Summarise old turns instead of carrying them verbatim.
  • Trim tool output to the fields the next step uses. A full API response is rarely needed.

How to find out what is wrong

When an agent gives a bad answer, print exactly what it saw at that step. More often than not the cause is visible: the fact was missing, buried or contradicted by something older. That is faster than rewording the prompt and hoping.

Context is one part of a larger setup, covered in the harness post and in the ten skills overview.

If you want help with this on your own workflows, get in touch and we will look at it together.

YOUR NEXT USEFUL AI MOVE

Let’s make AI useful
in your world.

Start with a team ready to learn, a process worth assessing, or an AI system you want to build.

More articles

Test your agent before you trust it

Most teams judge an agent by whether its answers look right. A better test is whether the job got done. How to build a small set of evals and run it after every change.

Agents that know when to stop

An agent that repeats actions until a goal is met can also repeat them forever. Four rules that keep the loop finite, cheap and easy to debug.