Skip to main content
BETAThis is a new design — give feedback

Few-Shot Learning

Also known as: Few-Shot Prompting, In-Context Learning

In one sentence

Teaching an AI model by including a few examples in your prompt, without any formal training—the model learns the pattern from the examples you show it.

Explain like I'm 12

Like showing someone three examples of what you want, and they figure out the pattern and do more just like it. You don't need to explain the rules—they just get it from the examples.

In context

Few-shot prompting is one of the most practical techniques for getting consistent results from AI. Instead of writing complex instructions, you provide two to five examples of the input-output pattern you want. For instance, to classify customer reviews as positive or negative, you'd include a few labelled examples in your prompt. The AI picks up the pattern and applies it to new inputs. This works for formatting, classification, translation, data extraction, and more. It sits between zero-shot (no examples) and fine-tuning (training on thousands of examples).

See also

Related Guides

Learn more about Few-Shot Learning in these guides: