Pick the activity that belongs to context engineering rather than prompt engineering
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.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
The phrase 'prompt engineering' was coined in the 2022-2023 era when almost all of the input to an LLM was the instruction string. A few years later, retrieval-augmented generation, tool use, and persistent memory became standard, and the instruction shrank to a single-digit percentage of the bytes that actually arrive at the model on a production turn. The rest is composed at runtime.
Context engineering is the name for the discipline that takes that composition seriously. It is broader than prompt engineering and subsumes it: the instruction string is still part of what arrives at the model, but it is no longer the dominant part.
Mental model: prompt engineering writes the recipe. Context engineering builds the kitchen, stocks the pantry, and decides which ingredients hit the counter for this dish.
What prompt engineering covers
The instruction string itself
Prompt engineering is the craft of the instruction string: the system prompt, the user prompt template, the few-shot examples embedded in the prompt, the role description, the formatting choices (paragraphs vs bullets vs XML tags), and the wording of constraints. Anything that changes characters inside the instruction is prompt engineering.
Why it still matters
A well-crafted instruction is still load-bearing. A system prompt that tells the model to cite retrieved chunks by identifier, refuse out of scope questions, and respect output schema constraints is doing real work. A system prompt that says 'be helpful' and nothing else lets the entire context-engineering layer collapse, because the model has no instruction for how to use what is being injected.
What prompt engineering does not cover
Prompt engineering does not cover which chunks the retriever returned, which memory facts the memory store pulled, which tool outputs from the prior step are still relevant, which earlier turns were summarized vs dropped, or which output schema gets attached. All of those decisions happen outside the instruction string and are made by orchestration code, not by editing a prompt template.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
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.
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?
Writing the examples is prompt engineering. Dynamically retrieving the most relevant examples per turn from a bank (similar to RAG over an example set) is context engineering. The act of selection is composition; the act of authoring is instruction craft.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases 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.
60 second bullets to scan on the way to the call.
Definition of prompt engineering as instruction-string craft
Definition of context engineering as runtime composition
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.