711
Dictionary

Context Engineering

Context engineering is the discipline of deciding exactly what information enters a model's context window, in what order and at what cost.

2 min readupdated 2026-08-01

/ quick answer

Prompt engineering writes instructions; context engineering manages the whole payload — system rules, retrieved knowledge, tool schemas, conversation history and tool output. The core moves are: retrieve instead of dumping, summarise before re-injecting, cache stable prefixes, and cut anything that hasn't changed a decision. Most agent quality and cost problems are context problems.

Context engineering is the discipline of deciding exactly what information enters a model's context window, in what order and at what cost. Prompt engineering writes instructions; context engineering manages the whole payload — system rules, retrieved knowledge, tool schemas, conversation history and tool output. The core moves are: retrieve instead of dumping, summarise before re-injecting, cache stable prefixes, and cut anything that hasn't changed a decision. Most agent quality and cost problems are context problems. In practice: Replacing a 30k-token document dump with 6 retrieved chunks improved answer accuracy and cut cost per call by 85%.
Definition
Prompt engineering writes instructions; context engineering manages the whole payload — system rules, retrieved knowledge, tool schemas, conversation history and tool output. The core moves are: retrieve instead of dumping, summarise before re-injecting, cache stable prefixes, and cut anything that hasn't changed a decision. Most agent quality and cost problems are context problems.
Example
Replacing a 30k-token document dump with 6 retrieved chunks improved answer accuracy and cut cost per call by 85%.
Related Workflows
Related Tool Stacks
Related Prompts

/ frequently asked

What is Context Engineering?

Prompt engineering writes instructions; context engineering manages the whole payload — system rules, retrieved knowledge, tool schemas, conversation history and tool output. The core moves are: retrieve instead of dumping, summarise before re-injecting, cache stable prefixes, and cut anything that hasn't changed a decision. Most agent quality and cost problems are context problems.

What is an example of Context Engineering?

Replacing a 30k-token document dump with 6 retrieved chunks improved answer accuracy and cut cost per call by 85%.

Why does Context Engineering matter?

Context engineering is the discipline of deciding exactly what information enters a model's context window, in what order and at what cost.

What should I learn after Context Engineering?

Open the related workflows and prompts further down this page: they show how this idea is applied in a real task, step by step.

/ continue exploring

Related concepts

The vocabulary this page depends on.

  • →AI Software Engineering

    AI software engineering is the practice of building software where agents write most of the code and humans own architecture, review and verification.

  • →MCP Resources

    MCP resources are addressable read-only context — files, records, docs — that a client can pull into the model instead of calling a tool.

  • →MCP (Model Context Protocol)

    Open protocol that lets LLMs connect to tools, data sources and apps through a standard interface.

  • →Context Window

    The maximum amount of text (in tokens) an LLM can consider in a single call.

all dictionary →

Related workflows

Turn this into a repeatable process.

all workflows →

Related tool stacks

The tools that run it in production.

all tool stacks →

Related prompts

Reusable prompts for this job.

all prompts →

Comparisons & alternatives

Pick between the options.

all comparisons →