BuildMidAI engineeringAuto-graded
Write a prompt that extracts JSON from emails
Getting a reliable, checked result out of a language model on messy input is what this measures.Build a prompt that reliably pulls structured data out of messy customer-support emails. Reliability is the whole problem: the emails are inconsistent, and a prompt that works on three examples will fail on the fourth. You need a schema the model is told to honour, examples that show it the shape, validation of what comes back, and a retry path for when the output is unusable.30 min
prompting
You're done when
- The prompt uses a system prompt to establish the model's role and constraints.
- The target schema is stated explicitly in the prompt.
- Examples are included so the model can see the expected shape.
- The returned JSON is validated rather than trusted.
- Output that fails validation triggers a retry instead of propagating downstream.
- Structural delimiters separate instructions from the email content.
What it measures
Prompt engineeringConstructing a prompt whose reliability comes from its structure rather than from careful wording alone.
Generative AITreating model output as untrusted — validated, retried, and only then used.
Designing for the bad outputPlanning for the case where the model returns something unusable, which is what separates a demo prompt from a production one.
Your environment
Terminal + editorA full shell in the browser
Claude CodePre-authenticated, no key setup
Isolated microVMYours alone, wiped afterwards
Start this lab
30 min
Start labYou'll sign in to Anthropos to start. The lab opens in a private cloud workspace with Claude Code ready to use.AI Labs is part of Anthropos Workforce. Not on your plan yet? Book a demo