How to write AI prompts that work (with examples)
Upperhand editorial team
Updated 7 Nov 2026 · Facts checked 7 Nov 2026 · 6 min read

Quick answer
A prompt is the instruction you give an AI tool. Learning how to write AI prompts comes down to four things: a role for the AI to play, the task, the context it needs and the format you want back. Google's prompting guide for Gemini calls these persona, task, context and format. Then refine with follow-ups.
Key takeaways
- A prompt is the instruction you give an AI tool, in plain words.
- Good prompts have four parts: the task, the context, the format and an example.
- Most weak answers come from vague asks, not from the tool.
- The same prompt habits work in ChatGPT, Claude and Gemini.
Below: what prompting means, the four parts with a worked example, before-and-after prompts to copy, and quick fixes for when an answer misses.
What is a prompt?
Merriam-Webster defines a prompt, in artificial intelligence, as "an instruction or a set of criteria provided to an artificial intelligence system that establishes the content it will generate". In practice, it is whatever you type or say to ChatGPT, Claude or Gemini. A few examples:
- "What is the difference between weather and climate?"
- "Rewrite this paragraph so a 12-year-old could follow it: [paste]"
- "Here is our sales data for the year. Which months were weakest, and what changed in them?"
A prompt can be one line or one page. What matters is whether it gives the AI enough to go on.
What does prompting mean?
If you are looking up the meaning of prompting, there are two. In everyday English, to prompt someone is to move them to action, or to help an actor by saying the next words they have forgotten. In AI, prompting means giving instructions to an AI system: writing the request that tells the model what to produce.
You will also hear "prompt engineering". That is the more careful version: writing and testing prompts against clear goals so they give good results reliably. Anthropic, for example, tells developers to define what success looks like and how to test for it before they start. For everyday use, good prompting habits are enough.
The four parts of a prompt that works
Google's prompting guide for Gemini in Workspace (April 2024 edition) names "four main areas to consider when writing an effective prompt". In its words: "You don't need to use all four, but using a few will help!"
- 01Persona: who should the AI be? "You are an experienced recruiter." "Act as a patient maths tutor."
- 02Task: what do you want? Use a clear verb: write, summarise, compare, plan, explain.
- 03Context: what does it need to know? The audience, what you have tried already, what the result is for.
- 04Format: what should it look like? A table, five bullet points, an email under 100 words.
The same guide found that "the most successful prompts average around 21 words", while the prompts people often try are "usually less than nine words". Short prompts leave gaps, and the AI fills them with guesses.
A worked example
Watch one prompt grow:
- Task only: "Write a job advert."
- Add a persona: "You are an experienced recruiter. Write a job advert."
- Add context: "You are an experienced recruiter. Write a job advert for a part-time bookkeeper at a 12-person architecture practice. The role is 20 hours a week, mostly remote, and needs two years of bookkeeping experience."
- Add a format: the same again, plus "Start with a three-line summary, then use bullet points for duties and requirements. Keep it under 250 words and use plain words."
The last version takes a minute longer to write, and the first answer lands much closer to what you need.
Before and after: AI prompt examples you can copy
Five pairs, for writing, research, planning, work and learning. Replace anything in square brackets.
Writing an email
Before: "Write an email asking for a deadline extension."
After:
Write a short email to my manager, [name], asking to move the quarterly report deadline from Friday to next Wednesday. Explain that the sales figures arrive late on Thursday. Polite and direct, under 100 words, with one apology at most.
Research
Before: "Tell me about heat pumps."
After:
I own a three-bedroom house built in the 1970s with gas central heating. Explain the main pros and cons of switching to a heat pump in plain words, then list the five questions I should ask an installer. If you are unsure about something, say so.
Planning
Before: "Make me a study plan."
After:
I have an exam on [date] covering these topics: [list]. I can study for 45 minutes on weekdays and 2 hours on Saturdays. Make a week-by-week plan as a table, with the hardest topics early and a review week at the end.
Work
Before: "Summarise this."
After:
Summarise the report below for my team, who have not read it. Use five bullet points, each under 20 words, then one line on what it means for our budget. Report: """[paste the report]"""
Learning
Before: "Explain machine learning."
After:
Explain machine learning to me as a complete beginner, using one everyday example. Then ask me three questions to check I have understood. Ask them one at a time, and wait for my answer before the next.
Prompting tips from the companies that make the models
OpenAI, Anthropic and Google each publish prompting advice, and much of it overlaps. These are the tips worth learning first.
- Run the colleague test (Anthropic). Show your prompt to a colleague who knows little about the task and ask them to follow it. Anthropic's rule of thumb: "If they'd be confused, Claude will be too."
- Explain why (Anthropic). The reason behind an instruction helps the model aim. Anthropic's example: rather than "never use ellipses", say the reply will be read aloud by a text-to-speech engine that cannot pronounce them.
- Show examples (Anthropic and OpenAI). If you want a particular style, paste examples of it. Anthropic suggests three to five, wrapped in tags such as
<example>so the model can tell them apart from your instructions. - Say what to do instead of what to avoid (Anthropic). Anthropic's example: rather than "Do not use markdown in your response", try "Your response should be composed of smoothly flowing prose paragraphs."
- Mark off the text you mean (OpenAI). Put pasted material inside delimiters, such as triple quotes, so the AI knows exactly what to work on.
- Give step-by-step instructions (OpenAI). For a complex job, ask the AI to work through it in stages, such as an outline first and then each section.
- Make it a conversation (Google). If the first answer misses, follow up instead of starting again.
- Let it say "I don't know" (Anthropic). Anthropic's documentation says that giving the model explicit permission to admit uncertainty can sharply reduce false information.
Why is my prompt not working? Quick fixes
Do prompts work the same in ChatGPT, Claude and Gemini?
Mostly, yes. The four parts above work in all three, and the three companies agree on the basics: be clear and specific, give context, show examples and refine. The details differ a little. Anthropic suggests XML-style tags such as <example> to separate parts of a prompt, while OpenAI suggests delimiters such as triple quotes. Both do the same job. They make it obvious which text is an instruction and which is material to work on.
Learn to prompt by doing
Reading about how to write AI prompts helps. Writing them helps more. Our course Prompt Engineering for Beginners teaches you to write prompts that get it right first time in ChatGPT, Claude and Gemini, for writing, research and planning. It has 14 lessons and takes about 90 minutes. You can also practise in our interactive prompt playground, which is free.
The lessons are made by the engineers at Linvex Solutions Limited, who design and ship AI products for clients. When the tools move, the lessons move with them.
Join the waitlist for 50% off when we open.
Brand new to AI? Start with our guide on how to use AI. When you are ready to build, good prompts are the main skill in vibe coding.
Learn it properly
Prompt Engineering for Beginners
Prompting that actually works. Write prompts that get it right first time in ChatGPT, Claude and Gemini. 14 lessons, about 90 minutes in all.
Prompting FAQ
What is a prompt in AI?
What does prompting mean?
What is prompt engineering?
How long should an AI prompt be?
Do I need different prompts for ChatGPT, Claude and Gemini?
Sources
Written by the Upperhand team. Facts checked 7 Nov 2026. Spotted something out of date?
Suggest an editWhy some prompts work and others don't
From Prompt Engineering for Beginners. 14 lessons, about 90 minutes.
Join the waitlist





