Iro AI Blog

How to write a good AI prompt: a step-by-step guide

A good prompt has four parts: context, role, task, and format. Add those, then refine the first answer. Here's the simple recipe, with before-and-after examples you can copy.

By ~7 min readPrompt Engineering

How to write a good AI prompt: a step-by-step guide

How do you write a good AI prompt?

A good prompt gives the AI four things: context, a role, a clear task, and the output format you want. Most weak answers come from skipping these — the model has to guess what you mean. Add them and you'll get sharp, useful results from ChatGPT, Claude, Gemini, or any other tool. Then treat the first answer as a draft and refine it.

The four parts of a great prompt

  1. Context — the background the AI needs: who it's for, what you've tried, any constraints. "I'm emailing a client who missed a deadline; tone should stay warm."
  2. Role — who the AI should act as: "You are an experienced customer-success manager."
  3. Task — the specific thing to do: "Write a 3-sentence reply that asks for a new date without blaming them."
  4. Format — how you want it: length, structure, tone. "Under 80 words, friendly, no jargon."

You won't need all four every time, but the more ambiguous the task, the more they help. This is the heart of prompt engineering.

Before and after: a weak prompt vs a good one

Weak: write a post about our new feature

You'll get something generic, because the AI is guessing the audience, tone, length, and the feature itself.

Good: You are a product marketer. Write a LinkedIn post (under 120 words, confident but not hypey) announcing our new AI feedback feature for our app that helps people learn AI. Audience: busy professionals. End with a question to drive comments.

Same model, dramatically better output — because it now has context, a role, a task, and a format. For more reusable structures, see the 7 prompt patterns that work everywhere.

Practice this, don't just read it.

Iro AI turns ideas like the ones in this post into 5-minute exercises with feedback. Free tier, Pro from $0.96/week ($49.99/year, 7-day free trial).

How to refine the first answer

The first answer is a draft, not the deliverable. Improve it with quick follow-ups:

  • Adjust: "Make it shorter / more formal / more specific."
  • Add an example: show one sample of "good" and ask it to match.
  • Ask for options: "Give me three versions, ranked."
  • Push back: "That intro is generic — try a sharper hook."

Two or three rounds of this beats hunting for a perfect one-shot prompt.

Common prompting mistakes

Being vague. "Make it better" gives the model nothing to aim at — say what "better" means. Skipping context. The AI can't read your mind about audience or constraints. Accepting the first draft. Iterating is where the quality comes from. Chasing magic words. There aren't any — clarity beats tricks. If your prompts keep underperforming, see why your AI prompts aren't working, and practice hands-on in the Prompt Lab.

Practice this, don't just read it.

Iro AI turns ideas like the ones in this post into 5-minute exercises with feedback. Free tier, Pro from $0.96/week ($49.99/year, 7-day free trial).

FAQ

How do you write a good AI prompt?

Give the AI four things: context (the background), a role (who it should act as), a clear task (what to do), and the format you want (length, structure, tone). Then treat the first answer as a draft and refine it with quick follow-ups.

What is the formula for a good prompt?

A reliable formula is Context + Role + Task + Format: tell the AI the situation, who to be, exactly what to do, and how you want the answer. The more ambiguous the task, the more these matter.

Why are my prompts not working?

Usually the prompt is too vague or missing context and a clear format. Add who it's for, the constraints, and exactly what 'good' looks like, then iterate on the first answer instead of starting over.

Does the same prompt work on ChatGPT, Claude, and Gemini?

Mostly yes. The context-role-task-format structure works across all major AI tools. You tune small details per model, but the core recipe transfers.