AI & LLMs

What is context engineering?

Context engineering is the practice of controlling which information an AI model has in front of it when it answers, so the model works from the right facts rather than the most recent ones.

New to Bolt? Sign up free.

Technical definition

Context engineering is the design of everything that occupies a model's context window at the moment of inference: the system prompt, conversation history, retrieved documents, tool output, file contents, and structured state. Where prompt engineering asks how to phrase a request, context engineering asks what the model should be looking at when it reads that request.

The practice covers selection, which information to include; compression, how to fit more signal into a limited window; ordering, where in the sequence it lands; and eviction, what to drop as the window fills.

In plain terms

An AI model can only reason about what it can currently see. Context engineering is deciding what to put in front of it.

On a small project this is invisible because everything fits. On a project with 60 files, it decides whether the AI edits the right one.

Why it matters

Most AI failures on large projects are context failures rather than intelligence failures. The model changed the wrong component because it could not see the right one. It reinvented a function that already existed two folders away. It forgot a rule you set 40 messages ago.

For anyone building something beyond a single page, managing context is what keeps quality from degrading as the project grows. It is also a cost lever: a bloated context spends tokens on information the model did not need.