Skip to content
AgenticAIWiki
  1. Learn
  2. Part 2. Prompt engineering and structured output
  3. Chapter 11

Explicit criteria, roles and XML tags

7 lessons · 36 min

From vague prompt to spec

Full screen
textYou are a world-class support agent.Be careful and helpful.Output quality (illustrative, %)On task30Right audience25Follows rules20Right format30Sample reply"Sure, I can refund that for you!"

Swipe to change step

Step 1 of 7. Here is a typical first prompt: a grand persona and "be careful". It sounds strong, but Claude still knows nothing about the product, the users or the rules. Flattery does not change behaviour. Context does. Sample reply ("Sure, I can refund that for you!").

In this chapter

  1. 11.1System prompts that read like a spec5 min read
  2. 11.2Explicit criteria beat "be careful"5 min read
  3. 11.3Roles and audience4 min read
  4. 11.4Structuring prompts with XML tags5 min read
  5. 11.5Message roles: system, developer and user6 min read
  6. 11.6Delimiters and Markdown structure5 min read
  7. 11.7Role prompting: when personas help and when they don't6 min read

Chapter check

Already know this? Score 80% or more and you can skip ahead. Each attempt draws 4 questions from 12.

Loading check…