Every guide lists its sources, tips, and warnings. Read our editorial policy.

How to Write Effective AI Prompts (Step by Step)

A guide to Phase 1 — Define the Task Before You Type, Phase 2 — Add Context, Limits and Examples, Phase 3 — Specify the Output and Behaviour, Phase 4 — Test, Fix and Reuse

Download checklist (PDF)
Interactive Step Checklist0 of 28 steps completed (0%)

Most disappointing AI answers come from vague instructions, not weak models. This guide turns a loose request into a precise prompt in 28 concrete steps, covering the role, the context, the constraints, one good example and the exact output format. We test small and change one variable at a time, so you learn which words actually moved the result instead of guessing. Work through it once and you will leave with a short library of reusable prompts rather than an empty text box every time you sit down. Browse all illustrated guides or the Artificial Intelligence category for more illustrated walkthroughs on Howcompass.

How do you write Effective AI Prompts (Step by Step)?

Overview: How to Write Effective AI Prompts (Step by Step)Howcompass | How to Write Effective AI Prompts (Step by Step)
Method1

Phase 1 — Define the Task Before You Type

Step 1: a card with one sentence describing a desired resultHowcompass

Write the desired result in one sentence

Write the desired result in one sentence. Finish this: 'I want a _ that _ for ___.' A sentence like 'a 200-word email that declines a meeting politely' is checkable; 'help with email' is not. If you cannot state the outcome, the model cannot hit it. For the primary source behind this phase, see Anthropic — AI research and documentation.

Step 2: two model choice tabs on a screen, one highlightedHowcompass

Choose the right model and mode

Choose the right model and mode. Use a fast model for rewriting and sorting, and a reasoning-focused one for analysis, maths or long planning. Match the tool to the job before spending effort on wording.

Step 3: a note naming a task type such as Summarise or ClassifyHowcompass

Name the task type explicitly

Name the task type explicitly. Start with a verb: summarise, classify, compare, draft, critique or extract. Stating the operation stops the model from answering a slightly different question than you intended.

Step 4: a sticky note with an audience label and a tone wordHowcompass

Decide the audience and the voice

Decide the audience and the voice. Say who will read it and how it should sound — 'a busy clinic manager, plain and reassuring'. Audience and tone are among the highest-leverage words you can add, and they are easy to forget.

Step 5: a slip of paper assigning the role of an editorHowcompass

Assign one specific expert role

Assign one specific expert role. Open with 'You are a pediatric nurse educator' rather than 'You are an expert'. A narrow role pulls the right vocabulary and level of detail; a vague one produces generic prose.

Step 6: a short list of things the assigned role should not doHowcompass

State what that role should not do

State what that role should not do. Add a line like 'Do not invent citations or medical advice.' Negative boundaries prevent the most damaging failures, especially where accuracy or safety matters.

Step 7: a single line of scene-setting context on a cardHowcompass

Set the scenario in a single line

Set the scenario in a single line. Give the situation in one sentence: 'I am replying to a client who is unhappy about a delay.' A little context removes dozens of assumptions the model would otherwise fill in on its own. Related on Howcompass: plan a holiday dinner.

Method2

Phase 2 — Add Context, Limits and Examples

Step 8: a folder of source documents beside a text cursorHowcompass

Paste the source material it must use

Paste the source material it must use. Include the actual notes, contract or data between clear markers such as triple quotes. When the answer must be grounded in your material, saying 'use only the text below' is far safer than hoping it remembers. For the primary source behind this phase, see NIST — AI Risk Management Framework.

Step 9: a glossary card defining two specialised termsHowcompass

Define any specialist terms

Define any specialist terms. If a word has a company-specific or technical meaning, spell it out in a short glossary line. Models guess at jargon, and one wrong guess can derail an otherwise sound answer.

Step 10: a checklist of constraints with boxes tickedHowcompass

List the hard constraints

List the hard constraints. Write each limit as its own short line: word count, banned phrases, required terms, date range, reading level. Separate constraints are easier for a model to satisfy than a long sentence packed with conditions.

Step 11: a note reading ask me if a fact is missingHowcompass

Say what to do when a fact is missing

Say what to do when a fact is missing. Add 'If you need a figure I have not given, ask me before continuing.' This turns a silent invention into a visible question, which you can answer in one reply. Browse all illustrated guides or the Artificial Intelligence category for more.

Step 12: one highlighted sample answer on a printed sheetHowcompass

Show one answer you would be happy with

Show one answer you would be happy with. A single real example of the style and depth you want does more than a paragraph of adjectives. Examples set an implicit pattern for structure, tone and detail all at once.

Step 13: a crossed-out example marked do not write like thisHowcompass

Show one answer to avoid

Show one answer to avoid. Include a short counter-example marked 'do not write like this', and name the flaw — too formal, too long, invented numbers. Contrast is a quick way to remove a habit you keep getting back.

Step 14: a bracketed pattern repeated in two example linesHowcompass

Mark the exact pattern to copy

Mark the exact pattern to copy. If the format matters, bracket the repeated structure: '[Date] — [Issue] — [Action]'. Pointing out the pattern tells the model what to reproduce rather than what to merely take inspiration from. Related on Howcompass: change your car's oil.

Method3

Phase 3 — Specify the Output and Behaviour

Step 15: a card specifying JSON as the required outputHowcompass

Name the exact output format

