A Tiny Eval Harness: How to Test an LLM App Before You Ship It A tutorial published on evals shows how to build a roughly 150-line LLM app test harness using only the Python standard library, following Anthropic's guidance that 20 to 50 simple cases drawn from real failures is a strong starting point. The harness runs several trials per case, combines code checks with LLM judges, reports scores with 95% intervals against a saved baseline, and gates a build when results fall below a minimum or show a clear regression. The approach draws on Anthropic's evals documentation and error-bars paper and the MT-Bench paper on LLM judges, with Braintrust, LangSmith, Langfuse and Arize Phoenix named as options once teams outgrow simple scripts. You change a prompt. You try three inputs. They look better. You ship. Two days later a different kind of question starts failing, and nobody can say whether it broke yesterday or was always broken. That's the problem evals solve. An eval is a test for an AI system: you give it an input, then apply grading logic to the output. Think of evals as unit tests for model behavior, with one twist. The output changes from run to run, so you measure rates instead of single results. You don't need a framework to start. Anthropic's guidance on evals notes that many teams roll their own or begin with simple scripts, and platforms like Braintrust, LangSmith, Langfuse and Arize Phoenix are there when you outgrow them. This post builds a harness of about 150 lines, using only the Python standard library. Sources: the approach follows Anthropic's docs and engineering posts on evals, Anthropic's paper on error bars for evals, and the MT-Bench paper on LLM judges. The model names are current at the time of writing, so check them before you copy. php flowchart LR A "cases.jsonl" -- B "Your app