Skip to content
mentoor

Topic 5 of 5 · 4 min read

Context engineering versus prompt writing

Goal: Explain the difference between prompt writing and context engineering using a case where better wording cannot fix missing context.

Prompt writing is choosing the words of one request. Context engineering is deciding what goes into the whole window, across turns, files, tools and memory, so the model has what it needs to do the job. Good wording cannot replace missing information.

Check yourself · 1 of 3

What best describes context engineering?

Choose one answer

Why it matters

For a single chat question, the prompt is most of the context, so prompt skill is enough. Once you work with long sessions, documents, search tools or agents, the prompt becomes a small part of what the model reads. Anthropic describes context engineering as the work of curating the set of tokens given to the model. Simon Willison and others adopted the term because "prompt" suggests a single short sentence, and that is no longer where most results are won or lost.

The difference

Prompt writing Context engineering
One message The whole window over many turns
Wording, structure, examples Which sources, in what order, how much
You type it Some of it is loaded by tools, memory and retrieval
Fixes unclear requests Fixes missing, stale or noisy information

Prompt writing is still part of the job. It sits inside context engineering.

What a context engineer decides

  1. What goes in. The spec, the right files, the relevant policy, the error log.
  2. What stays out. Old drafts, unrelated files, tool output nobody needs. Less noise gives the model fewer ways to go wrong.
  3. What is loaded when. Load stable rules at the start; fetch detail only when a step needs it.
  4. What is saved and trimmed. Keep a short summary of decisions between sessions, and drop the transcript.
  5. What comes from tools. Which tools exist, and how much output they return.

Before and after

Before: An agent keeps proposing a refund flow that breaks your company's rule that refunds above 500 need approval. You try ten phrasings: "please follow our rules", "be careful about policy". Nothing works.

The rule is not in the window. No wording can make the model apply a rule it cannot see.

After: You add a short policy file to the project with the approval limits and tell the agent to read it for refund work. The first answer follows the rule.

What goes wrong

  • Wording as a cure-all. Polishing sentences while the key fact is absent.
  • Stuffing everything in. More text is not better. Noise and stale items dilute what matters, and long windows cost more.
  • Set and forget. Context drifts. Notes go out of date and sessions grow. It needs upkeep.
  • Ignoring tools. An agent's tool results can fill the window. Limit and shape them.

Examples

Wording cannot fix a missing spec

A support bot answers questions about warranty length wrongly, though the prompt says "be accurate and precise" in three ways. The warranty terms are not in the window. The fix is to retrieve the right terms document for each question and place it before the question. The prompt barely changes.

Trimming noisy tool output

A coding agent runs the full test suite and gets 4,000 lines back, most of it passing tests. The one failing test is lost in the noise. The fix is a tool setting that returns only failures with a few lines of context. The next answer targets the real failure.

Key points

  • Prompt writing shapes one request; context engineering shapes everything the model reads across a session.
  • Wording cannot fix missing information: if the fact is not in the window, the model cannot apply it.
  • Context engineering decides what goes in, what stays out, what loads when, and what is saved or trimmed.
  • More text is not better, because noise and stale items weaken what matters and add cost.
  • Prompt writing is still needed; it is one part of managing the whole window.

Common mistakes

  • Spending time on wording when the real problem is a missing or stale source.
  • Putting everything into the window on the theory that more is safer.
  • Treating notes, memory and project files as written once and finished.
  • Letting tool output grow without limits so it crowds out the task.

Check yourself · 2 of 3

An assistant keeps getting your refund approval rule wrong. The rule is written only in an internal wiki the assistant cannot read, and you have reworded your request ten times. What is the most likely fix?

Choose one answer

Check yourself · 3 of 3

An agent is given its whole project folder for a small bug in one file, and answers get worse. What does context engineering suggest?

Choose one answer

Practice items, not counted towards your mastery.

Start here