Name the exact output format. Ask for 'a JSON object with keys title, summary and tags' or 'a three-column Markdown table'. A named format is unambiguous and makes the result usable in the next tool without reformatting. For the primary source behind this phase, see Microsoft Learn.

Step 16: a template box with fixed section headings and word countsHowcompass

Set the length and structure

Set the length and structure. Give a word range and the section order: 'under 250 words, with a heading, three bullets and a one-line close.' Both numbers and sequence are checkable, so you can tell at a glance whether it complied.

Step 17: a slider set between brief and detailedHowcompass

Choose the level of detail

Choose the level of detail. Say 'explain it as if to a new hire, with no jargon' or 'give me the technical detail and skip the introduction'. Without this, the model picks a default that often misses your reader.

Step 18: a note requesting a source beside each claimHowcompass

Ask for sources or a short rationale

Ask for sources or a short rationale. Request 'a one-line reason under each recommendation' or 'cite the section of the document you used'. A stated basis makes the answer auditable and easier to trust or challenge.

Step 19: a prompt line ending with ask me clarifying questions firstHowcompass

Ask it to ask clarifying questions first

Ask it to ask clarifying questions first. End with 'Ask me up to three questions before you answer.' For ambiguous tasks this one line prevents a confident answer to the wrong problem and costs you nothing.

Step 20: a draft label and a final label on two stacked documentsHowcompass

Request a draft before the final version

Request a draft before the final version. For longer work, ask for an outline or first draft to approve before it writes the whole piece. Reviewing a skeleton is faster than rewriting three thousand words that went the wrong direction.

Step 21: a note telling the model to flag uncertain claimsHowcompass

Tell it to flag uncertainty

Tell it to flag uncertainty. Add 'Mark anything you are not sure about with [verify].' Honest uncertainty is far more useful than smooth confidence, and it tells you exactly which claims to check elsewhere. Related on Howcompass: plan a holiday dinner.

Method4

Phase 4 — Test, Fix and Reuse

Step 22: a short test prompt typed into a small text boxHowcompass

Run a short test before the real job

Run a short test before the real job. Try the full prompt on one small, representative input first. A two-minute test exposes a missing constraint before you apply it to a hundred records or a document you cannot redo. For the primary source behind this phase, see Mozilla — web and browser resources.

Step 23: a checklist with three success criteria, one untickedHowcompass

Check it against written success criteria

Check it against written success criteria. Judge the output against the outcome, format and constraints you wrote in Phase 1, not a vague feeling. Three explicit checks — correct, complete, right shape — keep the edits objective.

Step 24: two prompt versions differing by one changed wordHowcompass

Change only one variable at a time

Change only one variable at a time. If the result is off, edit a single thing — add one constraint, or swap one example — and rerun. Changing five words at once makes it impossible to know which fix actually worked.

Step 25: a vague adjective circled and replaced with a precise oneHowcompass

Replace the vague word that failed

Replace the vague word that failed. Words like 'good', 'professional' and 'concise' are interpreted differently every time. Swap them for something testable — 'under 120 words' or 'no passive voice' — and the result steadies immediately.

Step 26: a prompt with one added constraint underlinedHowcompass

Add the single missing constraint

Add the single missing constraint. Look at what the output got wrong and turn it into one new line in the prompt. Each corrected failure becomes a permanent guardrail rather than a one-off edit to the answer.

Step 27: a saved template card labelled with its task typeHowcompass

Save the working prompt as a template

Save the working prompt as a template. Copy the version that passed into a note and bracket the parts that change, such as [AUDIENCE] and [SOURCE TEXT]. A saved template turns a twenty-minute puzzle into a two-minute fill-in.

Step 28: a small indexed notebook of reusable promptsHowcompass

Build a small prompt library

Build a small prompt library. Keep templates grouped by task — summaries, emails, extraction, review — with a one-line note on what each is for. After a dozen entries you will reuse good prompts instead of starting from scratch. Related on Howcompass: change your car's oil.

Frequently Asked Questions

Question: Do longer prompts always work better?

No. Length helps only when it adds relevant context, constraints or an example. Padding a prompt with background the model does not need can dilute the important instructions and raise the chance of a missed detail.

Question: Why does the same prompt give different answers?

Generative models sample from possibilities, so identical wording can vary between runs. Reduce drift by pinning down format, adding an example, and keeping a saved copy of the version that produced a good result.

Question: Can a prompt stop the model from inventing facts?

It can help a lot but cannot guarantee it. Supply the source text, say 'use only this material', and ask it to mark uncertain claims as [verify]; then check anything important against a primary source.

Warnings

  • Asking something vague: 'Make this better' gives the model no direction to improve toward. State the outcome, the reader and at least one measurable constraint so there is something concrete to be right or wrong about.
  • Never giving an example: A single sample of the tone and structure you want removes more ambiguity than several paragraphs of description. Add a counter-example too when there is a specific habit you keep needing to correct.
  • Changing everything after a bad answer: Rewriting the whole prompt hides which edit fixed the problem. Change one variable, rerun on the same input, and keep the version that improved the result.

References (4)

  1. Anthropic — AI research and documentationanthropic.com
  2. NIST — AI Risk Management Frameworknist.gov
  3. Microsoft Learnlearn.microsoft.com
  4. Mozilla — web and browser resourcesmozilla.org

Sources are listed so you can read the underlying guidance yourself. Our editorial policy explains how guides are reviewed.

Did this article help you?

0 readers found this helpful — add your vote.

Reader Comments (0)

No comments yet — be the first to share your results.