Few-shot Learning
Few-shot learning is the ability of an AI model to perform a new task correctly after seeing only a handful of examples — sometimes as few as two or three. It is how modern language models adapt to specific formats, tones, or business rules without full retraining.
What is Few-shot Learning?
Traditional machine learning requires large labelled datasets — thousands or tens of thousands of examples — before a model can reliably perform a task. Few-shot learning breaks this constraint. By showing a large pre-trained model just a few examples of the desired input-output pattern, the model can infer the task and generalise correctly to new inputs it has never seen.
In practice, few-shot learning often happens entirely within the prompt. You provide two or three examples of what a correct extraction or classification looks like, and the model applies the same logic to the next item. No retraining, no dataset preparation, no infrastructure overhead.
How Few-shot Learning Works
The underlying mechanism is the model's ability to recognise patterns across context. A large language model trained on vast amounts of text has implicitly learned many task types. When you show it examples, you are not teaching it something new — you are activating and focusing the pattern-matching capabilities it already has.
Zero-shot: No examples provided — just an instruction. Works for simple, well-defined tasks.
One-shot: A single example. Useful for establishing format or output structure.
Few-shot: Two to five examples. The practical sweet spot for most operational tasks — enough to establish the pattern without bloating the prompt.
Few-shot Learning in Operations
Few-shot learning is particularly valuable when you need to adapt an AI agent to a specific company's document formats, naming conventions, or business rules without running a full fine-tuning project. A wholesaler with a non-standard purchase order format can show the agent three examples of correctly extracted fields and get reliable extraction immediately. A manufacturer with bespoke exception categories can provide sample cases and have the agent classify new exceptions to match. This is how operational AI can be deployed fast — not by building from scratch, but by teaching through examples.