Saraswati Stitch needle-and-thread markSaraswati Stitch®contact@saraswatistitch.com
← Glossary

Definition

Few-shot prompting

Few-shot prompting is giving a model a handful of worked examples inside the prompt so it follows the pattern, without any retraining.

Instead of explaining a task in the abstract, you show the model two or three examples of input and the output you want. It picks up the pattern from the examples, which is often far more reliable than instructions alone.

It is the cheapest way to make a model consistent at a specific task: no training, just good examples in the prompt. When few-shot is not enough, the next steps are a better system prompt or fine-tuning.

Related terms

  • Prompt engineering: Prompt engineering is the craft of writing the instructions, examples, and context you give a model so it produces reliable, correctly formatted output for a specific task.
  • Fine-tuning: Fine-tuning is further training a base model on your own examples so it learns a specific style, format, or task more reliably than prompting alone can achieve.
  • System prompt: A system prompt is the standing instruction given to a model before the conversation starts, setting its role, rules, tone, and the boundaries it must keep across every reply.