Pytest for LLMs: write eval cases as unit tests with metrics like relevancy, faithfulness, and hallucination, then run them in CI.
What it is
DeepEval, by Confident AI, is "Pytest for LLMs." You write eval cases as unit tests and attach metrics: answer relevancy, faithfulness, hallucination, task completion, and a dozen more. Because the cases look like the tests your team already writes, they drop straight into an existing suite and run in CI. It covers both component-level metrics and end-to-end task metrics.
The one job
It reframes evals as something engineers already know how to run and gate. An assertion either passes its metric threshold or fails the test, and the CI job goes red.
Reach for it when
Skip it when
The principle it teaches
Evals as tests, in CI. Regression detection is the deliverable of Lab 5, and DeepEval gets there by making evals indistinguishable from the unit tests already gating your merges. That is Session 9, expressed in a runner your team already trusts.
Where it fits your labs
This is a Week 5 tool. If your stack leans Python, DeepEval is the natural home for the Lab 5 eval suite: cases as tests, metrics as thresholds, failures as red builds.