AI Tools

AI Tools › Guides › Prompt Claude

How to Write a Good Prompt for Claude

According to Anthropic's official documentation, Claude answers best to clear, explained and structured instructions.

In short

Here is how to apply that, with prompts to copy.

  1. Be explicit about the result you want.
  2. Explain the why.
  3. Give three to five examples
  4. Separate types of content with tags.
  5. Put long documents first,

Claude is Anthropic's assistant. Its prompting documentation describes a series of techniques: be clear and direct, give context, use examples, structure with XML tags, give a role. This page covers them from a practical angle for someone who uses Claude in conversation, without programming. For the basics shared by all AIs, read the general method first.

How to do it

  1. Be explicit about the result you want. Anthropic notes that if you want Claude to go further than strictly asked, you need to say so clearly rather than count on it inferring that from a vague instruction.
  2. Explain the why. The documentation gives a telling example: rather than “never use ellipses,” write that the text will be read aloud by software that cannot pronounce them. Claude generalizes from the reason.
  3. Give three to five examples when format or tone matters. That is the number recommended in the documentation, with varied examples.
  4. Separate types of content with tags. XML tags (for example <context>, <text>) help keep instructions, documents and examples from getting mixed up.
  5. Put long documents first, your question at the end, and ask Claude to quote the useful passages first.

The colleague test

Anthropic suggests a simple test: show your prompt to someone who does not know the subject and ask them to carry out the task. If they hesitate, Claude will hesitate too. Take an example: you want an introduction text for your nonprofit.

Write an introduction text for my nonprofit.

Improved version, with the context and the reason for the instructions:

I volunteer for a neighborhood association that organizes a potluck dinner on the first Saturday of every month. The text will be printed on a small flyer and dropped in mailboxes: readers don't know us and will read it in thirty seconds.

Write it in 80 words maximum, warm tone, formal address, no nonprofit jargon. Start with the catchiest sentence. End with the address [address] and the time [time]. Give me two different versions so I can choose.

The key is the second sentence: it explains why the text must be short. Claude can then decide other details by itself.

Use tags for a long document

The documentation recommends placing long documents at the top of the prompt, above the question, and wrapping them in tags. Here is a template for analyzing meeting minutes (without sensitive data):

<document>
[paste the meeting minutes here]
</document>

First, quote in quotation marks the three passages of the document that matter most for the decisions to be made.
Then, based on those passages only, build a table: decision, owner, deadline. If information is missing from the document, write “not specified” instead of inferring it.

Asking for quotes first is a technique Anthropic cites for long documents: it helps Claude focus on the essentials of the text.

Give examples of what you expect

Examples are described as one of the most reliable ways to guide format, tone and structure. Suppose you are sorting customer reviews:

Classify each customer review as “positive,” “negative” or “mixed,” then give the main reason in three words.

Examples:
Review: “Fast delivery, but the packaging was damaged.” -> mixed; damaged packaging
Review: “I recommend it, very good service.” -> positive; service
Review: “Never received my order, nobody answers.” -> negative; order not received

Reviews to classify:
1. [review 1]
2. [review 2]
3. [review 3]

Pitfalls to avoid

In the app

For instructions that apply to all your conversations (tone, level of detail, language), the custom instructions tool helps you write them; then look in the app settings for where to save them, since menus change. To see what the free plan offers, read our guide to Claude.

Frequently asked questions

Does Claude understand other languages as well as English?

You can write to it in many languages without difficulty. If a result is disappointing, state the language you want the answer in and give an example in that language.

Do I really need to use XML tags?

It is not mandatory. Anthropic's documentation recommends them mostly for prompts that mix instructions, documents and examples. For a short request, a clear sentence is enough.

How many examples should I give Claude?

The official documentation recommends three to five examples for better results, varied from one another. A single example risks being copied too closely.

Will my prompt also work on ChatGPT or Gemini?

The principles of clarity, context and format are shared. Tags are a habit specific to Claude, but other tools generally cope with them.

Sources: Anthropic documentation: prompting best practices · Anthropic documentation: prompt engineering overview. Guide updated on November 23, 2026.

Free tools to go faster

On the same topic

Read next

All guides · All tools