Learn Prompting that works

Beginner Free

Prompting that works

A practical, model-agnostic approach to prompt engineering: how to structure a prompt, when examples help, how to get structured output you can parse, how to test a prompt before you ship it, and the cost/latency trade-offs behind your choices.

  • 5 lessons
  • 31 min total
  • Quiz in every lesson

What you'll learn

  • A well-structured prompt separates role/instructions, context/data, the actual task, and output format into distinct, labeled sections.
  • Few-shot prompting (showing 1-5 example input/output pairs) works especially well for format and tone, where 'show, don't tell' beats a written description.
  • Asking a model to 'return JSON' in plain instructions is not reliable on its own - it can add prose before/after the JSON, use the wrong field names, or produce invalid JSON entirely.
  • A prompt is code that produces probabilistic output - it needs the same discipline as any other code path that handles real inputs: a test set, not a vibe check.
  • You pay for both input and output tokens, and output tokens are typically priced higher - a verbose system prompt on every request adds up fast at scale.

Curriculum

5 lessons · 31 min

  1. 1. Structure The four parts of a well-built prompt, and why order and separation matter more than clever phrasing. Quiz 6 min
  2. 2. Examples and few-shot prompting When showing examples beats describing rules, how many to use, and the trap of examples that are too similar to each other. Quiz 6 min
  3. 3. Structured output Getting JSON you can actually parse: schema-constrained decoding vs prompting alone, and what to do when a provider doesn't support the former. Quiz 7 min
  4. 4. Testing prompts Why a prompt that 'looks right' twice isn't tested, temperature 0 doesn't mean deterministic, and how to build a minimal prompt test suite. Quiz 6 min
  5. 5. Cost and latency Where your token spend actually goes, streaming vs waiting for the full response, and the cheap wins before you reach for a smaller model. Quiz 6 min