# Prompt engineering basics: how to write prompts that work

> Prompt engineering means writing the instructions you give an AI model so it returns what you wanted. The basics are the same in the Anthropic, OpenAI and Google guides: say exactly what you want, give context, show examples, ask for a format, and revise after each run. You can start in any chat window, with no code.

Mindket editors · Published 2026-11-04 · Updated 2026-11-05 · https://mindket.com/learn/prompt-engineering/prompt-engineering-basics

## In short

- Write each prompt so a new colleague with no background could follow it.
- Give the reason behind a rule, and show one example of the output you want.
- Ask for a format by saying what you want, not what to avoid.
- Change one thing between runs, so you know which change helped.

## Before you start

You need any AI chat you can type into, such as [Claude](https://claude.ai), [ChatGPT](https://chatgpt.com) or [Gemini](https://gemini.google.com), 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](https://platform.claude.com/docs/en/build-with-claude/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.
>
> Anthropic, prompting guide for Claude, [Anthropic: Prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) (read 2026-11-04)

````text
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]
````

1. **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](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) to a brilliant but new employee who lacks context on your norms and workflows.
2. **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.
3. **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.
4. **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](https://aistudio.google.com/docs/prompting-strategies) warns that too many can make the model overfit to them.
5. **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.

**A three-message chain from the Anthropic guide**

1. Draft. Ask for a first version of the work.
2. Review. Ask the model to check the draft against your criteria.
3. 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](https://developers.openai.com/api/docs/guides/prompt-engineering) 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](https://x.com/alexalbert__/status/1824136151701360756) 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](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) 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](https://x.com/emollick/status/1833339072959435162) 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.
>
> Alex Albert, Research at Anthropic, [X](https://x.com/alexalbert__/status/1824136151701360756) (read 2026-11-05)

[![Alex Albert (@alexalbert__) on X, 15 August 2024, replying to his own post and quoting a post by @abacaj on few-shot prompting. Examples are the #1 thing I recommend people use in their prompts because they work so well.](https://mindket.com/blog/shots/x-alexalbert-examples-first.webp?v=a5f20381f2ae)](https://x.com/alexalbert__/status/1824136151701360756)

Alex Albert on X, 15 August 2024

[![Ethan Mollick (@emollick) on X, 10 September 2024. Telling the AI to "make it better" after getting a result is just a folk method of getting an LLM to do Chain of Thought, which is why it works so well.](https://mindket.com/blog/shots/x-emollick-make-it-better.webp?v=ad45dcbbed0d)](https://x.com/emollick/status/1833339072959435162)

Ethan Mollick on X, 10 September 2024

[Prompting 101 | Code w/ Claude](https://www.youtube.com/watch?v=ysPbXH0LpIE)

Prompting 101, from Anthropic's Code w/ Claude event, on Anthropic's own YouTube channel.

> 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](https://mindket.com/learn/prompt-engineering/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](https://mindket.com/skills) are saved instructions an agent loads when a task matches, and [what are agent skills](https://mindket.com/blog/what-are-agent-skills) explains how they work. [What goes in a CLAUDE.md file](https://mindket.com/blog/claude-md-file) covers the same habit for Claude Code.

## Check yourself

1. Your prompt says "Do not use markdown in your response". Which rewrite does the lesson recommend?

   A. NEVER use markdown
   B. Use as little markdown as you can
   C. Your response should be composed of smoothly flowing prose paragraphs
   D. Do not use markdown, ever

   Answer: C. 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.

2. Why does the lesson say to give the reason behind a rule such as "never use ellipses"?

   A. The model can apply the rule to cases you did not list
   B. The model refuses rules that come with no reason
   C. A longer prompt always scores higher
   D. The reason is printed at the top of the answer

   Answer: A. A reason lets the model generalize, as in the example where the text-to-speech engine cannot pronounce ellipses.

3. You run a prompt and the answer is off. What does the lesson advise?

   A. Rewrite everything and add more examples at once
   B. Move to a different model right away
   C. Add "think step by step" to the end
   D. Change one thing and run it again

   Answer: D. Changing one thing at a time tells you which change helped, and changing three at once hides it.

4. How does the lesson suggest you handle a big task in a chat window?

   A. Add "think step by step" and send it as one message
   B. Split it into messages, such as draft, review and refine
   C. Paste the task three times in a row
   D. Ask for the shortest answer possible

   Answer: B. 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](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/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) (read 2026-11-05)
- [Anthropic: Prompt engineering overview](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview) (read 2026-11-04)
- [OpenAI: Prompt engineering](https://developers.openai.com/api/docs/guides/prompt-engineering) (read 2026-11-04)
- [Google AI Studio: Prompt design strategies](https://aistudio.google.com/docs/prompting-strategies) (read 2026-11-04)
- [Alex Albert on X, 15 August 2024](https://x.com/alexalbert__/status/1824136151701360756) (read 2026-11-05)
- [Ethan Mollick on X, 10 September 2024](https://x.com/emollick/status/1833339072959435162) (read 2026-11-05)
- [YouTube: Anthropic, Prompting 101 | Code w/ Claude](https://www.youtube.com/watch?v=ysPbXH0LpIE) (read 2026-11-05)

[Browse skills](https://mindket.com/skills)
