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

M-021Build a Schema-Validated Data Extractor

Description

Nebula Corp's data pipeline receives unstructured text (emails, support tickets, reviews) and needs to extract structured data reliably. Build a schema-validated extractor that defines output schemas, validates LLM responses against them, retries on validation failure with error feedback, and handles nested objects and arrays.

Test Cases (3)

Catches invalid enum value
Should reject values not in the enum list
Input:testValidation()
Expected:CONTAINS:not in allowed
Retry self-corrects
Should succeed on retry when LLM self-corrects
Input:testRetrySuccess()
Expected:CONTAINS:true
Catches missing required field
Should flag missing required fields
Input:testRequiredField()
Expected:CONTAINS:missing

Related Lessons

Click Run / Check to validate your solution