Mid-level Track Roadmap

AI prompting: few-shot

This course covers few-shot prompting: showing a model examples of the mapping you want instead of describing it. It starts with when examples work better than instructions and what they cost in tokens. It then covers how to build a consistent example set, how many examples to use, and how to choose them with fixed sets or dynamic vector search. Later lessons cover majority label, recency and common token biases, structured outputs that replace formatting examples, storing examples as data in Rails, and evaluation that keeps prompts from decaying.

What you'll learn

  • ✓When examples work better than instructions, and their token cost
  • ✓How to build a consistent example set that covers the decision boundary
  • ✓How many examples to use, and fixed versus dynamic selection
  • ✓How to detect and reduce majority label, recency and common token biases
  • ✓When a JSON schema or strict tool definition replaces formatting examples
  • ✓How to store, test and evaluate example sets in a Rails app
Free preview · Lesson 1 4 min read

When examples beat instructions

You need every incoming support message classified as bug, billing, feature_request or other. You write the instruction carefully:

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...