Few-Shot Prompting uses several examples to show the AI what format or type of response you expect. This technique significantly improves results, especially for specific or complex tasks.
Text: "The service was fast and friendly"
Sentiment: Positive
Text: "The product arrived damaged"
Sentiment: Negative
Text: "The delivery was on time"
Sentiment: Neutral
Text: "I'm thrilled with the quality and price"
Sentiment:
Email: "When will my order be delivered?"
Category: Delivery inquiry
Email: "I want to cancel my order"
Category: Cancellation
Email: "The product has a defect"
Category: Complaint
Email: "Do you have this product in blue?"
Category:
✅ Good examples:
- Diverse and representative
- Clearly structured
- Error-free
❌ Bad examples:
- Too similar to each other
- Inconsistent format
- Contains errors
Text: "The food was cold"
Sentiment: Negative
Explanation: Cold food indicates poor quality
Text: "The price is fair"
Sentiment: Neutral
Explanation: "Fair" is neither particularly positive nor negative
Question: "If Peter has 3 apples and buys 2 more, how many does he have?"
Thought process: Peter starts with 3 apples. He buys 2 more. 3 + 2 = 5
Answer: 5 apples
Question: "Maria has 10€ and spends 4€. How much is left?"
Thought process: Maria starts with 10€. She spends 4€. 10 - 4 = 6
Answer: 6€