Learn Everything

Paths/AI Engineer/Prompt Engineering / Few-Shot Examples & Context Budget

Practice Taskintermediateubuntu:24.04Ask AI

Write Few-Shot Examples

Three good examples beat three paragraphs of instructions. Write a support prompt that demonstrates the tone, the format and the edge case you care about.

Validator

⏱ 0:00

IDLE — checks run live as you type commands; submit when done

01Requirements

live checks
  • Directory ~/prompts exists○
  • File ~/prompts/support-fewshot.md exists○
  • The file contains three labelled examples○
  • Every example states the input and the expected output○

02Walkthrough

1 of 6 revealed
  1. 01

    Create the prompts directory

    Prompts are code - they are versioned, reviewed and tested like code.

    mkdir ~/prompts
  2. 5 locked · each failed submit reveals one

03Stuck?

0 of 3 revealed

Take a hint without losing the lab — each one points at the thing to look at, not at the answer.

04AI Tutor

guides, never solves

Tell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?

04Notebook

saved locally in this browser

learner@lab — ubuntu:24.04

↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list