Few-shot Prompting
Teach by example: guide the AI with concrete examples.
Instructions
Few-shot prompting involves providing a few examples of expected inputs and outputs so the AI understands the pattern to follow. It's like showing an employee how to fill out a form by giving them 3 already-completed forms. This technique is particularly effective for classification tasks, text transformation, and any case where the output format is specific and non-standard. In this exercise, you'll use examples to teach the AI to classify customer support tickets into the right categories.
Your prompt
Use few-shot prompting to teach the AI to classify customer support tickets. Your prompt must: 1. **Define the categories**: Bug, Feature Request, Billing, General Question 2. **Provide 3 complete examples**: for each example, show the ticket (customer text) and the expected classification (category + urgency level + 1-sentence justification) 3. **Ask for classification of 2 new tickets**: - "I was charged twice this month for my premium subscription" - "It would be great if we could export reports as PDF" 4. **Require the same format** as the examples for the responses
Examples — click to pre-fill: