The Task
Your support team receives hundreds of emails daily. You need to extract structured data: customer name, product, issue type, and urgency (low/medium/high). This feeds into a Jira ticket creation pipeline.
Zero-Shot Attempt
Prompt: “Extract the customer name, product, issue, and urgency from this email: [email text]”
Output:
The customer is John Martinez. He’s having trouble with the Analytics Dashboard — specifically, the real-time charts aren’t updating. This seems moderately urgent since it’s affecting their daily standups.
Problem: Prose format. No structured fields. “moderately urgent” instead of “medium”. Can’t parse this.
Two-Shot Prompt
Extract structured data from support emails.
Follow the exact format shown.
Example 1:
Email: "Hi, this is Lisa Chen. Our team
relies on the Reporting Module for weekly
client updates, but PDF exports have been
broken since Tuesday. This is blocking our
Friday deliverable."
---
name: Lisa Chen
product: Reporting Module
issue: PDF export broken since Tuesday
urgency: high
Example 2:
Email: "Hey, Mike here from Acme Corp. Just
noticed the dark mode toggle in Settings
doesn't save the preference. Minor thing but
it resets every time I log in."
---
name: Mike (Acme Corp)
product: Settings
issue: Dark mode preference not persisting
urgency: low
Now extract:
Email: "This is John Martinez. The real-time
charts on our Analytics Dashboard stopped
updating about 2 hours ago. Our team uses
this for daily standups at 9am — we need
this fixed before tomorrow morning."
---
Model Output
name: John Martinez
product: Analytics Dashboard
issue: Real-time charts stopped updating
urgency: high
Key insight: The examples taught the model five things without a single explicit instruction: (1) use the “---” separator, (2) use lowercase field names, (3) keep issue descriptions concise, (4) map urgency to exactly low/medium/high, (5) include company name in parentheses when available. Show, don’t tell.