How to write a good AI prompt

Guide

4 min

read, with 3 worked prompts
  • Plain English

The short answer

To write a good AI prompt, state the task, give the context, set constraints, name the output shape and add a check. Use plain words, one job per prompt, and say what to do when information is missing. Then read the answer, name what's wrong, and fix the prompt instead of starting over.

Prompt Studio rewrite of “The five-part formula, fill-in version”, scored 75 of 100, up from 40
Prompt Studio's Improve mode takes “The five-part formula, fill-in version” from 40 to 75 out of 100: the rewrite keeps the prompt's own wording, gives each part a heading and adds a role, an output format, an example and a checklist, and you'll still fill in its task, context, constraints and shape blanks before it's ready to paste.

What are the five parts of a good AI prompt?

The five parts of a good AI prompt are the task, the context, the constraints, the output shape and a check step, written in that order. The order matters: the job comes first so the model reads every later line in its light. Here's one example line per part:

Formula table

What are the five parts of a good AI prompt?
PartAsk yourselfExample
1. TaskWhat's the one job?"Write a product description"
2. ContextWho's it for? What do you already know?"For a shop that sells hand-poured candles"
3. ConstraintsWhat are the limits?"Under 80 words (one short paragraph), no superlatives"
4. Output shapeWhat should it look like?"Headline plus three bullets (one idea each)"
5. CheckHow will you know it's right?"Flag any claim I didn't give you"

The check is the part most tip lists leave out. Asking the model to flag missing facts turns a confident guess into a visible gap you can fill. You won't need all five every time, and that's fine: add the one that matches what went wrong last time.

How do you write a good prompt step by step?

To write a good prompt step by step, start with the one job, add who it's for, set two limits, name the output shape and ask the model to flag missing facts. You can do it by hand in five passes, or hand the task to a prompt generator for any AI model and edit what comes back. An existing prompt that half works goes into the prompt optimizer tool instead: paste the input prompt and you get a rewritten prompt back, part by part.

  1. Job: "Write a product description."
  2. Who it's for: "...for a shop that sells hand-poured candles, read by gift buyers."
  3. Two limits: "Under 80 words, no superlatives."
  4. Shape: "A headline plus three bullets, one idea each."
  5. Check: "Flag any claim I didn't give you, and ask before you guess a scent or a price."

For a job where you aren't sure what to include, the third worked prompt flips the order: the AI interviews you first, then writes once it has the facts.

How do weak and strong prompts compare in ChatGPT, Claude and Gemini?

A weak prompt compares with a strong prompt by missing context and an output shape, and the same strong prompt works in ChatGPT, Claude and Gemini with small layout changes. Each vendor's own guide sets the layout preference; the formula stays put.

Weak / Strong

  • ChatGPT. OpenAI's guide suggests Markdown headers and lists, or Extensible Markup Language (XML) tags, to mark sections. Weak: Help me plan my week. Strong: Plan my working week. Context: I have 12 hours of client work, two deadlines (Wed, Fri) and school pickup at 15:30 on weekdays. Output a day-by-day table with time blocks. Flag any day that's overloaded.
  • Claude. Anthropic recommends XML tags to separate instructions, context and input. Weak: Summarise this report. Strong: wrap the report in <report> tags, then ask for "five bullets for a busy director (each under 20 words, ending with the one decision needed)".
  • Gemini. Google's guidance puts the key constraints and the role at the start, and for long inputs the question at the very end. Weak: Analyse this data. Strong: give the data first, then "Compare Q1 and Q2 revenue by region, name the biggest change, and list two possible causes."

Sources: OpenAI, Anthropic and Google. The second worked prompt lays one task out for each of the three.

Which habits fix most bad AI prompts?

Five habits fix most bad AI prompts: one job per prompt, saying what to do, a way out for missing facts, an example and a rewrite after you read the answer. Here's each one:

  • One job per prompt. A sentence that joins two requests with "and" wants splitting, such as one prompt for the outline and one for the draft.
  • Say what to do, not only what to leave out. "Use plain words" works better than "don't sound clever".
  • Give a way out. "Say so if you don't know" cuts invented answers.
  • Show, don't describe, when the format is odd. One or two examples, such as a sample table row or a JavaScript Object Notation (JSON) record, beat a paragraph of rules.
  • Read the answer, then fix the prompt. That's prompt iteration: read the answer, name the fault (too long, wrong tone, made-up fact), then edit the prompt to change that one thing.

How to write a prompt before and after

