What Is Context Engineering?
Context engineering is the practice of deciding what information a language model sees for each task, including instructions, code, documents, tool results and history, so that it has the evidence it needs without being overwhelmed by noise.
Also known as:
Context Engineering vs Prompt Engineering
Prompt engineering focuses on how instructions are worded. Context engineering covers everything else that lands in the model's context window: retrieved files, tool output, prior messages and data from other systems. For agents that run many steps, managing that context matters more than any single prompt.
Why More Context Is Not Always Better
Context windows are large, but they are not free. Every extra token costs money and time, and models get worse at recalling specific details as the window fills, an effect often called context rot. Good context engineering aims for the smallest set of high-signal information that lets the model get the answer right.
Common Context Engineering Techniques
- Retrieval on demand. Let the model search for and read what it needs, instead of loading everything up front.
- Summarizing history. Compress long sessions so earlier decisions stay available without their full detail.
- Structured data. Pass findings, ownership and asset data in a consistent format the model can rely on.
- Isolation. Give sub-agents narrow, focused context and return only their conclusions.
Context in Security Work
Whether a vulnerability is real often depends on context outside the flagged line: how input reaches it, which service exposes it, what data it touches and who owns it. A model that sees only 40 lines around a finding has to guess. A model that can explore the repository and asset graph can check.
How Nullify Handles Context
Nullify's triage agents investigate findings from SAST, SCA, secrets and cloud posture with the repository and asset graph in reach, and findings are scored on reachability, exploitability and business context. After moving one screening stage from a fixed code snippet to a model that could read and search the repository itself, Nullify measured 97.5% fewer input tokens and a much faster run. See how Nullify triages findings.
Key Takeaways
- Context engineering decides what a model sees for each task, not just how the prompt is worded.
- More context costs more and can make answers worse.
- Letting a model retrieve what it needs often beats loading everything up front.
- In security, the evidence that a finding is real usually sits outside the flagged line.
Read More About Context Engineering
Triage & Remediation
See Nullify in Action
Nullify gives every investigation the code, cloud and business context it needs.