Evals & LLM-as-judge
Golden sets, retrieval metrics (hit rate, MRR), faithfulness/relevance scoring, judge-model pitfalls. "How do you know it got better?" ends most LLM interviews.
The mental model
Evals are unit tests for a probabilistic system. The analogy: shipping an LLM feature without evals is like refactoring a codebase with no test suite — every change *feels* fine, demos great on the three examples you tried, and you discover the regressions from your users. The difference from ordinary tests is that outputs aren't exactly checkable — "is this summary faithful?" has no assertEquals — so the eval discipline is about building approximations of judgment that are cheap enough to run on every change: golden sets, programmatic checks, and LLM-as-judge scoring calibrated against humans.
Why this exists: LLM systems have an unusually cruel property — quality changes are invisible at the point of change. A prompt tweak, a retrieval parameter, a provider model bump: each shifts the output distribution and nothing errors. Teams without evals ship by vibes, argue by anecdote ("it seemed better to me"), and cannot answer the question that ends most LLM interviews: "How do you know it got better?" Teams with evals answer in one sentence: "hit rate went from 0.79 to 0.86 and faithfulness held at 0.94 on the 500-case golden set."
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision