What is "few-shot prompting" and when should I use it?

Few-shot prompting means giving 2-5 examples before your actual request. Format: "Example 1: [input] -> [output]. Example 2: [input] -> [output]. Now do this: [your input]". The model learns the pattern from examples.

When to use this

When you need a specific output format or style the model doesn't default to.

When to skip this

For tasks where the model already understands what you want from the instruction alone.

Quick Win
Extracted: 2024-01-31 Verified: 2024-02-01