Skip to content
aviral gupta

// Lesson 3 of 3 · ~25 min · Beginner

Prompts that work

After this lesson you can turn a vague request into a prompt that says what you want, why, in what shape, with an example.

You will be able to

  • Write explicit instructions instead of hoping the model guesses
  • Explain the why behind a rule so the model generalises it
  • Use examples, XML tags and layout to control a prompt’s structure and output format
  1. Warm-up · Activity 1 of 7

    Recall from the last lesson: what is a strong first step before answering a question about a long document?

  2. Predict · Activity 2 of 7

    Predict: which prompt is more likely to produce a rich, fully featured result?

  3. Practice · Activity 3 of 7

    Why is “Your response will be read aloud by a text-to-speech engine, so never use ellipses since the engine will not know how to pronounce them” better than “NEVER use ellipses”?

  4. Practice · Activity 4 of 7

    Match each tag to what you would put inside it.

  5. Practice · Activity 5 of 7

    Your app needs replies in an exact JSON shape, but the model keeps adding a friendly sentence before the JSON. Which change is most likely to fix it?

  6. Brain teaser · Activity 6 of 7

    Brain teaser: apply the golden rule. A colleague with no background reads “Summarise these customer reviews and list the problems briefly.” What will they most likely need to ask first?

  7. Apply · Activity 7 of 7

    Mini-task. Rewrite this prompt using what you practised: “Write something about our new feature for customers.”

    Check your work against this list

Exit ticket

5 questions, no hints. Score 80% or more to complete the lesson.

Finish every activity above to unlock the exit ticket.

Report a problem

Spotted something wrong or unclear? Say what, and it will be checked and fixed.

#

At least 20 characters.

Only if you want a reply.

Key ideas

Be clear and direct

Modern models respond well to clear, explicit instructions, and follow them precisely: ask “can you suggest some changes?” and you may get suggestions rather than the changes. If you want more than the basics, ask for it, and be specific about the format and constraints. Anthropic’s golden rule: show your prompt to a colleague who has minimal context on the task. If they would be confused, the model will be too.

Say why, show what

Explaining the reason behind an instruction helps the model apply it to cases you did not list. Examples are one of the most reliable ways to steer format, tone and structure. Make them relevant and varied, so the model does not copy an accidental pattern, and wrap them in <example> tags so they are not mistaken for instructions.

Separate the parts

Wrapping each type of content in its own tag, such as <instructions>, <context> and <input>, reduces misinterpretation. Tags can steer the output too: asking for the answer inside, say, <summary> tags is one of the formatting techniques the guide lists. With long documents, put the documents near the top and your question at the end. Anthropic reports that this can improve response quality by up to 30% in their tests, especially with complex, multi-document inputs.

Sources

Last reviewed September 28, 2026