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

M-005One-Shot Email Categorizer

Description

Nebula Corp's support inbox is overflowing. They need an automated triage system that categorizes incoming emails into Billing, Technical, or General using a one-shot prompt. The current function doesn't use any examples and the model keeps returning inconsistent labels. Build a prompt constructor that uses exactly one well-chosen example to teach the model the expected format, and handles any email topic.

Test Cases (5)

Lists all three categories
The prompt must mention all three valid categories so the model knows the options
Input:"My app keeps crashing on startup"
Expected:CONTAINS_ALL:Billing,Technical,General
Contains exactly one example
The prompt should include one example to demonstrate the expected format
Input:"My app keeps crashing on startup"
Expected:CONTAINS:Example
Includes the target email
The prompt must include the actual email to categorize
Input:"My app keeps crashing on startup"
Expected:CONTAINS:My app keeps crashing on startup
Constrains output to label only
The prompt should instruct the model to respond with just the category label
Input:"Can I get a refund?"
Expected:CONTAINS_ANY:only the category,only the label,Respond with only,one category
Ends with completion cue
The prompt should end with 'Category:' for the model to complete
Input:"Hello, just checking in"
Expected:CONTAINS:Category:

Related Lessons

Click Run / Check to validate your solution