loading
loading
Providing 2-5 input-output examples in the prompt to teach a model a pattern.
Few-shot prompting guides the model by demonstration rather than description. Including examples of the exact format or reasoning style you want often outperforms long written instructions. The examples should be diverse and representative of edge cases, not just the happy path.
Plainly
Think of Few-shot as the brain part that guesses or decides. Providing 2-5 input-output examples in the prompt to teach a model a pattern.
In practice
Use it when model choice, prompts, latency, cost, or quality affect the product result. In practice, define the owner, input, output, and failure mode before you rely on it.