Notes: Home. Announce the common thread: “Today, we are moving from “running a demo” to “running a system in production”. Three weapons: the diagram, the correct temperature setting, and above all the evaluations.”
Notes: Session contract. Insist on the lab: this is where everything crystallizes.
Notes: Question to the room: “Who has ever seen an LLM add text before JSON despite the instruction “ONLY JSON”?” Let the hands rise. It’s universal — and that’s the starting point.
Notes: Do the calculation on the board. Ask: “What patches have you tried already?” Note the answers (regex, retry, supplicate the model) — we dismantle them on the next slide.
Notes: Point of honesty: these patches *reduce* the failure rate. But reduce ≠ eliminate, and in prod we want to eliminate the entire error class.
Notes: The key concept: we no longer ask for “text that looks like JSON”, we physically prohibit any other token. Analogy: box form versus white sheet.
Notes: Dissect: `enum` → the model cannot invent “displacement”; `required` → guaranteed fields present. Golden rule to announce: everything that can be constrained in the diagram must be.
Notes: Pivotal slide of the session. Pause. The next slide gives the killer example.
Notes: DEMO: open the interactive page, “Schema Validator” tab, paste this JSON → the validator displays ✅. Guaranteed effect. Transition: “How do we catch what the diagram doesn’t see?”
Notes: Point out the subtlety: "moving" out of enum is a content error that the *schema* captures — a rich schema moves semantic errors to the impossible. Hence the importance of enums and `minimum`.
Notes: Three non-negotiable rules: (1) SPECIFIC feedback — “amount 402 is not shown anywhere in the document”, not “this is wrong, try again”; (2) attempt ceiling (2–3); (3) human climbing route. Infinite loop = infinite bill.
Notes: Mini quick oral exercise: “Give me 3 business rules for expense reports.” 2 minutes, answers on the board. Transition to the break then (depending on timing) or directly the temperature.
Notes: Resume on time. The second half is dense (temperature + tests + lab).
Notes: Diagram on the board if necessary: probability histogram which flattens as T rises. Do not open the top-p/top-k Pandora's box — mention their existence in one sentence, nothing more.
Notes: Sentence to be said word for word. Add the nuance of honesty: even at T = 0, absolute determinism is not guaranteed among all suppliers (GPU parallelism — Graphics Processing Unit, graphics processor —, model updates). “Quasi-deterministic” is the honest term.
Notes: Launch the demo. Question to the room: “What do you notice about the error at T = 0?” Expected response: she is there all 3 times. This is the myth destroyed visually.
Notes: Benchmarks, not dogmas — hence the ⚠. Transition: “You now know how to produce valid JSON, catch background errors, adjust variability. The question remains: how do YOU KNOW your system is working?”
Notes: Serious tone, deliberately. Everyone in the room has seen (or done) this before. Leave 5 seconds of silence after reading.
Notes: Most important slide of the session. Rephrase: “When you modify a prompt, what tells you that you haven't broken anything? If the answer is "I'm looking at two-three releases", you don't have a spec.”
Notes: Principle of the pyramid: each level filters for the next. Assertions rotate with each change; humans, on sample. Detail each floor in the following 3 slides.
Notes: Common objection: “500 examples, too much work.” Answer: start at 20, enrich with each bug. A living golden set beats a perfect golden set never built.
Notes: Common anti-pattern: deploy a judge and believe his figures without ever having confronted them with humans. The sentence in bold should be noted.
Notes: Full loop: the human corrects the judge, the judge monitors the golden set continuously, the golden set gates the deployments, the assertions keep each commit.
Notes: Emphasize “too low = suspicious”: an escalation rate that drops from 18% to 4% after a prompt change can mean that the model responds with confidence on cases that it misses. An isolated metric that suddenly improves is a warning, not a victory. (This is exercise 2.4.)
Notes: Run the live demo: launch v1, show failures (amount in letters, injection, empty string), launch v3, compare. This is the exact overview of the lab that follows.
Notes: Start exercise 3. Pairs. Require the v1 score BEFORE any improvement — this is the discipline of evaluation. Typical score v1: 4–6/10 ⚠; v3:9–10.
Notes: Have 3 different participants read the 3 sentences out loud. It anchors.
Notes: Distribute exit tickets (see teacher guide §5). Pick up before the exit — it's your own assessment: if the answers to ticket 3 (temperature) are wrong, the myth is not dead, resume in session 4.