Most advice on writing AI prompts stops at two words: "be specific." That's true, but it's not enough. The people who get genuinely useful output from ChatGPT, Claude, or Gemini aren't using secret magic words — they've learned to structure a request and, just as importantly, to read a bad answer and fix it.

This guide teaches both. You'll get a simple framework, real before/after rewrites, a method for diagnosing why a prompt failed, a gallery of copy-paste templates, and a short cheat sheet for how prompting differs across today's models. No fluff, no fake statistics — just what reliably works.

What a prompt actually is

A prompt is just the instruction you give an AI. "Prompting" and "prompt engineering" overlap: prompting is writing the instruction; prompt engineering is the systematic version — designing, testing, and refining prompts until they produce reliable results. You don't need to be an engineer to write good prompts. You need a repeatable method.

The core idea behind every technique below: a good prompt removes the model's need to guess. When you leave gaps, the model fills them with the blandest, most generic answer that fits — and sometimes with confident nonsense. Your job is to close the gaps.

The anatomy of a prompt that works

A useful way to remember the ingredients is Persona · Task · Context · Format. Treat this as a popular mnemonic, not an official standard — the value is in the checklist, not the acronym. Microsoft frames the same idea for everyday users of Copilot as four parts: a Goal, Context, Expectations (format), and a Source, with a clear goal being the only truly required piece.

  • Persona — who the AI should act as (sets tone, vocabulary, and scope).
  • Task — exactly what you want done, and what "done" looks like.
  • Context — the background and any source material the model can't infer.
  • Format — the shape of the output: length, structure, table, JSON, bullets.

You won't need all four every time. For a quick question, the Task alone is fine. When accuracy and tone matter, the more of these you supply, the better.

The five core moves

