Skip to content
한국어

How to Write Good Prompts (Based on the Official Guide)

In short
  • Treat Claude like “a brilliant new hire who doesn’t know your company’s norms.” Tell it the purpose, the audience, and the format, and results improve dramatically.
  • The golden rule: if you show your prompt to a colleague with almost no context and they’d be confused, Claude will be confused too.
  • The five core techniques are be clear, add the reason, give examples, separate with XML tags, and put long material on top with the question at the bottom.
  • Model choice and effort are as important a dial as the prompt.
  • The examples below are examples made by applying the official principles; the official docs don’t contain sample prompts in this form.
  • Rewrite a vague request into a specific one.
  • Hand off meeting-notes summaries, report drafts, and data cleanup to Claude precisely.
  • Shape the format exactly how you want it, using examples and XML tags.
  • Know what to fix when you don’t like the result.

The official “Prompting best practices” doc is a prompt reference that applies across the latest models (Fable 5.2, Opus 5.5, Sonnet 5.5, Haiku 5.5, and others). This tutorial turns its common techniques into work examples.

Term Meaning
Prompt The wording of the request you send Claude.
Context Background information, such as why you’re doing this and who will read it.
Few-shot (giving examples) A method of showing example inputs and outputs you want. The official docs recommend 3 to 5.
XML tags Markers like <context> that label the kind of content. They reduce misunderstandings when instructions, context, examples, and input get mixed together.
effort How deeply the model thinks. The models are compared in C1.
0/5 done
  1. State the purpose, audience, and format (meeting-notes summary)

    If order matters, use a numbered list, and be specific about the output format and constraints.

    Bad example:

    Copy and paste this prompt

    Summarize the meeting notes.

    Good example:

    Copy and paste this prompt

    Summarize the following meeting notes in 5 lines to report to my team lead. Include the decisions, the owner, and the deadline, one line each.

    [Paste the meeting notes]

  2. Add the reason (report draft)

    When you explain the reason, Claude grasps the intent behind the rule and generalizes it. The official docs also say that explaining why works better than just throwing out rules.

    Bad example:

    Copy and paste this prompt

    Write a draft of the quarterly report. Don’t use lists.

    Good example:

    Copy and paste this prompt

    Write a draft of the quarterly report that I’ll read aloud at an executive meeting. Because it will be read out loud, write in flowing sentences with no lists or symbols. Keep it to one page, in the order: results, problems, next quarter’s plan.

    It also helps to say “what to do” instead of “don’t.” For example, instead of “don’t use markdown,” try “write in naturally flowing paragraphs.”

  3. Give examples (data cleanup)

    Copy and paste this prompt

    Classify the customer inquiries below as one of “Shipping,” “Refund,” or “Other.” Answer in this format.

    <examples> <example>Input: It’s been 5 days since I ordered and it still hasn’t arrived. Output: Shipping</example> <example>Input: The size doesn’t fit, so I’d like my money back. Output: Refund</example> </examples>

    <input> [List of inquiries to classify] </input>

    Examples work best when they’re relevant, varied, and structured with tags. For best results, 3 to 5 are recommended.

  4. Put long material on top and the question at the bottom

    For long inputs over 20k tokens, put the documents at the very top of the prompt and your question or instructions at the very bottom. The official docs say this improved response quality by up to 30% on complex multi-document inputs (in testing). For multiple documents, they describe a structure that separates them inside <documents> as <document index="1"> and uses <source> and <document_content>.

    Copy and paste this prompt

    <documents> <document index=“1”> <source>Q2 sales report</source> <document_content>[Paste the content]</document_content> </document> <document index=“2”> <source>Q3 sales report</source> <document_content>[Paste the content]</document_content> </document> </documents>

    Compare the three products whose sales grew the most across the two reports, and tell me the cause, along with the sentences in the reports that support it.

  5. Give it a role, then refine

    Even a one-sentence role in the system prompt or the first line helps. And don’t try to write it perfectly in one go; refine with follow-up questions.

    Copy and paste this prompt

    You’re an HR manager with 10 years of experience. Rewrite the announcement you just wrote in simpler language, as if a new hire were reading it.

    Screen guide: A conversation refining the result with follow-up questionsSee this screen in the official help ↗

Principle Weak request Strong request
Be clear and direct Summarize the meeting notes 5 lines for the team lead, including decisions, owner, and deadline
Add the reason Don’t use lists It’s read aloud, so use flowing sentences with no lists
“Do” instead of “don’t” Don’t use markdown Write in naturally flowing paragraphs
Give examples Explanation only 3 to 5 input/output examples
Structure Material and instructions mixed together Use <context> <input> <instructions> tags
Long material Question at the top Documents on top, question below
  • Cause: Your request may be asking only for the baseline.
  • Fix: Say so if you want more. As in the official guide’s example, ask directly for “more than that,” such as “include as many features as possible and go beyond the basics for a polished result.”
  • Cause: The format criteria exist only in words.
  • Fix: Give an output example, or use XML format indicators.

It produces things I didn’t ask for (especially in coding)

Section titled “It produces things I didn’t ask for (especially in coding)”
  • Cause: The model can over-implement.
  • Fix: Limit the scope, like “Make only the requested changes. Don’t create unnecessary abstractions or new files.” This example paraphrases the intent of the official doc.
  • Cause: Blanket instructions like “always use tools,” or high effort, may be the cause.
  • Fix: Make blanket instructions specific, like “use them when they help you understand the problem,” and if that’s not enough, lower the effort.

I get off-target answers with long documents

Section titled “I get off-target answers with long documents”
  • Cause: The question comes before the documents, or the document boundaries are unclear.
  • Fix: Put the documents on top and the question below, and separate them with tags.
  • Write as if you’re giving a new hire a work assignment. Just write down the information you’d need when asking a colleague for a favor.
  • Start with a simple question and get more specific as you go. The official getting-started guide describes the same flow.
  • Save your frequent requests as templates. Instructions and memory are covered in C9.
  • If a prompt doesn’t fix it, try changing the model and effort. Model choice is as strong a lever as the prompt. See C1.

Sources

Last verified: Nov 16, 2026

Prices, limits, and menu names change often. Before making an important decision, check the official pages above for the latest details.