Home / AI Glossary / Few-shot learning
Few-shot learning: complete definition in AI for SMEs
- Term:
- Few-shot learning
Few-shot learning is the technique of providing the language model with a few concrete examples (2 to 5) of the expected task directly in the prompt, to show it the desired pattern and format. It is the intermediate step between zero-shot (no examples) and fine-tuning (training the model on a large volume of data). The model learns "on the fly" without modifying its parameters.
What it changes for an SME
Few-shot learning offers the best cost-quality ratio for a majority of SME use cases:
- Structured extraction: show 3 annotated invoices → the LLM extracts the same fields from the following ones;
- Writing: give 2 emails that worked well → the LLM writes a third with the same tone;
- Classification: provide 5 tickets with their category → the LLM classifies the next ones automatically.
The cost is minimal (a few extra tokens for examples) and the quality gain is significant compared to zero-shot.
Best practice
Always start with zero-shot. If the result is approximate, add 2-3 examples. If it still is not enough, add 2-3 more. Few-shot is a rapid iteration tool: test, tune, document. The best examples come from your own activity — not generic ones.
Related terms
Go further
- 1
Prompt Engineering: How to Tame Verbose Opus 5
Read the blog article
- 2
10 Skills to Make Your AI Agent 100x More Powerful
Read the blog article