These five techniques are endorsed, in one form or another, by OpenAI, Anthropic, Google, and Microsoft.

  1. Write clear, specific instructions. State the task, the audience, and the outcome. Instead of "Summarize this article," try "Summarize this article in three bullets for a non-technical executive, focusing only on cost implications."
  2. Supply context and reference text. Paste the source material and tell the model to use it. This is the simplest form of grounding, and it's the single best way to cut down on made-up answers.
  3. Assign a role. A persona steers tone, vocabulary, and scope — for example, "You are a senior tax accountant explaining to a small-business owner." (Worth noting: a role mainly shapes how the model answers; the evidence that it reliably boosts factual accuracy is mixed, so don't rely on it for correctness.)
  4. Specify the output format, and use delimiters. Ask for a table, a word count, JSON, or three bullets. Wrap source text in delimiters — XML-style tags like <text>...</text> or Markdown headings — so the model can tell your instructions apart from your data.
  5. Give examples (few-shot). When you have a specific format or tone in mind, show two or three input → output pairs. Few-shot prompting is one of the most reliable ways to lock in a consistent style.

Eight before/after rewrites

Each rewrite below is tagged with the failure mode it fixes — that's the skill that matters most.

Vague ask → specific ask

Before: Give me a summary of this customer support chat.
After:  Summarize the following support chat in three bullets:
        (1) the issue, (2) the customer's sentiment, (3) the resolution.
        Use clear, concise language.

No structure → defined format

Before: Write an email.
After:  Write a 5-sentence email to a new SaaS trial user. Include 2-3
        bullets on key features and end with a clear call-to-action to
        book a demo. Friendly, professional tone.

Ungrounded + negative phrasing → grounded with an escape hatch

Before: Explain our refund policy. Don't make stuff up.
After:  You are a support specialist. Using ONLY the policy text below,
        answer the customer's question in 2-3 plain sentences. If the
        answer is not in the text, reply: "I don't have that information."

        Policy text: <paste>
        Question: <paste>

Unscoped summary → audience + focus + limits

Before: Summarize this article.
After:  Summarize the article inside <article>...</article> in 3 bullets
        for a non-technical executive, focusing only on cost. Keep each
        bullet under 20 words.

Overloaded prompt → split into a chain

Before: Analyze these 200 reviews and write a report.
After:  Step 1: From the reviews in <reviews>...</reviews>, list the
        recurring themes. (Then, in follow-ups: Step 2 — count sentiment
        per theme; Step 3 — draft a one-page report from those results.)

No examples → few-shot

Before: Classify the sentiment of this review.
After:  Classify sentiment as Positive, Negative, or Neutral.
        "Loved it, works perfectly" -> Positive
        "Total waste of money" -> Negative
        "It's fine, nothing special" -> Neutral
        Now classify: "<new review>"

No role or context → persona + situation + structure

Before: Write a job ad for a developer.
After:  You are a technical recruiter. Write a job ad for a mid-level
        backend Python developer at a 30-person fintech startup. Plain,
        energetic language. Structure: 2-sentence intro, "What you'll do"
        (4 bullets), "What we're looking for" (4 bullets), closing CTA.

Undefined extraction → explicit schema

Before: Extract the data from this text.
After:  From the text in <text>...</text>, extract every company and
        return a JSON array of objects with keys: company_name, location,
        funding_stage. Use null for missing fields. Return only the JSON.

The real skill: diagnosing a bad answer

This is where most guides go quiet. When an answer disappoints, don't just retype the prompt — name the failure mode and apply the matching fix.

What you seeLikely causeThe fix
Generic, bland, "could be about anything"Ambiguity / under-specifiedAdd the audience, purpose, and what "done" looks like
Confidently wrong about your situationMissing contextPaste the source material; tell it to use only that
Right content, wrong shapeNo format specifiedState length, structure, and give a delimiter or example
Invented facts, fake citationsHallucinationGround it, add an "I don't know" escape hatch, ask for sources
Stale or "I can't access that"Knowledge cutoff / no live accessSupply the current data yourself; don't assume it knows
Drops part of a multi-part requestOverloaded promptSplit into a chain — one job per step

Run the loop: write it, read what came back, name the failure, apply the fix, re-run. Two or three iterations beats hunting for one perfect prompt.

How to stop the AI from making things up

Hallucination is the failure that costs people the most trust. Prompting can't eliminate it, but a few tactics meaningfully reduce it:

  • Supply reference text and constrain to it: "Answer only from the document above."
  • Give an explicit escape hatch: "If the answer isn't in the text, say I don't know — do not guess."
  • Ask for sources or quotes: make the model point to the part of your source it used.
  • Ask it to check its own answer against the source before finalizing.
  • Then verify anything that matters yourself. Grounding lowers the risk; it doesn't remove your responsibility.

Advanced moves when the basics aren't enough

  • Few-shot examples for stubborn formatting or tone.
  • Chain-of-thought ("think step by step") for multi-step or logic problems — but only on standard chat models. Dedicated reasoning ("thinking") models, such as OpenAI's o-series and Gemini's reasoning modes, already reason internally; adding "think step by step" there is unnecessary and can even hurt.
  • Prompt chaining: break a complex job into a sequence of smaller prompts, each feeding the next. It lowers the load per step and makes each step verifiable.

If you want to go beyond single answers and have AI carry out multi-step work on your behalf, that's a different tool — see our explainer on what AI agents actually are.

2026 model cheat sheet

A strong base prompt — clear task, context, role, format — transfers across all the major assistants. But they aren't identical, so a little per-model tuning pays off.

ModelTends to preferWatch out for
ChatGPT / GPTExplicit structure and schemas; delimitersWill follow strict formats well — so be precise about them
ClaudeClear instructions; tolerates open-ended formats; likes XML tagsTell it what to do rather than what not to do
GeminiClear framing and a stated source; sensible defaultsNewer versions can default to terse output — ask for elaboration

Two cross-model notes for 2026: newer models often default to shorter answers, so request depth or a persona explicitly; and on reasoning models, skip "think step by step" — they handle that internally.

Copy-paste templates by task

Fill in the blanks. Save the ones that work as your personal library.

Email
You are [role]. Write a [length] email to [recipient] about [topic].
Goal: [what should happen next]. Tone: [tone]. Include [must-haves].
End with a clear call-to-action to [action].
Summary
Summarize the text in <text>...</text> for [audience], focusing on
[angle]. Format: [N bullets / one paragraph]. Keep it under [N] words.
Do not add information that isn't in the text.
Data extraction
From <text>...</text>, extract [fields] and return a JSON array of
objects with keys: [key1, key2, key3]. Use null for missing values.
Return only the JSON, no commentary.
Research brief
You are a research assistant. Using ONLY the sources in <sources>...,
write a [length] brief on [question]. Structure: key findings (bullets),
caveats, and open questions. If a claim isn't in the sources, leave it
out. Note where each finding comes from.
Code help
You are a senior [language] developer. Goal: [what the code should do].
Constraints: [framework/version/style]. Show the code, then a 2-line
explanation. If anything is ambiguous, ask before assuming.

Prompting is also one of the most accessible ways to get real value out of AI without writing any code — a theme we cover in when no-code is the right call.

Myths and time-wasters

  • "Please" and "thank you" make answers better. There's no reliable evidence that politeness meaningfully improves output quality, and the extra words add a little compute cost. Be polite if you like — just don't expect better answers from it.
  • Longer is always better. No. Make a prompt as long as it needs to be to remove ambiguity, and no longer. Padding dilutes the instruction.
  • There's one perfect prompt. Rarely. Treat the first answer as a draft and refine.

Iterate like an engineer

For anything you'll do more than once, keep three to five sample inputs with the output you'd want, and re-run them whenever you change the prompt. That habit catches regressions and turns a lucky one-off into a reliable, reusable tool.

FAQ

How long should an AI prompt be? As long as it needs to be to remove ambiguity, and no longer. A one-liner is fine for simple tasks; if accuracy matters, add the role, context, source, and exact format. The test: could a smart stranger produce what you want from the same prompt?

Do prompts work the same across ChatGPT, Claude, and Gemini? Not exactly. A solid base prompt transfers well, but the models parse instructions and prefer formats a little differently, so model-specific tuning gives better results. Write one strong base prompt, then adjust per model.

How do I stop AI from hallucinating? Ground it and give it an out: paste the source, tell it to answer only from that text, and add "if it's not in the text, say I don't know." Ask it to cite what it used — then verify important facts yourself.

Should I add "think step by step" to my prompts? On standard chat models, it can improve accuracy on multi-step problems. On dedicated reasoning models, it's unnecessary and discouraged — they reason internally, so it just adds cost and latency.

What is prompt chaining? Breaking a complex job into a sequence of smaller prompts, where each step's output feeds the next — instead of cramming everything into one prompt. It reduces errors on multi-part tasks and makes each step checkable.

Can I reuse prompts as templates? Yes — one of the highest-leverage habits. Once a prompt reliably works, save it with fill-in-the-blank slots and build a small library by task type.

The takeaway

Good prompting isn't about magic words. It's a short, repeatable loop: structure the request, read the result, name what went wrong, and fix it. Keep this starter checklist handy:

  • Say who the AI should be and what you want.
  • Give it the context and source it can't guess.
  • State the format — length, structure, example.
  • Ground anything factual and allow "I don't know."
  • Iterate — the first answer is a draft.
  • Verify what matters.

Do that, and you'll get more out of any AI assistant than 90% of people typing one-line questions into the same box.