What is few-shot learning?
Teach a kid to recognize a bird and you only need to point at a couple of pictures and say "that's a bird" — they'll spot new birds soon enough. Few-shot learning is the same idea: give a model a handful of examples and it generalizes, jumping into a new task with zero retraining.How is it different from traditional training?
Traditional training wants tons of dataLearning a new task used to mean thousands of samples and a big chunk of compute to retrain.
Few-shot only needs a few examples
Stick a few examples in the prompt and the model "learns" on the spot — cheaper, faster, easier.
Why do examples work so well?
A large model has already seen countless patterns in its training data. Examples aren't teaching it from scratch — they're reminding it which pattern to use this time and what format to output. The closer your examples are to the target, the better the model lines up.Few-shot vs zero-shot
Zero-shotNo examples at all, just instructions — great for simple or common tasks.
Few-shot
A few hand-picked examples — better for tricky formats and fuzzy standards, and usually more reliable.
Tips that matter
Pick representative examplesChoose ones close to the target output and cover the edge cases.
Keep the format consistent
Uniform input/output structure makes the model far more likely to follow it.
Don't overdo it
Two to five examples is usually plenty; more dilutes the point and burns tokens.
Bottom line: few-shot learning is "show a few examples and let the model copy the pattern."
Comments