principles.fyi · the brain · concept
few-shot
Showing the model a handful of examples in the prompt before asking it to do the task.
ex1 -> out1, ex2 -> out2, ..., new input -> ?
Few-shot prompting includes a small number of worked input-output examples right in the prompt, then gives a fresh input for the model to complete in the same pattern. No weights change — the model is just conditioning on the demonstrations and continuing the pattern, which is in-context learning at work. It often beats zero-shot on tricky or unusual formats because the examples pin down exactly what a good answer looks like. The 'shot' count is how many examples you show (e.g. 3-shot = three examples).
Appears in
- Talking to it — prompting LLMs in the Wild · pt 2