Loading
Loading
Zero-Shot Prompting means asking the model to perform a task directly without any prior examples.
You trust that the model understands the task from its description alone.
Example: "Classify this review as Positive, Negative, or Neutral: 'The product was fine but delivery was late'"
This is zero-shot because you gave no classification examples.
Few-Shot Prompting means providing several examples of the desired input/output format before the actual task.
The examples teach the model the "template" you want.
Example:
Classify the following reviews:
Review: "Excellent quality, fair price"
Classification: Positive
Review: "Order never arrived, terrible service"
Classification: Negative
Review: "Product is average, no strong feelings either way"
Classification: Neutral
Now classify:
Review: "The product was fine but delivery was late"
Classification:
| Situation | Best choice | Reason | |-----------|-------------|--------| | Common, clear task | Zero-Shot | Model understands without examples | | You want a specific style/format | Few-Shot | Examples teach the pattern | | Unexpected or wrong output | Few-Shot | Examples correct the direction | | Task unique to your project | Few-Shot | Model may not have learned this pattern |
More isn't always better — quality of examples matters more than quantity.
Choose examples that cover edge cases, not just obvious ones. If your task is "sentiment classification," include a sarcastic or ambiguous example so the model knows how to handle it.