# Context engineering

> Deciding what information goes into the model's context — instructions, documents, examples, history, tool results — and in what order and form.

Source: Promptea — https://www.promptea.me/en/glossary/context-engineering · Language: English · Last updated: 2026-11-09

## What it means

- Definition: context engineering widens prompt writing from 'how do I phrase the request' to 'what should the model see, from where, and in which shape' — everything in the window, not just your last message.
- Why it matters: the quality of an answer depends on the quality of its context. Missing facts cause guesses; irrelevant text dilutes attention and costs tokens.
- How to apply it: select only what the task needs, label each piece (instructions, data, examples), put stable rules first and the question last, trim or summarize history, and re-check what is actually being sent.
- Pair it with evaluation: change the context, rerun your test inputs, and keep what measurably helps.

## Example

```text
<instructions>
You are a support analyst. Answer only from <policy> and <ticket>. If the policy does not cover the case, say so.
</instructions>

<policy>
[paste only the relevant policy section]
</policy>

<ticket>
[paste the ticket]
</ticket>

Task: draft a reply of at most 120 words and name the policy rule you applied.
```

[Open in Promptea](https://www.promptea.me/en/analyzer?prompt=%3Cinstructions%3E%0AYou+are+a+support+analyst.+Answer+only+from+%3Cpolicy%3E+and+%3Cticket%3E.+If+the+policy+does+not+cover+the+case%2C+say+so.%0A%3C%2Finstructions%3E%0A%0A%3Cpolicy%3E%0A%5Bpaste+only+the+relevant+policy+section%5D%0A%3C%2Fpolicy%3E%0A%0A%3Cticket%3E%0A%5Bpaste+the+ticket%5D%0A%3C%2Fticket%3E%0A%0ATask%3A+draft+a+reply+of+at+most+120+words+and+name+the+policy+rule+you+applied.&purpose=text&target=gpt)

## Frequently asked questions

### Is context engineering the same as prompt engineering?

It includes it. Prompt engineering focuses on the wording of the request; context engineering also covers which documents, examples, history and tool results are sent along.

### How much context is too much?

When added material stops improving your test results. Beyond that it only costs tokens and can bury the facts that matter.

## Related

- [Context engineering: how to structure what you give an AI for better outputs](https://www.promptea.me/en/guides/context-engineering)
- [Prompt chaining: how to break complex tasks into sequential AI steps](https://www.promptea.me/en/guides/prompt-chaining)
- [System prompts: how to set persistent instructions for ChatGPT, Claude, and Gemini](https://www.promptea.me/en/guides/system-prompts)
- [Context window](https://www.promptea.me/en/glossary/context-window)
- [Retrieval-augmented generation (RAG)](https://www.promptea.me/en/glossary/retrieval-augmented-generation)
