← Glossary AI

Few-Shot Prompting

Teaching the AI a task by showing it a handful of examples, right in the prompt.

Explained simply.

Instead of describing what you want, you SHOW the AI what you want. You put 2-5 examples of the input-output pattern at the start of your prompt, then ask it to continue the pattern for a new input. The model picks up the shape, style, and rules from your examples without any training.

An example.

Prompt: Input: 'The product was great' Output: Positive Input: 'Never buying again' Output: Negative Input: 'It arrived late but worked fine' Output: ? The model answers 'Mixed' because you showed it the format.

Why it matters.

Few-shot is a superpower for edge cases and domain-specific outputs. When a plain description isn't enough, examples fix it fast. No code, no training - just add a few sample inputs and outputs to the prompt.