QamoosTech
AI & DataIntermediate

Few-shot Prompting

PronunciationFYOO-shot PROM-pt-ing

Definition

Providing a few examples within the prompt to guide the LLM toward a specific output format or behavior.

Where you hear it

When tuning model outputs, writing system prompts, or improving accuracy without retraining.

Examples

  • We used few-shot prompting to teach the model how to format JSON responses.
  • Adding three classification examples via few-shot prompting fixed the incorrect category outputs.

Common mistake

Assuming you need dozens of examples, when usually two to five well-chosen examples are enough for the model to understand the pattern.