Prompt Engineering Fundamentals: Write Instructions Models Follow
by Laura Mbeki
Get valid JSON on the first attempt, and handle the cases where you still will not.
LM Created by Laura Mbeki
Every bullet below is something you will have built, shipped or be able to explain by the time you finish the last lesson.
5 modules · 24 lessons · 3h 15m of material
4 lessons running 30m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
5 lessons running 40m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
5 lessons running 42m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
5 lessons running 44m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
5 lessons running 39m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
5 modules · 24 lessons
3h 15m total length
Short list, and deliberately so. If you meet these you can start today.
The moment a model output feeds a parser instead of a person, prose becomes a liability. This course is about the boundary where a language model meets typed code, and how to make that boundary boring.
You begin with schema design, which is where most structured output problems are really created. Fields named after what they mean, enums instead of free strings, required rather than optional wherever you can defend it, and a deliberate representation for the answer being unknown. Then you work through the provider mechanisms: structured output modes, JSON schema constraints, tool definitions used purely for shape, and what each one actually guarantees rather than what the marketing implies.
The middle of the course is failure handling. Truncated responses at the token limit, values that satisfy the schema but are semantically wrong, hallucinated enum members, numbers arriving as strings, and the retry strategy that repairs rather than repeats. You build a small validation layer in TypeScript with Zod and a Python equivalent with Pydantic, then wire both into a request path with typed errors, bounded retries and a logged rejection trail.
By the end you have an extraction service that turns messy documents into typed records and refuses loudly when it cannot. Access arrives by email as a library link immediately after checkout.
Still unsure about something? Write to misteryjj100@gmail.com and a human answers, usually the same working day.
Reviews are written by people who bought this course. We publish the critical ones too.
5.0
Rated 5.0 out of 5Course rating · 2 reviews
Antoine Lefèvre
Backend engineer
Our extraction service used to retry until either it worked or the bill got frightening. The repair-then-retry pattern with a hard ceiling gave us a predictable cost and a sensible failure path. Straightforwardly better engineering than what we had before.
Hana Novotná
Software engineer
It turned out most of our invalid output was our own fault for asking for deeply nested optional unions. Flattening the schema, as suggested here, cut the failure rate further than any amount of retry logic ever did.
Prompt engineer and AI workflow designer
Laura went independent after seven years of agency work and now designs the prompt libraries that sit behind other people's products. She treats prompting as engineering: versioned prompts, a held-out evaluation set, a regression run before anything ships, and a token budget you have to hit. Her packs are the ones she uses with her own clients — briefing, rewriting, summarising, review — rather than sanitised examples, and each comes with notes on where it fails. She keeps every pack working across ChatGPT, Claude and a small open model, so the technique outlives the model.
One-time payment · lifetime access