Prompt engineering

Definition
The craft of phrasing an instruction to a model so it reliably produces what you actually want.

Why it matters

Models do what the words say, not what the writer meant. A vague request gets a generic answer, and the person then spends longer editing than it took to ask properly. A clear prompt is also repeatable. Once one works, it can be saved and reused by a whole team. That is the first step towards putting a task in a workflow that runs without being retyped.

How to apply it

  1. State the goal and who the output is for.
  2. Give the facts the model cannot know, such as pricing, tone rules or the customer's situation.
  3. Specify the format: a five-row table, three bullet points, 150 words.
  4. Add one or two examples of good output.
  5. For hard tasks, ask for the reasoning steps before the final answer.
  6. Test on several cases, not one, then adjust wording based on where it fails.

What it is

A prompt is the text given to a model. Prompt engineering is the habit of writing it deliberately. A good prompt usually covers five things: the task, the background the model needs, the role or audience, the format of the answer and an example of what good looks like.

Compare "write some cold emails" with "write three cold emails to operations managers at logistics firms, under 90 words each, one clear question per email, in the tone of the example below". The model is the same. The second gets a usable draft.

Common mistakes

  • Piling on instructions that contradict each other.
  • Skipping the background and expecting the model to guess it.
  • Trusting the first answer on factual questions. Models can produce hallucinations, so check claims that matter.
Worked example

Suppose a marketing manager asks a model for three cold emails. The result is three generic messages, and each needs a rewrite. She restates the request as three emails to operations managers at logistics firms, under 90 words each, one clear question per email, in the tone of an example she pastes in. She tests it on five target lists rather than one. The first run used the same opening line in every email, so she adds an instruction to vary the first line and avoid the word "quick". After four rounds the drafts need about a minute of editing, down from twenty. The working version is saved as a note, so a colleague can start from it in Claude rather than from scratch.

Tools in the example

Some links are affiliate links: we may earn a commission at no cost to you. It never decides a ranking. How we work with partners

  1. Article

    Context engineering

    Deciding what the model sees, which now matters as much as the wording.

  2. Article

    System prompt

    The standing instruction behind every reply.

  3. Article

    Hallucination

    A failure that unclear prompts make more likely.

Where it shows up

  • Writing copy that feels like conversation instead of marketing. How to sound like yourself.
    12 chapters