Skip to content
skillbld
Day 2 of 14 35 minSystem promptsFew-shot examplesXML tags

Write prompts that get consistent, useful results. Message roles, system prompts, clear instructions, context, examples, XML tags and output formats, and how to iterate.

By the end of today you can

  • Describe the system, user and assistant roles in a conversation
  • Turn a vague request into a clear, specific prompt
  • Use examples (few-shot prompting) to show the output you want
  • Separate instructions from data with XML tags
  • Test and improve prompts with a set of inputs

What's inside

  • 9 sections
  • 3 diagrams and mind maps
  • 5 code examples you can run
  • 5-question quiz
  1. 1Messages and roles
  2. 2Be clear and specific
  3. 3Give context: say why
  4. 4Show examples (few-shot prompting)
  5. 5Structure prompts with XML tags
  6. 6Ask for a format
  7. 7Complex tasks: give it room to think
  8. 8Iterate like an engineer
  9. 9A preview: sending a prompt to an API

Sign in free to read this lesson

Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.

Sign in free
Day 2: Prompting Fundamentals · AI: Building with LLMs · SkillBld