Resources

How Do You Write a Good Prompt for Claude? A 5-Part Template

A good prompt for Claude states the task clearly, gives the background Claude cannot guess, sets constraints, describes the output format you want, and shows an example when wording alone is not enough. Those five parts — task, context, constraints, format, examples — cover most everyday business prompts, and you can reuse them for emails, reports, summaries and analysis.

The 5-part prompt template

  1. Task. One sentence on what you want done, starting with a verb: "Draft", "Summarise", "Compare", "Classify".
  2. Context. Who the audience is, what the situation is, and what material Claude should work from. Claude only knows what you give it.
  3. Constraints. Length, tone, things to include, things to avoid, and what to do when information is missing.
  4. Format. How the answer should look: bullet points, a table, a short email, numbered steps.
  5. Examples. One or two samples of the output you want, when style or structure is hard to describe.

You do not need all five every time. A simple request needs only a task and a little context. Add parts when the first answer misses the mark, and treat each miss as a clue to which part was missing.

Before and after: a real-world style example

Here is a weak prompt:

Write an email to a customer about the delay.

Claude has to guess the customer, the reason, the length and the tone, so the result will be generic. Now the same request using the template:

Task: Draft a short email telling a customer their order will arrive late.

Context: The customer is a long-standing retail account. The delivery is delayed by one week because a supplier shipment arrived late. We want to keep the relationship strong.

Constraints: Apologise once, do not blame the supplier by name, offer a call with their account manager, and stay under 150 words. If you need a detail I have not given, leave a clear gap for me to fill rather than inventing it.

Format: Subject line, then the email body in three short paragraphs.

The second version takes a minute longer to write and usually saves several rounds of correction. Notice the constraint about missing details: telling Claude not to invent facts is one of the most useful lines you can add.

Use XML tags to separate instructions from material

When your prompt includes pasted material — a contract excerpt, meeting notes, customer feedback — it can be unclear where your instructions end and the material begins. Wrapping sections in simple tags makes the boundary explicit:

<instructions>
Summarise the notes below in five bullet points for a manager.
</instructions>

<notes>
(paste meeting notes here)
</notes>

The tag names are up to you; pick descriptive ones such as <document>, <example> or <customer_feedback>. Tags are especially helpful when you paste several documents, or when the pasted text itself contains instructions you do not want Claude to follow.

When to add examples

Examples are the strongest way to communicate a style or structure that is awkward to describe. If you want product descriptions in a particular voice, paste one or two you like, label them as examples, and ask for new ones in the same style. Keep examples representative: Claude tends to copy their length, structure and phrasing, so a quirky example will produce quirky output.

Habits that improve results

  • Be specific about the audience. "Explain this for a finance director with no technical background" beats "explain this simply".
  • Say what good looks like. Describe the output you would be happy to send without edits.
  • Give permission to say "I don't know". This reduces confident-sounding guesses.
  • Iterate in the same conversation. Point to what is wrong ("too formal, cut the second paragraph") rather than starting over.
  • Break big jobs into steps. Ask for an outline first, approve it, then ask for the draft.
  • Check the output. A well-written prompt does not remove the need to verify facts, figures and anything sent to customers.

Where prompting fits in your wider AI skills

Prompting is the entry point, but using Claude well at work also means choosing the right workflows, checking outputs and following your company's rules on data. Prompting and task execution is one of the seven domains in the Claude Certified Associate exam; see the CCAO-F prompting domain page for what that domain covers. Agmo Studio, a Select Partner of the Anthropic Claude Partner Network, runs a two-day Claude Certified Associate workshop that practises these skills on your own kinds of tasks, and the wider AI training Malaysia page lists the other options, including in-house sessions for teams.

Common Questions

FAQ

How long should a prompt for Claude be?
As long as it needs to be to remove guesswork. A simple request can be one sentence, while a complex task with context, constraints and an example may run to several paragraphs.
Do I need to use XML tags in my prompts?
No, they are optional. They help most when you paste documents or several pieces of material and want Claude to clearly tell your instructions apart from the content.
What should I do if Claude's first answer is not what I wanted?
Reply in the same conversation and say specifically what to change, such as tone, length or structure. If the same problem keeps recurring, add the missing part of the template, for example a constraint or an example.

Questions about AI training for your team?

Message us on WhatsApp or email — we'll point you to the right program.

Chat With Us on WhatsApp Email Us