# Context Engineering

> Picking what a model sees for each task, and in what order.

**Field:** Artificial Intelligence  
**Category:** Working with AI  
**Also known as:** Context Design, Context Management (AI)

## Think of it like

Think of it like you pack a school bag. You put in just what the day needs, in the right order.

## Definition

Context engineering is choosing all that a model sees in its context window for each request. That covers the rules, the chat so far, files, search results and what tools sent back. The window has a limit, and models use some parts better than others. So the job is to put in what helps, leave out what does not, and set it in a good order. It grew out of prompt engineering. Apps now feed models far more than one prompt.

## Example

Jack's help bot used to paste the whole 200-page manual into each request. Now it sends only the three pages that match the question. It adds the last five messages too.

## Why it matters

In long tasks and agents, most of the text a model reads was not typed by a person. What gets put in decides how well it works.

## Common mistake

Stuffing the window full because it fits. Extra text costs money and can bury the part that matters.

## Three principles

- **All of the window.** Not just the prompt.
- **Less can be more.** Leave out noise.
- **Order matters.** Key text first or last.

## Related terms

- [Context Window](https://learn.benibix.com/term/ai/context-window)
- [Prompt Engineering](https://learn.benibix.com/term/ai/prompt-engineering)
- [Lost in the Middle](https://learn.benibix.com/term/ai/lost-in-the-middle)
- [Prompt (AI)](https://learn.benibix.com/term/ai/prompt)
- [Context Rot](https://learn.benibix.com/term/ai/context-rot)

## Told apart from

- [Prompt Engineering vs Context Engineering](https://learn.benibix.com/compare/prompt-engineering-vs-context-engineering): People often think context engineering is a new name for prompt engineering. Prompt engineering is about the words in one prompt. That is the task, the examples and the format. Context engineering is about all that goes in the window each time. That takes in files, search results, tool output and the chat so far. In agents, most of that text was never typed by a person.

## Taught in

- [Context Engineering](https://learn.benibix.com/learn/ai-working-with-ai/context-engineering): Prompt Engineering, 9/16

![One long bar for the context window, split into parts: instructions, tool list, found documents, chat so far and the new question, with some space left empty.](https://learn.benibix.com/diagrams/pr-context-fill.svg)

---

Source: https://learn.benibix.com/term/ai/context-engineering
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
