Prompting

Few-shot learning

Few-shot learning uses a small number of examples in the prompt.

Quick definition

Few-shot learning uses a small number of examples in the prompt.

  • Category: Prompting
  • Focus: control and response quality
  • Used in: Standardizing responses with templates and clear instructions.

What it means

Examples teach the model the desired format or behavior. In prompting workflows, few-shot learning often shapes control and response quality.

How it works

Prompting structures the instructions, context, and examples the model sees. Small changes in wording and format can shift output quality.

Why it matters

Prompting controls behavior, format, and response quality.

Common use cases

  • Standardizing responses with templates and clear instructions.
  • Improving quality with few-shot examples.
  • Constraining format for JSON, tables, or checklists.

Example

Show 2 labeled examples before asking for a new one.

Pitfalls and tips

Overly long prompts dilute key instructions and waste tokens. Keep prompts concise and explicit.

In BoltAI

In BoltAI, you will see this in prompts, system instructions, and templates.