Technology

How to Write AI Prompts That Actually Work

Editor5 min read

A good AI prompt does four things: it states the task and what a good answer looks like, gives the model the context it needs, shows an example or two, and asks for a specific output format. Weak prompts get weak answers — not because the model is dumb, but because it is guessing at what you actually wanted. Learning to write a good prompt is mostly learning to stop making it guess.

Key takeaways

  • Treat a prompt like a spec: the more of the important decisions you make explicitly, the fewer the model makes for you.
  • Be clear and direct about the task, the audience, and the constraints.
  • Show, don't tell — examples steer output more reliably than adjectives.
  • Ask for a specific output format, and iterate on the first draft instead of expecting one perfect shot.

Why do most prompts get mediocre answers?

The usual problem is not the model — it is an underspecified request. "Write me a blog intro" leaves a dozen decisions to chance: the angle, the length, the tone, the audience, the format. The model fills those gaps with the blandest average of everything it has seen, which is exactly the generic, could-be-anyone output people complain about.

A prompt is a specification. Every decision you leave out is one the model has to make for you, and it will default to the safe middle. The single idea behind nearly every prompting technique — roles, examples, output formats, step-by-step instructions — is the same: reduce ambiguity about the task and about what a good answer looks like.

Be clear and direct about the task

State the objective, the audience, and the constraints in plain language. Anthropic's very first prompting guideline is, literally, be clear and direct: tell the model exactly what you want, including scope and success criteria.

"Summarize this" is a coin flip. "Summarize this report in three bullet points for a busy executive who has not read it, and lead with the decision they need to make" is a brief. The second version names the audience, the length, the format, and the goal — so the model is aiming at a target instead of a fog. If you would not hand the instruction to a new freelancer and expect the right result, it is not clear enough for the model either.

Show the model what you want, don't just describe it

Examples steer output far more reliably than adjectives. If you want a particular tone or structure, one concrete example is worth a paragraph of description. This is often called few-shot or "multishot" prompting, and Anthropic's prompt engineering guidance recommends including a few diverse, relevant examples and wrapping them in tags so the model can tell your examples apart from your instructions.

A simple structure looks like this:

Rewrite each support reply to be warmer but still concise.

<example>
Input: "Ticket closed. Issue was user error."
Output: "Thanks for your patience — this one came down to a settings mix-up on the account, which we've now sorted. You're all set."
</example>

Now rewrite this one:
[your text here]

Three to five examples that cover a bit of variety will lock in a format better than any amount of "make it friendly and professional."

Give the model a role and the context it needs

Tell the model who it is and what it is working from. A role ("You are a copy editor for a technology magazine") sets the vocabulary and standards. Context — the source document, the brand's style rules, the constraints — gives it the raw material. Wrap long reference material in tags or clear headers so the model knows what is instruction and what is input.

Missing context is the quiet cause of a lot of "the AI made something up." The model cannot use what you did not give it, so it fills the hole with a plausible guess. If accuracy matters, paste the real source and tell the model to answer only from what you provided.

Ask for a specific output format

Decide the shape of the answer and say so: three bullets, a five-row table, strict JSON, a 60-word paragraph, headings in a fixed order. Format instructions do double duty — they make the output usable, and they force you to clarify what "done" means.

If you plan to use the output in code or a spreadsheet, give a template and ask the model to return only the filled template with no preamble. Small formatting requests remove most of the "now I have to clean this up by hand" tax.

A before-and-after you can copy

The difference is almost never subtle:

Weak prompt Stronger prompt
"Write a product description for my running shoes." "Write a 55-word product description for a lightweight trail-running shoe aimed at ultramarathoners. Emphasize grip and water drainage. Confident, plain tone — no words like 'revolutionary' or 'game-changer'. Return only the paragraph."
"Give me ideas for my newsletter." "Suggest 8 newsletter topics for an audience of early-career UX designers. For each, give a one-line hook and the reader problem it solves. Skip anything generic like 'design trends'."

Notice what the stronger prompts add: audience, length, tone, an explicit exclusion, and the exact output. None of it is clever. It is just refusing to make the model guess.

When the first answer still isn't right, iterate

Treat the first response as a draft, not a verdict. Instead of starting over, tell the model precisely what to change: "Good structure — now cut it to half the length, drop the second example, and make the opening a question." Specific, surgical feedback gets you there faster than a vague "make it better."

For genuinely complex tasks, break the work into steps rather than demanding everything at once. Ask the model to outline first, approve the outline, then write. Chaining a big task into smaller, checkable steps beats one heroic prompt almost every time — and it makes it obvious where things went wrong when they do.

Make prompting part of your workflow

The people who get the most from AI are not the ones with secret magic words; they are the ones who save their good prompts, reuse them, and refine them over time. A prompt that works is an asset. Keep a file of the ones that reliably produce what you need, the same way you would keep any system that makes your work more repeatable.

If you want to go deeper, the Technology section and the AI tag collect more on working well with these tools. But the fundamentals rarely change: say what you want, show an example, name the format, and iterate. Do that and the model stops guessing — which is the whole game.

FAQ

Frequently asked questions

How many examples should I put in a prompt?

Three to five is a sensible default. Anthropic's guidance recommends a few diverse, relevant examples — enough to show the pattern you want without the model over-fitting to one case. If the output format is simple, one good example often does the job.

Do these prompting tips work for ChatGPT and Gemini too?

Yes. The underlying idea — reduce ambiguity about the task and the output — is model-agnostic. State the task clearly, give context and examples, and specify the format, and you will get better results from almost any capable model.

What is the difference between a prompt and prompt engineering?

A prompt is the instruction you give the model. Prompt engineering is the practice of writing and refining prompts systematically — testing variations, adding examples, and structuring the request — so the output is reliable rather than lucky.

B

Written by

BlogsPublication Admin

Editor

BlogsPublication reporting is guided by our editorial standards.

The newsletter

Good writing, once a week.

Our best essays and reporting, delivered to your inbox. No noise, unsubscribe anytime.

Comments

Sign in to join the discussion.

Loading comments…

Keep reading