Prompt structure and message roles
A section of the "Prompting and context" topic. The questions check an understanding of practice, not memory of specific library APIs. After each answer comes a review: why the correct option is right, what is wrong with each incorrect one and which chapter to read.
Quiz difficulty Formats: several correct options, order of steps, the faulty line
Quiz 1.1Prompt structure and message rolesStart practice Practice has no timer and a review after every answer.
01
What we check
- Where information gets lost in a prompt
- The anatomy of a prompt
- Chekhov's gun in the context
- XML and Markdown in a prompt
- A process or a pile of rules
- Clear instructions
- A classification prompt without a marker
02
Where to read
- Li, AI Agents in Depthsec. 2.4.2 · sec. 2.4.3 · sec. 2.4.6
- Huyen, AI Engineeringch. 5
- Berryman, Ziegler, Prompt Engineering for LLMsch. 5 · ch. 6