๐Ÿš€ Everything is free โ€” help us improve! Submit feedback and shape the platform.
๐ŸงชTDD Challengeยทintermediateยทโฑ๏ธ 30โ€“45mยทโญ 200 XP

M-019Multi-Shot Data Extractor

Description

Nebula Corp's sales team receives hundreds of inquiry emails daily. They need to extract key information: company name, contact person, budget range, and urgency level. The current zero-shot extractor misses fields and formats data inconsistently. Build a 4-shot prompt that demonstrates how to extract structured data from messy emails, handle missing fields gracefully, and classify urgency based on keywords. The examples must cover: complete data, missing fields, urgent request, and ambiguous budget.

Test Cases (7)

Defines JSON schema
Must define the complete JSON schema with all required fields
Input:"Hi from ABC Inc, budget $5k"
Expected:CONTAINS_ALL:company,contact,budget,urgency
Contains 4 examples
Should have 4 example emails plus the target email (5 total 'Email:' occurrences)
Input:"Need pricing info"
Expected:COUNT:Email::5
Shows null handling
At least one example should demonstrate using null for missing fields
Input:"Interested in your product"
Expected:CONTAINS:null
Demonstrates urgency classification
Examples should show all three urgency levels
Input:"URGENT: need solution now"
Expected:CONTAINS_ALL:high,medium,low
Includes urgency keywords rule
Must specify keywords that trigger high urgency classification
Input:"Please respond ASAP"
Expected:CONTAINS_ANY:urgent,ASAP,immediately
Includes target email
The prompt must include the actual email to extract from
Input:"Hello from XYZ Corp, budget is $20k, need this urgently"
Expected:CONTAINS:Hello from XYZ Corp, budget is $20k, need this urgently
Examples show diversity
Examples should use different company names to show variety
Input:"Contact me at john@test.com"
Expected:CONTAINS_ANY:Acme,TechStart,Corp,Inc

Related Lessons

Click Run / Check to validate your solution