Prompt engineering rewrites the instruction string; context engineering decides what evidence, memory, and tool output gets injected alongside it on each turn.
Imagine teaching a smart intern to answer customer emails. Prompt engineering is rewriting the sticky note on their monitor that says 'always be polite and cite a policy.' Context engineering is deciding which customer file lands on their desk, which past emails sit in the folder beside them, and which lookup tools they can reach. The sticky note guides how they respond. The materials around them decide what they actually have to work with. A great sticky note and an empty desk still produce a poor answer. A short sticky note and the right materials produce a great one. The discipline that picks and arranges the materials is context engineering.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 to 4 min: define both disciplines, show the surrounding vs instruction test, walk through why the distinction matters in 2026 apps.
Real products, models, and research that use this idea.
- A RAG app where the system prompt is locked, but the retrieval pipeline tunes top-k, reranks with Cohere Rerank 3, and trims chunks, pure context engineering with no prompt-engineering changes.
- A LangGraph agent whose persona system message is byte-stable across runs, while the rolling summary and tool-result slots vary each iteration.
- Cursor's editor agent which uses the same base system prompt but composes different file contents, recent edits, and lint output into the context per task.
- Notion AI's writing assistant injects user-specific style memory and selected document text into a fixed instruction template per request.
- A customer-support bot where the legal team owns the system prompt (prompt engineering) and the platform team owns retrieval, memory, and tool wiring (context engineering).
What an interviewer would ask next. Try answering before peeking at the approach.
QWhere does few-shot example *selection* fall, prompt engineering or context engineering?
QIs choosing the model itself (Opus vs Sonnet vs Haiku) prompt or context engineering?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating every change to the prompt as context engineering. Editing the instruction string is prompt engineering; arranging what surrounds the instruction is context engineering.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.