Implementing Production-Ready LLM Evaluations for AI-Generated Lesson Plans

Lucas Machado Rocha, Hamel Husain17 Jul 2026

Problem

Nova Escola, a Brazilian nonprofit, runs a WhatsApp assistant that generates lesson plans for public school teachers. Plan quality is subjective and teachers do not cross-check: asked for a fifth-grade fractions lesson, the bot invented curriculum skill codes that did not exist. The first evaluation was one manual spreadsheet; a six-person tech team could not build evals for every failure.

Solution in brief

Build three layers: trace observability, a natural-language interface to traces, and packaged evaluation skills. Run error analysis first, label only persistent failures, and calibrate each LLM judge against expert labels using the true positive rate (TPR, the share of human-labeled positives the judge also marks positive) and the true negative rate (TNR, the same for negatives). Calibrated judges then gate pull requests and score a daily production sample.

Questions this case answers
  • How to calibrate an automated judge against subjective human labels when the annotators disagree with each other
  • How to turn a calibrated judge into a regression gate for every release and a drift monitor on sampled production output
  • How to let non-engineer domain experts run the evaluation loop without data-extraction tickets
  • How to calibrate an LLM judge against human labels before trusting its scores?

Tools and methods

  • Langfuse — traces, per-failure-mode datasets, prompts, annotation notes
  • Claude Code / Cowork with skills and MCP — lets staff query traces and run the calibration loop, using Hamel Husain's evals skills
  • LLM-as-a-judge — one judge per failure mode, checked by TPR and TNR on a held-out split
  • Inter-annotator agreement — per-criterion check that exposes an unclear rubric
  • CI gate and production sample — judges run on pull requests and daily samples
  • LangGraph — framework of the existing chatbot agent (being compared with Anthropic managed agents)
Continue reading — it's free

Google or a one-time email code. No password.