---
title: "How to write a good AI prompt: a step-by-step guide"
canonical_url: "https://tryiro.com/blog/how-to-write-a-prompt"
site: "Iro AI"
site_url: "https://tryiro.com"
app_store: "https://apps.apple.com/app/id6759628066"
language: en-US
keywords: ["how to write a prompt", "how to write a good AI prompt", "how to write ChatGPT prompts", "prompt writing guide", "how to prompt AI"]
date_published: "2026-06-05"
date_modified: "2026-06-05"
reading_time_minutes: 7
author: "Alex Furukawa"
license: "© 2026 Iro AI"
canonical_llm_reference: "https://tryiro.com/llms-full.txt"
pillar: "prompt-engineering"
---

# 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.

**Canonical:** https://tryiro.com/blog/how-to-write-a-prompt
**Published:** 2026-06-05
**Reading time:** ~7 min
**Author:** Alex Furukawa — Founder of Iro AI

## Key takeaways

- A good prompt has four parts: context (background), role (who the AI should act as), task (what to do), and format (how you want the answer).
- The biggest upgrade to a weak answer is usually more context and a specific format — not a 'magic' phrase.
- Treat the first answer as a draft and refine it; iteration is part of prompting.
- The same recipe works across ChatGPT, Claude, Gemini, and Perplexity.

## 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

- **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."_
- **Role** — who the AI should act as: _"You are an experienced customer-success manager."_
- **Task** — the specific thing to do: _"Write a 3-sentence reply that asks for a new date without blaming them."_
- **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](/blog/what-is-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](/blog/prompt-engineering-patterns).

## 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](/blog/why-your-ai-prompts-arent-working), and practice hands-on in the [Prompt Lab](/prompt-engineering-app).

## 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.

## Read next

- [The 7 prompt patterns that work everywhere](https://tryiro.com/blog/prompt-engineering-patterns)
- [15 ChatGPT prompts for beginners](https://tryiro.com/blog/chatgpt-prompts-for-beginners)
- [Why your AI prompts aren't working](https://tryiro.com/blog/why-your-ai-prompts-arent-working)
- [Take the free AI IQ test](https://tryiro.com/quiz)

## About the author

Alex Furukawa — Founder of Iro AI. Alex Furukawa is the founder of Iro AI, the gamified app for learning to use AI well. He writes about practical AI fluency — prompting, AI tools, and the daily habits that turn AI from a novelty into real leverage.
