What is few shot prompting?

Definition

The examples pair representative inputs with good outputs or demonstrate a procedure. The model uses the examples as context when answering a new input, without updating its trained parameters.

Examples can teach format, tone or decision criteria that are difficult to specify in a single instruction. Testing new cases helps reveal when the examples are too narrow or accidentally introduce a misleading pattern.

ELI5

For example, you could show a model three long event notices paired with short summaries. Then give it a new notice and ask for a summary in the same style.

Choose examples that cover different kinds of notices. A single pattern can give the model the wrong idea about what to keep.

How many examples count as few-shot?

There is no fixed number. The term describes a small set of examples, with the practical number depending on the task and available context.

Is few-shot prompting the same as fine-tuning?

Few-shot prompting provides examples as input for a model call. Fine-tuning updates the model's parameters through training.

  1. Rachel Lee Nabors in a blue T-shirt beside the white and blue words Small Local Models on black.
Definition card for few shot prompting: What is few shot prompting?

Few-shot prompting gives an AI model a small number of examples in the prompt to show the kind of response expected.