Subscribe free
Sample edition.These stories, sponsors and partners are placeholders for design and testing, not news. Live editions come from the curation pipeline and are signed off by an editor.
Guide4 min readUpdated 07:02

How to write a prompt that works first time

Say who it’s for, what you want, what to include and how long. Four parts, every time.

Give the model a role, the context, an example of good output and a format. Then iterate on the result, not the prompt.

Treat prompts as code: structure them, version them and test them against cases.

Same story, three depths. Switch at any time.

Most disappointing AI answers come from short, vague requests. Add four things and the answer gets much better.

Who it’s for: “for my 80-year-old dad”. What you want: “a step-by-step guide to video-calling”. What to include: “WhatsApp on an iPhone, big clear steps”. How long: “no more than six steps”. That extra is what turns a generic answer into a useful one.

Good prompts carry : the audience, the goal, what you already have and the constraints. Add an example of output you like, and say the format you want back: a table, bullets or an email.

Then iterate in conversation: “shorter”, “more formal”, “add a line about pricing”. When a prompt works, save it. A small library of proven prompts is worth more than any trick.

Structure prompts with clear sections: instructions, documents, examples and the output contract. Ask for structured output when another program will read it, and validate it.

Version prompts alongside your code, keep a small test set of inputs with expected properties, and re-run it when you change the prompt or the model. Most regressions come from small wording changes nobody tested.

Try it yourself 2 minutes

  1. Think of something you asked an AI recently.
  2. Rewrite it with who, what, include and length.
  3. Compare the new answer with the old one.

Try it yourself 2 minutes

  1. Find an email you wrote that you’re proud of.
  2. Ask the AI to write a new one ‘in the style of this example’.
  3. Save the prompt if it works.

Try it yourself 2 minutes

  1. Split one prompt into instructions, context and examples.
  2. Write three test inputs with the properties you expect.
  3. Re-run them after your next change.

Spotted a mistake? Tell us and an editor will check it.

More from Unjargoned