Skip to content
// Glossary · Cross-cutting

Context engineering

Also called: context design, prompt context management

What is context engineering?

Context engineering is the practice of deciding what an agent has in front of it for a given task: which material to retrieve, what to leave out, how to order it, and where it comes from. It treats the contents of the window as a design decision rather than a dump.

// In more depth

What the work consists of.

Mostly it is subtraction, which is the part people find counter-intuitive.

01

Choosing what to include

Documentation, code, prior conclusions, task state. Each has a different claim on the space, and the right mix depends on what the agent is being asked to do rather than on what is available.

02

Choosing what to leave out

A full window of loosely relevant text performs worse than a half window of directly relevant text. Irrelevant material is not free; it competes for attention and invites the model to use it.

03

Deciding where it comes from

Authored documentation, retrieved passages, and memory the agent wrote itself are different kinds of claim with different trust levels, and mixing them without distinction is how confident wrong answers happen.

// Why it matters

Why it decides output quality.

Given the same model, context is most of what is left to change.

Relevance beats volume

More text is not more help. What the agent has to ignore costs it something.

It is where memory pays off

The cheapest useful context is a conclusion the agent already reached, retrieved instead of derived again.

Provenance changes trust

Knowing whether a fact came from your docs or from an agent guess last Tuesday should change how much weight it carries.

// Commonly confused with

Commonly confused with.

Three adjacent practices.

Prompt engineeringPrompting is about phrasing the instruction. Context engineering is about what accompanies it. Related, but you can get the phrasing perfect and still hand the agent the wrong material.
RAGRAG is one retrieval mechanism you might use. Context engineering is the decision about what to retrieve, from where, and what to exclude.
Fine-tuningFine-tuning changes the model. This changes what the model is looking at on this task, without touching the model at all.
// FAQ

Context engineering questions

What is context engineering?

Deciding what an agent has in front of it for a task: which material to retrieve, what to leave out, how to order it, and where it came from. It treats the window contents as a design decision rather than a dump.

Is it the same as prompt engineering?

No. Prompting is how the instruction is phrased. Context engineering is what accompanies the instruction. You can phrase perfectly and still supply the wrong material.

Does a bigger window make it unnecessary?

It makes it more necessary. More space means more opportunity to fill it with material that competes for attention, and irrelevant context is not free.

Where does agent memory fit?

Memory is one of the highest-value context sources, because a conclusion the agent already reached is cheaper and more specific than re-deriving it.

Why does provenance matter?

Because authored documentation and an agent own earlier guess deserve different amounts of trust, and mixing them without distinction produces confident wrong answers.

Better context, without the manual work.

Virex Memory supplies what your agents already worked out, scoped to who should see it.