
How to Write AI Prompts: A Beginner’s Guide With Examples
A good AI prompt is not a magic phrase. It is a clear handoff, the kind you would give a smart new colleague who knows nothing about your project: what you want, why, what to use, and what the result should look like.
This guide gives you a simple four-part structure that works across ChatGPT, Claude, Gemini and most other assistants, shows before-and-after examples, covers image prompts, and ends with a template you can copy. If you write prompts for coding tools specifically, pair it with our prompt tips for coding agents.
The four parts of a good prompt
Most weak prompts are missing the same things: who it is for, what format is needed, and what “good” means. Official guidance from OpenAI and Anthropic says much the same: be clear and explicit, give the context that matters, and describe the result you want. In practice that comes down to four parts:
- Goal: what you want made or done. “Write a 120-word reply to this customer” beats “help with this email”.
- Context: the facts the AI cannot guess. Who the audience is, what happened, the source text, your notes.
- Output: format, length, tone, structure. “A table with three columns”, “five bullet points”, “plain, friendly English”.
- Limits: what must not change or happen. “Keep the prices exactly as written”, “use only the notes below and say if something is missing”, “do not invent quotes”.
You do not need all four every time. A quick question can be one line. For anything you will publish, send or rely on, the four parts save several rounds of fixing.
Before and after examples
Before: “Write an email about the delay.”
After: “Write a short email to customers who ordered the blue backpack. Their delivery is delayed by about a week because of a supplier issue. Tone: calm and apologetic, no excuses. Include the new expected week and a link placeholder for tracking. Under 120 words. Do not offer a discount.”
Summary
Before: “Summarise this.”
After: “Summarise the meeting notes below for a manager who was not there. Put decisions first, then action items with an owner for each. Bullet points, under 150 words. If an action item has no owner, write ‘owner missing’ instead of guessing.”
Learning
Before: “Explain machine learning.”
After: “Explain machine learning to a first-year commerce student in India. Use one everyday example, avoid maths, and end with three questions I can answer to check I understood.” Students can find more ideas in our free AI tools for students guide.
Habits that improve results
- One deliverable per prompt. Asking for ten things at once gets you ten thin answers. Split big jobs into a sequence.
- Show an example. Paste a sample of the style or format you like and say “match this”. One good example often does more than a paragraph of description.
- Let it ask first. For bigger tasks, end with “Before you start, ask me up to three questions if anything important is unclear.”
- Ask for a plan. “Outline your approach in five bullets, then wait” lets you correct the direction before it writes 1,000 words.
- Iterate, do not restart. Treat the first answer as a draft: “Make the opening more direct”, “cut this by a third”, “turn section two into a table”.
- Use structure for long prompts. Simple headings such as
# Context,# Taskand# Rulesmake long prompts easier for you and the model to follow. - Start a fresh chat when a conversation gets long and confused; paste in only what still matters.
How to write image prompts
Image generators respond to visual detail rather than instructions about tone. A reliable order is:
- Subject: who or what, doing what. “A small robot watering a plant”.
- Setting: where. “On a sunny balcony in a city apartment”.
- Style: photo, illustration, 3D render, watercolour, flat vector.
- Light and colour: “soft morning light, pastel colours”.
- Composition: close-up, wide shot, top-down, aspect ratio such as 16:9.
- Exclusions: “no text, no logos” if your tool supports them.
Change one thing at a time between attempts so you learn what each word does. Check each tool’s rules on commercial use before using images in a product; our free tier checklist lists what to look for. You can practise with the image tools in the AI Playground without signing up, and compare generators in our AI image generators guide.
Check the answer before you use it
Even a perfect prompt does not guarantee a correct answer. Language models predict likely text, and likely is not always true; what is an LLM explains why. Before you rely on a result:
- Verify names, numbers, dates, prices and quotes against an original source.
- Ask “Which parts of your answer are you least sure about?” and check those first.
- For questions about your own documents, give the AI the documents, or use a tool built on RAG, instead of trusting its memory.
- Read anything customer-facing yourself before it goes out.
A reusable prompt template
# Goal
[What you want made or done, in one sentence.]
# Context
[Audience, background, and any source text or notes.]
# Output
[Format, length, tone, structure. Paste an example if you have one.]
# Limits
[What must not change, what to avoid, and: "If information is missing, say so instead of guessing."]
Before you start, ask me up to three questions if anything important is unclear.
Save it somewhere handy and fill it in for any task that matters. When you are ready to choose an assistant to use it with, browse AI chatbots or read our best AI chatbots roundup, and compare the ones on your short list. If your team needs prompts built into a repeatable business workflow, Contact Here on the homepage.
FAQ
What is prompt engineering?
Prompt engineering is the practice of writing and refining instructions so an AI model gives useful, reliable results. For everyday use it mostly means being clear about the goal, context, format and limits.
Do the same prompts work in ChatGPT, Claude and Gemini?
The same principles work across them. Results differ between models, so test an important prompt in the tool you will actually use and adjust from there.
How long should a prompt be?
As long as it needs to be. A quick question can be one line; a task you will publish or send may need several short paragraphs of context and rules.
Should I use role prompts like “act as an expert”?
A role can help set tone and focus, but it does not add knowledge the model lacks. Clear context and examples usually matter more than the role line.
Why does the AI ignore part of my prompt?
Usually the prompt asks for too many things at once, or the instructions conflict. Split the task, put the most important rule near the end, and check for contradictions.