Key points
- Be clear & direct: the first line matters most — action verb + clear task + output spec.
- Be specific: Type A (output attributes: length/format/structure — use almost always) + Type B (reasoning steps — for complex problems); often combined.
- Structure with XML tags: wrap sections in descriptive tags (
<sales_records>) so Claude distinguishes content types; specific names beat generic ones. - Provide examples (one-/multi-shot): wrap example input/ideal-output pairs in XML; great for corner cases (sarcasm), formatting, and quality bars; place after instructions.
- Measured gains compound (course example: 2.32 → 3.92 → 7.86).
Related
Sources
- 2026-06-28-claude-course
Compiled from
wiki/study/claude-course/Prompt-Engineering.md · git is the source of truth