1. Home
  2. Glossary
  3. Context engineering
AI glossary · Prompting

Context engineering

Context engineering: Context engineering is the practice of choosing what an AI model sees when it works on a task: instructions, documents, examples, tool results, and history, and how they are arranged. It extends prompt engineering from wording to the whole input.

Prompt engineering is about how you phrase a request. Context engineering is about everything else the model reads before it answers: the system instructions, the files you attach, the examples you include, the results of any tools it called, and the earlier turns of the conversation. The term took off in 2025 as builders of AI agents realized that the quality of an agent's output depended less on clever wording and more on feeding it the right material at the right moment.

The core idea is that a context window is a limited, expensive resource. Stuff it with everything and the model gets distracted, slows down, and starts missing details. Starve it and the model guesses. Good context engineering means giving the model what it needs for this step, nothing it does not, in a structure it can follow: the brief first, the source material clearly labeled, the constraints last.

You do this already if you use a Claude Project, a custom GPT, or a Gemini Gem: the instructions and knowledge files you load are context engineering. So is choosing to paste the style guide instead of describing it, or trimming a 60-message thread down to the five messages that matter before asking for a summary.

Example at work

An operations manager building an assistant to answer warehouse policy questions loads the current handbook, the last two policy memos, and five example question-and-answer pairs, then adds one instruction: "If the handbook does not cover the question, say so and name the section that comes closest." Answers improve more from that setup than from any rewording of the questions.

Why it matters

Most disappointing AI results come from missing or messy context, not from a bad prompt. Thinking about what the model can see, and what it cannot, is the fastest way to get better answers from any tool.

Related terms