Week 1 · Day 2 of 10
Prompting as engineering
Students can write, version and test prompts, and get typed JSON out of a model that the app can trust.
1LearnSystem prompts and typed output
System prompts, few-shot examples, prompt templates kept in Git, structured output validated with Pydantic models, and the usual reasons a model gets it wrong.
How messy text becomes data you can trust
- Messy text
Try it live
Try it live
Messy text in, typed JSON out
Paste any job post. The model has to return JSON that matches a schema, and it's validated before you see it.
Check your understanding
Why validate the model's JSON with a Pydantic model before using it?
What are few-shot examples best used for?
Why keep prompts in Git like code?
2BuildTurn messy text into typed JSON
Watch Robert add it to the app first, one short clip per step, then do each step yourself: messy job posts go in, typed JSON the app can trust comes out.
Done when: messy text goes in and clean, checked data comes out.
1 Write system prompt v1
⌃XSave and close the editor: press Control X, then Y, then Return
Done when prompts/extract.md is committed in Git.
2 Give your agent the spec
Done when main.py has a POST /extract route.
3 Run it on messy text
Done when a messy job post comes back as clean, typed fields.
4 Break it, then fix it
Done when the hourly job post comes back with yearly pay, and prompt v2 is committed.
5 Push to deploy
Done when /extract works on your public link. If Vercel says the deploy is blocked, the email on your commits must match your Vercel account.
3CapstoneSystem prompt v1, versioned
System prompt v1, committed and versioned.
4HomeworkBreak your extractor, then fix it
Break your own extractor with ten hard inputs, then fix it.
For teachers: the day 2 teaching kit.