Back to glossaryDefinition

Few-Shot Prompting

Few-shot prompting is providing an AI model with a small number of examples of the desired input-output pattern before asking it to perform the task on new input. Instead of just saying "classify this email as urgent or not urgent," you show it two or three examples of classified emails, then ask it to classify a new one. Few-shot prompting typically improves output quality significantly for tasks that require a specific format, style, or classification logic that isn't obvious from description alone.

It's one of the most practical techniques for improving AI output without any technical setup.