Few-Shot Prompting
Domain: Prompt Engineering
π― Motivation
Including several input-output examples in the prompt teaches the pattern. More examples = more accurate, but uses more tokens.
π Concrete Example
Prompt: βEnglish: Hello, French: Bonjour\nEnglish: Thank you, French: Merci\nEnglish: Goodbye, French: ___β The model fills in βAu revoirβ having learned the translation pattern from examples.
π Analogy
Flashcards before a test - you review several example problems (few-shot examples). When the test comes (new input), you apply the pattern you learned. More flashcards (shots) = better performance.