The same request, asked two ways. Read the second one slowly. Each line does a job.

BeforeWhat most people type
Write a product description for my candle.
AfterThe rewrite
Write a product description for a hand-poured soy candle (cedar and orange, 40-hour burn, clay jar) sold on a small shop's website. Reader: a gift buyer who hasn't smelled it. Under 80 words, no superlatives, plain words. Output a headline plus three bullets. Don't add any facts I haven't given you, and flag anything you had to assume.

Why it works

Each of the five parts is now present, so the model doesn't have to guess the reader, the length, the shape or the facts.

How to write a prompt examples

The five-part formula, fill-in version

Each field maps to one part of the formula, and the check line forces the model to expose its guesses.

Task: {{task}}

Context: {{context}}

Constraints: {{constraints}}

Output shape: {{shape}}

Check: Before you answer, tell me anything you had to assume. If a fact you need is missing, ask me instead of guessing.

How to use
  1. Copy it with the button above.
  2. Fill the blanks in {{double braces}} with your own details.
  3. Paste it into ChatGPT, Claude or Gemini and send it.
  4. Then follow up: ask for one change at a time.

Before you run “The five-part formula, fill-in version” for the first time, the lesson on how to use AI prompts step by step walks through copying, filling and sending it.

One prompt, laid out for each chatbot

The content is identical, and only the layout changes: headers for ChatGPT, XML tags for Claude, and the task last for Gemini.

Any model

Plan my working week.

My fixed commitments: {{commitments}}
My deadlines: {{deadlines}}
My working hours: {{hours}}

Output a day-by-day table with time blocks. Flag any day that's overloaded and suggest what to move. If something is missing, ask me before planning.

ChatGPT

# Task
Plan my working week.

# Context
- Fixed commitments: {{commitments}}
- Deadlines: {{deadlines}}
- Working hours: {{hours}}

# Output
A day-by-day table with time blocks. Flag any overloaded day and suggest what to move.

# Rule
If something is missing, ask me before planning.

Claude

<task>Plan my working week.</task>
<context>
Fixed commitments: {{commitments}}
Deadlines: {{deadlines}}
Working hours: {{hours}}
</context>
<output>A day-by-day table with time blocks. Flag any overloaded day and suggest what to move.</output>
<rule>If something is missing, ask me before planning.</rule>

Gemini

You plan working weeks for busy freelancers. Output a day-by-day table with time blocks, flag any overloaded day and suggest what to move. If something is missing, ask before planning.

Fixed commitments: {{commitments}}
Deadlines: {{deadlines}}
Working hours: {{hours}}

Plan my working week.

Let the AI interview you before it writes

If you can't fill the formula, the questions pull the missing parts out of you one at a time.

I want to write a good prompt for this job: {{job}}.

Don't write it yet. Ask me up to {{questions}} questions, one at a time, to learn the task, who it's for, the limits, the output shape and how I'll judge the result. After my last answer, write the prompt using the five parts: task, context, constraints, output shape and check. Then show a one-line summary of anything you assumed.

When is the five-part prompt formula worth the time?

The five-part prompt formula is worth the time when the result will be sent, published or reused, and it's fine to skip it while you're exploring. You'll waste effort polishing a prompt you haven't tested, so start loose, see what comes back and add structure as you learn what you want.

A tiny prompt and a good follow-up often beat a long prompt written blind. The word means something different on a school worksheet, and that sense is covered in what a writing prompt means. Pictures follow other rules again (subject, light, lens), and those are the ground of AI image prompt engineering. Don't worry if your first attempt isn't perfect; that's normal.

How to write a prompt FAQ

Still stuck? Build it in Prompt Studio. It'll score each part as you go.

What is an example of a good AI prompt?

An example of a good AI prompt is 'Write a 120-word product description for a handmade mug shop, warm tone, no prices, end with one question', which holds a task, context, limits and a shape. The weak version, 'write about my mugs', leaves the model to guess all four.

How long should an AI prompt be?

An AI prompt should be as long as the facts that change the answer, which is one line for a simple question and a few short blocks for a reusable task. Words that wouldn't change the answer are padding, so cut them.

When should I rewrite an AI prompt instead of replying in the same chat?

Rewrite an AI prompt when the first answer misses the task, and reply in the same chat when it only needs small edits. A fresh prompt drops the wrong turn; a reply keeps what's already right.

Make your own in Prompt Studio

Answer a few questions. The prompt's scored as it's built. It's free, and nothing leaves your browser.