Skip to content New: the Claude Skills catalog — what each skill does and how to install it →
LRN-02 · Manual · chapter 02 · rev. 10/2026

How to write AI prompts

Decide what a good answer looks like, then write the task, the context, the rules and the format, in that order. Test it twice and fix the part that failed.

LevelBeginner
Works inChatGPT, Claude, Gemini
Reading time7 min
CheckedOct 2026

To write an AI prompt that works, tell the model what to do, for whom, with what material and in what shape. This chapter turns that into seven steps you can follow to prompt AI effectively for any task in ChatGPT, Claude or Gemini. It ends with a before and after pair and two templates you can copy. If you want the theory first, read what prompt engineering is.

The seven-step method

The steps follow the order the vendor guides recommend: success criteria first, then the request, then the shape of the answer, then testing.

  1. Decide what a good answer looks like. Write one or two sentences: length, audience, what it must include. Anthropic's guide asks for success criteria and a way to test against them before any prompt work starts.
  2. State the task with a verb. "Summarize", "rewrite", "compare", "draft". Google's Workspace guide lists the task as one of four parts of a prompt, next to persona, context and format.
  3. Give context, including why. Who will read the result, and what it is for. Anthropic's example: "never use ellipses" works better when you explain that a text-to-speech engine will read the response aloud.
  4. Set the rules. Length, words to avoid, facts to keep. Google's prompt design guide calls these constraints. Phrase them as what to do, as Anthropic suggests.
  5. Define the format. A table, a numbered list, three paragraphs, JSON. Ask for the exact shape you will paste somewhere else.
  6. Add an example if the shape or tone matters. Examples fix format better than descriptions. Anthropic recommends 3 to 5 for best results. The few-shot prompting chapter covers how to pick them.
  7. Put long material first and the question last, then test. With long documents, Anthropic reports that a query at the end improved response quality by up to 30 percent in its tests, and Google gives the same advice for Gemini. Run the prompt more than once, since output varies between runs.

Short tasks need only steps 2 and 5. A prompt you will reuse every week deserves all seven.

Before and after

Here is a typical first attempt:

Write a LinkedIn post about our new feature.

The model has to guess the feature, the audience, the length and the voice. It will fill those gaps with generic choices. Here is the same request after the seven steps:

You write LinkedIn posts for a payroll software company. Draft a post announcing that customers can now run payroll from their phone. The readers are owners of small businesses with 5 to 50 staff, and the goal is to get existing customers to try the feature this week. Keep it under 120 words, use no hashtags except one at the end, and finish with a single question to readers. Format: a hook line, two short paragraphs, the question. Here is a past post whose tone we liked: "Friday payroll used to mean staying late. Not anymore."

What changed: a role, a precise task, the audience and the goal, three rules, an output shape and one example of tone. Each addition removes a guess. The after version is longer, yet every sentence in it is something the model could not have known.

Template 1: the prompt skeleton

Use this as a starting point for any reusable prompt. Fill the blanks, delete the lines you do not need.

Try it
You are [role, e.g. a hiring manager in retail].

Task: [verb + deliverable, e.g. draft a job ad].

Context: [who will read it and why it exists].

Rules:
- [length]
- [what to include or keep]
- [tone]

Format: [output shape, e.g. title, 3 bullets, sign-off].

Example of what good looks like:
[paste one short example]

Material:
[paste the source text or data last]

To see the skeleton applied to real jobs, compare it with ready prompts in the marketing prompts and productivity prompts categories.

Template 2: have the model check your prompt

Anthropic's golden rule is to show your prompt to a colleague who knows nothing about the task: if they would be confused, the model will be too. You can run that test on the model itself before you use the prompt.

Try it
Below is a prompt I plan to use. Do not answer it.

Read it as someone who knows nothing about my situation and tell me:
1. Which words could be read two ways.
2. What information is missing that you would have to guess.
3. What output format you would produce, and whether the prompt actually specifies it.

Then rewrite the prompt with each gap marked as a blank in square brackets for me to fill.

My prompt:
[paste your prompt]

If you would rather start from a generated draft, the ChatGPT prompt generator and our AI prompt generator build a first version from a one-line description. Anthropic offers a similar metaprompt recipe in its Claude Cookbook for people who do not have a first draft.

Fix the step that failed

When an answer misses, the failure usually points to one missing step. Match the symptom to the fix instead of rewriting the whole prompt.

What went wrongStep to revisitWhat to add
Right topic, wrong reader level3. ContextWho reads it and what they already know
Too long or too short4. RulesA word count or a number of items
Useful content, unusable shape5. FormatThe exact structure, or a table with named columns
Tone is off6. ExampleOne or two samples of the tone you want
Ignores part of a long document7. OrderMove the document up and the question to the end
You cannot tell if it is good1. Success testTwo sentences on what a good answer must contain

Model notes

  • ChatGPT and OpenAI models. OpenAI's guide says GPT models benefit from very precise instructions, while reasoning models do better with high-level goals. For reasoning models it also advises trying a prompt without examples first.
  • Claude. Anthropic says Claude responds well to clear, explicit instructions, and that if you want work that goes beyond the basics you should ask for it directly. XML tags help when a prompt mixes instructions, examples and material.
  • Gemini. Google's guide favors including few-shot examples and recommends clear delimiters between the parts of a prompt for Gemini 3 models.

When this method is overkill

A quick factual question or a one-off rewrite needs a task and maybe a format, nothing more. Anthropic's blog lists over-engineering and using every technique at once among common prompting mistakes. Add steps only when the answer comes back wrong, and add the step that fixes the specific failure: an example for the wrong shape, context for the wrong audience, a rule for the wrong length. The techniques start in the next chapter, zero-shot prompting. For tasks that need reasoning across several steps, see chain of thought prompting.

FAQ

How long should an AI prompt be?

As long as it needs to be to remove guessing, and no longer. Anthropic's blog puts it this way: the best prompt "isn't the longest or most complex", it is the one that reaches your goal reliably with the least structure.

Should I write prompts in full sentences or keywords?

Full sentences. Google's Workspace guide suggests writing as you would speak to another person and being specific about what you want.

How do I create an AI prompt from scratch?

Start with step 1, then fill in Template 1 above and delete the lines you do not need. If you have only a one-line idea, the ChatGPT prompt generator builds a first draft, and Template 2 checks it for gaps.

Can I use the same prompt in ChatGPT, Claude and Gemini?

Usually yes, because the core parts (task, context, rules, format) are the same in all three vendors' guides. Adjust for the differences above: more precision for GPT models, explicit asks for Claude, examples and delimiters for Gemini.

What should I do when the answer is still wrong?

Change one part at a time and run the prompt again, so you know which change helped. Anthropic's blog lists forgetting to iterate and test as a common mistake.

Sources

  1. Prompt engineering overview — Anthropic, accessed October 2026
  2. Prompting best practices — Anthropic, accessed October 2026
  3. Best practices for prompt engineering — Claude blog, Anthropic, accessed October 2026
  4. Prompt engineering — OpenAI, accessed October 2026
  5. Reasoning best practices — OpenAI, accessed October 2026
  6. Prompt design strategies — Google AI for Developers, accessed October 2026
  7. Long context — Google AI for Developers, accessed October 2026
  8. Writing effective AI prompts — Google Workspace, accessed October 2026
Weekly

New prompts in your inbox

One email a week: the best new prompts and one short guide. Unsubscribe any time.