Zero-shot: instruction only. Works for common tasks the model has seen many times.
Few-shot: 2–5 input→output examples before the real task. The model learns your exact pattern — format, vocabulary, edge cases — without any code. Often the highest-leverage technique available without engineering.
Classify each support ticket. Return only the label — one word, lowercase. Categories: bug, feature_request, question, billing
Examples: Ticket: "When I click Save on the profile page, nothing happens — old data stays." Label: bug
Ticket: "Could you add the ability to export to Excel? I only see CSV." Label: feature_request
Ticket: "What's the difference between the Pro plan and the Team plan?" Label: question
Ticket: "I cancelled my subscription but I'm still being charged monthly." Label: billing
Ticket: "The CSV export doesn't include the date column even though it's visible in the table." Label:
Extract structured data from job postings. Return only valid JSON — no markdown, no explanation.
Example 1: Input: "Stripe hiring Senior Backend Engineer, remote-first, $180-220k. 5+ years Go required. Payments experience a plus." Output: {"company":"Stripe","title":"Senior Backend Engineer","remote":true,"salary_min":180000,"salary_max":220000,"currency":"USD","required":["5+ years Go"],"nice_to_have":["payments experience"]}
Example 2: Input: "Shopify needs Product Designer, Toronto hybrid, CAD 110-140k. Figma + user research required. Motion design a nice-to-have." Output: {"company":"Shopify","title":"Product Designer","remote":false,"location":"Toronto","salary_min":110000,"salary_max":140000,"currency":"CAD","required":["Figma","user research"],"nice_to_have":["motion design"]}
Now extract: Input: "Anthropic hiring ML Research Engineer, SF or remote. $200-280k. PhD or 3+ yrs research required. LLM fine-tuning strongly preferred."
Claude handles XML-wrapped few-shot: ....... Very reliable for structured extraction.