What is Few-Shot Learning?

Few-Shot Learning — Training an AI model to perform a task by providing only a small number of examples in the prompt.

In few-shot learning, you provide 2-5 examples of the desired input-output pairs directly in the prompt. The model uses these examples to understand the pattern and apply it to new inputs. It requires no training — just well-chosen examples.

Frequently Asked Questions

How many examples should I provide?

Typically 2-5 examples. More examples improve consistency but consume context window tokens. Choose examples that cover edge cases and variations.

How is few-shot different from fine-tuning?

Few-shot learning happens at inference time through the prompt — no training required. Fine-tuning permanently modifies the model’s weights through additional training on your dataset.

When does few-shot learning fail?

It struggles with highly complex tasks, very specific formatting requirements, or when the desired behavior is fundamentally different from the model’s training. In these cases, fine-tuning is more reliable.

← Back to Glossary

Enterprise Diagnostics

Where does your
organization stand?

Take our comprehensive 5-minute readiness assessment to uncover critical gaps across Strategy, Data, Infrastructure, Governance, and Workforce.