Build choices

Context engineering vs prompt engineering

By Matt Doughty, CEO & Co-Founder of Prefactor ·

TL;DR

Prompt engineering crafts the instructions you write to a model; context engineering manages everything the model sees — instructions, tool descriptions, retrieved documents, conversation history, and the budget that forces trade-offs between them. One is a writing skill; the other is an information-architecture discipline, and agents made the second one mandatory.

DimensionPrompt engineeringContext engineering
Unit of workThe instruction — wording, examples, structureThe window — what gets in, in what order, at what cost
ScopeText you authorEverything assembled at runtime, much of it authored by others
EraSingle calls and chat turnsAgent loops with tools, retrieval, and history
Key failureVague instruction, weak examplesRight instruction drowned by noise, stale history, token overflow
Core skillWriting and testingSelection, ordering, compression, budgeting
Security relevanceInstructions can be argued withEvery context source is an injection path to manage

The verdict

Treat prompt engineering as a subset that you still need — the instruction layer of a context you now have to engineer whole. For a single chat call, prompt work is most of the job. The moment a system retrieves documents, holds tools, or carries history across steps, the highest-yield work moves: a perfect instruction loses to a window cluttered with stale steps and unranked retrievals, and tool descriptions quietly steer behaviour more than your prose does. Budget your effort accordingly — instructions get you the first mile, but production agents live or die on what else you let into the window, in what order, and [what you refuse to trust once it is there](/guides/secure-agentic-ai).

Frequently asked questions

Is context engineering replacing prompt engineering?

Absorbing, not replacing. The writing skills transfer intact — clarity, examples, structure — but they become one input among several. The new work is editorial: deciding what earns space in a finite window when tools, history, and retrieval all compete for it.

Is your organisation ready for AI agents?

Take the assessment →