Skip to main content

COMPEL Glossary / few-shot-prompting

Few-shot prompting

A prompt pattern in which the prompt includes labeled examples demonstrating the desired input-output behavior before the real task.

What this means in practice

Leverages in-context learning; useful where the task format is non-standard or the model's default behavior deviates from what the operator needs. Example count is typically 1 to 10.

Synonyms

few-shot prompt pattern , in-context examples

See also

  • Zero-shot prompting — A prompt pattern in which the model receives only an instruction — no labeled examples of the desired input-output behavior.
  • Chain-of-thought (CoT) — A prompt pattern that elicits intermediate reasoning steps before the final answer — either zero-shot ("Let's think step by step") or few-shot with example reasoning chains.