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%. This dictionary node is part of the Onexial knowledge graph and links to related concepts, workflows and tools below.
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%.
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 for AI and automation?
Context engineering is the discipline of deciding exactly what information enters a model's context window, in what order and at what cost. It connects to the workflows, prompts and tool stacks linked on this page, so you can move from definition to execution without leaving Onexial.