The Eval Mindset: Why You Can't Ship Without a Measurement Loop
Lesson 1: The Eval Mindset โ Why You Can't Ship Without a Measurement Loop
Imagine shipping a REST API with no tests, no CI, and no staging environment โ and discovering at 2 a.m. that version 2 returns different data for the same request than version 1 did, with no warning and no way to reproduce why. That is exactly how most teams ship LLM applications today. The model is non-deterministic, the prompt is a piece of code nobody versioned, and the "test suite" is whatever the developer happened to try in the playground. This course exists to fix that. The fix is called eval-driven development, and it starts with a mindset shift.
Why LLM Apps Are Different
Traditional software is deterministic: the same input produces the same output, and the compiler catches type errors. LLM applications are probabilistic โ the same prompt can produce wildly different outputs across runs, models, and even temperature settings. Worse, the "logic" lives in natural language, which has no type checker and no compiler. When something breaks, there is no stack trace; there is a plausible-sounding wrong answer.
In 2017, Andrej Karpathy published Software 2.0, arguing that neural networks are a new kind of programming: instead of writing code that specifies behavior, you specify goals and data, and the network learns the behavior. The consequence he drew, and which the industry has spent years internalizing, is that the dataset is the code. Your golden evaluation set is your source of truth โ it is what you edit, version, and review when you want to change behavior. If you don't have one, you are programming blind.
Evals Are Regression Tests
Here is the mental model that makes everything else click:
| Traditional software | LLM application |
|---|---|
| Unit tests | Golden eval dataset (representative inputs + expected behavior) |
| Assertions | Evaluators (exact match, rubric, LLM-as-judge, tool checks) |
| CI pipeline | Eval experiment run on every change (LangSmith, CI jobs) |
| Test coverage | Dataset coverage of intents, edge cases, and failure modes |
| Code review | Diffing eval scores between prompt/model versions |
| Production monitoring | Online evals, tracing, drift detection |
Once you see it this way, every question about "how many evals do I need" and "which model should I pick" becomes answerable with the same tooling you already use for software quality โ just adapted for probability.
The Eval-Driven Development Loop
The loop is deliberately boring. Define a dataset that represents what users actually ask and what "good" means. Run your system against it and score it. Compare against the last version. If scores dropped or a threshold failed, fix and re-run. Every change โ a prompt edit, a model swap, a new retriever, a guardrail โ goes through the same loop. That boring loop is what makes the difference between teams that can iterate quickly and teams that are afraid to touch the prompt.
Vocabulary You'll Need
Five terms carry the whole discipline:
- Dataset โ a versioned collection of input examples, optionally with expected outputs or reference answers. Your unit tests.
- Run / Experiment โ one execution of your app against the dataset, producing outputs for every example.
- Evaluator โ a function that scores an output: exact match, rubric, LLM-as-judge, or a programmatic check.
- Score โ the per-example and aggregate result, e.g. correctness 0.93.
- Threshold / Gate โ the pass/fail line that decides whether a change ships (e.g. no correctness regression allowed, zero adversarial-set failures).
๐ง Knowledge Check
1. What is the strongest reason LLM applications need a dedicated evaluation discipline?
2. In the "evals are regression tests" mental model, what plays the role of a CI pipeline?
3. Which of the following is the correct eval-driven development loop order?