Before you start
You need any AI chat you can type into, such as Claude, ChatGPT or Gemini, and one task you do more than once. A weekly status update or a customer reply works better than a one-off question, because you will run the prompt several times.
Write down what a good answer looks like before you write the prompt. Anthropic's prompt engineering overview assumes you already have success criteria, a way to test against them and a first draft. Three lines of "a good answer is..." are enough to start.
Write one prompt in five passes
The prompt below uses every technique in this lesson. It is a sample built from the three guides, not a vendor template, so swap in the details of your own task.
The test Anthropic gives for a clear prompt
Show your prompt to a colleague with minimal context on the task and ask them to follow it. If they'd be confused, Claude will be too.
Summarize the meeting notes below for my team lead.
Audience: a manager who was not in the meeting and will read this on a phone.
Why it matters: she decides on Friday which of these items to fund.
Output: three bullet points, each under 20 words, then one line that starts with "Decision needed:".
Example of the style I want:
- Vendor quote arrived and is over budget.
Decision needed: approve the vendor or ask for a second quote.
Notes:
[paste the notes here]- Name the task and the reader. Open with what to do, then add a line on who will read the result. Anthropic's guide compares the model to a brilliant but new employee who lacks context on your norms and workflows.
- Say why it matters. A reason lets the model apply a rule to cases you did not list. Anthropic's example explains that a reply will be read aloud, and the guide notes that Claude can generalize from the explanation.
- Describe the output. Give the count, the length and the shape. Say what you want instead of what to avoid, which is the advice in Anthropic's section on controlling the format of responses.
- Show an example. Anthropic calls examples one of the most reliable ways to steer format, tone and structure, and suggests three to five for best results. Google's guide warns that too many can make the model overfit to them.
- Run it, then change one thing. Compare the answer with the criteria you wrote earlier, edit one part of the prompt and run it again. Changing one thing at a time is our advice, not a vendor rule.
Four weaker prompts and their fixes
Each fix adds something the model could not guess: a wider scope, a reason, a positive instruction or the source text itself.
| Weaker prompt | Stronger prompt | What changed |
|---|---|---|
| Create an analytics dashboard | Create an analytics dashboard. Include as many relevant features and interactions as possible. Go beyond the basics to create a fully-featured implementation. | It asks outright for more than the bare task. |
| NEVER use ellipses | Your response will be read aloud by a text-to-speech engine, so never use ellipses since the text-to-speech engine will not know how to pronounce them. | It gives the reason, so the model can generalize. |
| Do not use markdown in your response | Your response should be composed of smoothly flowing prose paragraphs. | It says what to do instead of what not to do. |
| What should I do to fix my disconnected wifi? The light on my Google Wifi router is yellow and blinking slowly. | Answer the question using the text below. Respond with only the text provided. [the router maker's troubleshooting table, pasted in] | With the table pasted in, Google's example moved from generic steps to ones that fit the light. |
When to let the model think
You will see advice to add "think step by step". Current models often reason without being told. Google's guide says Gemini 2.5 and 3 generate internal thinking, so asking the model to outline its reasoning steps in the reply is usually unnecessary. Anthropic's newer models also decide how much to think, and its guide offers a sample line that saves thinking for problems that need multistep reasoning.
Your job is then to split a big task, not to coax the thinking. Google suggests one prompt per instruction, with each answer feeding the next prompt. Anthropic names a common chain, shown below, where each step is its own call. In a chat window that is three messages.
Draft
Ask for a first version of the work.
Review
Ask the model to check the draft against your criteria.
Refine
Ask it to rewrite the draft using its own review.
When the answer is off
Google's guide lists three cheap changes for a prompt that will not behave. Once the prompt matters to you, keep a few test inputs as well. OpenAI's guide recommends tests and evaluations that measure a prompt's behavior across edits and model upgrades, and pinning production apps to a specific model snapshot.
- Reword it. Google asks for a pie recipe three different ways and notes that different phrasing can change the response.
- Switch to a similar task. If the model ignores a classification instruction, Google suggests turning it into a multiple-choice question.
- Reorder the content. Moving the examples, the context and the input around can change the response.
Alex Albert on examples, and Ethan Mollick on asking for "better"
Alex Albert, who works in research at Anthropic, wrote on X on 15 August 2024 that examples are the thing he recommends most in prompts, because they work so well. The post is more than two years old, and Anthropic's current prompting guide still backs it, as step 4 above shows. If you add one thing to the five passes above, make it a sample of the output you want.
Ethan Mollick, a Wharton professor who studies AI, posted on 10 September 2024 that telling the AI to "make it better" after a first result works well. In his view it is a folk way of getting the model to reason step by step. That sounds like the opposite of the first common mistake below. The difference is what the second pass aims at: the draft, review and refine chain above is the same move with your criteria attached, so say what better means in the review message.
Examples are the #1 thing I recommend people use in their prompts because they work so well.

Screenshots of X's own embeds of the posts, taken on 5 November 2026, with the time in UTC. Albert's post quotes another post, which X shows cut short. Select one to open the post on X.
Common mistakes
- Asking for "better" with no sense of what better means, so the model has nothing to aim at.
- Leaving out context you hold in your head, such as who reads the result and why it matters.
- Giving one example and getting copies of it. Anthropic asks for varied examples so the model does not pick up an unintended pattern.
- Changing three things at once and not knowing which one helped.
- Moving a prompt to another model without a re-check. Anthropic says a technique measured on one model should be re-checked against your own evals before you apply it to another.
Try it yourself
- Pick a task you do every week and jot down three things the answer must get right.
- Run it once with a one-line prompt and save the answer.
- Rewrite the prompt with the five passes, run it again and score both answers against your three things.
- Change only the example, run it again and see how much the output moves.
Next: the system prompt
Everything above lived in one message. The next lesson, how to write a system prompt, moves the standing rules, such as role, tone and format, to a place that applies to a whole conversation.
A prompt that works is worth saving. Skills are saved instructions an agent loads when a task matches, and what are agent skills explains how they work. What goes in a CLAUDE.md file covers the same habit for Claude Code.
Check yourself
Your prompt says "Do not use markdown in your response". Which rewrite does the lesson recommend?
Show answer
C. Your response should be composed of smoothly flowing prose paragraphs The lesson says to describe what you want instead of what to avoid, which is the advice in Anthropic's section on controlling the format of responses.
Why does the lesson say to give the reason behind a rule such as "never use ellipses"?
Show answer
A. The model can apply the rule to cases you did not list A reason lets the model generalize, as in the example where the text-to-speech engine cannot pronounce ellipses.
You run a prompt and the answer is off. What does the lesson advise?
Show answer
D. Change one thing and run it again Changing one thing at a time tells you which change helped, and changing three at once hides it.
How does the lesson suggest you handle a big task in a chat window?
Show answer
B. Split it into messages, such as draft, review and refine Current models often reason without being told, so your job is to split the task, as in the three-message chain from the Anthropic guide.
Frequently asked questions
Do I need to code to learn prompt engineering?
No. Everything in this lesson is plain language you can type into a chat window. Code only enters when you call a model through an API, and the same techniques apply there.
How long should a prompt be?
Long enough that a stranger could do the task, and no longer. Anthropic says the more precisely you explain what you want, the better the result, so add what is missing and cut what is not.
How many examples should I include?
Start with two or three that differ from each other, and add more if the output still drifts. Keep the formatting identical across them, because Google says mismatched formatting can produce responses in undesired formats.
Can I ask the model to write or improve my prompt?
Yes. Anthropic says you can ask Claude to evaluate your examples for relevance and diversity, or to generate more. For people with no first draft, its overview links a prompt generator built on the metaprompt recipe from the Claude Cookbook.
Why does the same prompt behave differently on another model?
Models differ, and the vendors publish model-specific guidance for that reason. Anthropic's guide opens with a table of per-model prompting pages, and OpenAI recommends pinning production apps to a model snapshot. Test again when you switch.
Is a system prompt the same as a prompt?
Not quite. A system prompt stays in force for a whole conversation, while an ordinary prompt is the request in a single message.
Sources
- Anthropic: Prompting best practices https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
- Anthropic: Prompt engineering overview https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview
- OpenAI: Prompt engineering https://developers.openai.com/api/docs/guides/prompt-engineering
- Google AI Studio: Prompt design strategies https://aistudio.google.com/docs/prompting-strategies
- Alex Albert on X, 15 August 2024 https://x.com/alexalbert__/status/1824136151701360756
- Ethan Mollick on X, 10 September 2024 https://x.com/emollick/status/1833339072959435162
- YouTube: Anthropic, Prompting 101 | Code w/ Claude https://www.youtube.com/watch?v=ysPbXH0LpIE


