🧠 Vivid Story · Prompt Engineering
FEW-SHOT = Showing the model 3 EXAMPLES before asking your question — it gets the pattern
Zero-shot vs Few-shot prompting
Z
Zero-shot — no examples, relying on training alone
Zero-shot prompting asks the question with no examples at all, relying purely on the model's training to produce an appropriate response.
Example: asking "Translate this sentence to French" directly, with no example translations shown beforehand.
O
One-shot — a single example first
One-shot prompting provides exactly one example before asking the actual question, giving the model at least one concrete demonstration of the desired pattern.
Example: showing one example translation before asking the model to translate a new sentence, giving it a single concrete reference point.
F
Few-shot — 2-5 examples for a clear pattern
Few-shot prompting provides 2-5 examples that demonstrate the specific format and style desired, with more examples generally producing a clearer pattern and better results for specific formats — though too many examples can waste context window space.
Example: showing 4 example translations, each demonstrating a specific desired tone and format, before asking the model to translate a new sentence in that same consistent style.
R
Rule of thumb — try zero-shot first
The recommended approach is to try zero-shot first, only adding examples if output quality proves poor — few-shot is especially powerful specifically for classification, translation, and structured output tasks.
Example: first trying a zero-shot prompt for a classification task, and only adding a handful of few-shot examples if the zero-shot results turn out to be inconsistent or poorly formatted.
1
A developer needs an LLM to classify customer feedback into specific categories with a very particular, consistent output format.
2
They first try zero-shot prompting, simply describing the task and desired categories directly, but find the output format is somewhat inconsistent across different inputs.
3
Following the recommended rule of thumb, they add few-shot examples (2-5 example feedback entries with their correct classifications) demonstrating the exact desired format.
4
This significantly improves output consistency, since few-shot prompting is specifically powerful for classification and structured output tasks like this one, giving the model a much clearer pattern than the zero-shot description alone provided.

Exams test whether you can distinguish zero-shot, one-shot, and few-shot prompting by their number of examples, and whether you know the recommended rule of thumb (try zero-shot first, add examples if quality is poor) along with the specific tasks (classification, translation, structured output) where few-shot is especially powerful.

The most common trap is assuming more examples are always strictly better. While more examples generally produce a clearer pattern, too many examples can waste valuable context window space — the recommended approach is starting with zero-shot and adding just enough examples to fix quality issues, not maximizing example count indiscriminately.

1. What does zero-shot prompting involve?
Asking the question with no examples at all, relying purely on the model's training.
Tap to reveal / hide
2. What does one-shot prompting involve?
Providing exactly one example before asking the actual question.
Tap to reveal / hide
3. How many examples does few-shot prompting typically involve?
2 to 5 examples.
Tap to reveal / hide
4. What is the recommended rule of thumb for deciding how many examples to use?
Try zero-shot first, and add examples only if output quality proves poor.
Tap to reveal / hide
5. Name three task types where few-shot prompting is especially powerful.
Classification, translation, and structured outputs.
Tap to reveal / hide