Submit a Story

Glossary term

Few-Shot Prompting

Updated Oct 17, 2026

In short

A prompting technique that includes a small number of examples to demonstrate the task or response pattern expected from a model.

Few-shot prompting gives a model examples of input-output pairs in the prompt. The examples can clarify labels, tone, formatting or how to handle borderline cases without updating the model’s weights. This is often useful when instructions alone leave too much room for interpretation.

To classify support messages, you might show three examples each of billing, bug report and feature request, plus one tricky edge case with the correct label. Order and wording can influence results, so keep the examples varied and in a consistent format. When examples start to dominate the prompt, consider model fine-tuning instead.

Examples should be representative, consistent and free of private data that should not be sent to the model. Too many examples consume context and may bias the model toward irrelevant patterns. Related: Zero-Shot Prompting, Prompt Template.