Foundations to Advanced Systems: LLMs for Product Managers
Offline Evaluation Techniques
4.2 Offline Evaluation Techniques
Offline evaluation happens before users even interact with the product. It is the practice of testing your model, your prompts, or your entire pipeline against a curated set of inputs and expected outputs in a controlled environment, before anything goes live.
Offline LLM evaluation happens before deployment: engineers run a model, prompt, or RAG pipeline against a fixed dataset to measure quality in a controlled setting.
The foundation of offline evaluation is a good dataset. This is a collection of representative inputs, the kinds of queries and tasks the product will actually encounter, paired with either expected outputs or evaluation criteria for judging quality.
Building this dataset is harder than it sounds, and it is one of the most important investments a product team can make.
What makes a good eval dataset:
- It reflects the real distribution of user inputs, not just the ideal cases
- It includes edge cases, adversarial inputs, and queries that fall at the boundaries of the product's intended scope
- It is large enough to be statistically meaningful but small enough to be maintained as the product evolves
- It grows over time as new failure cases are discovered in production
The team that builds their eval dataset from real user data, even a small sample, will always outperform the team that invents synthetic test cases based on what they imagine users will ask.
Building an Evaluation Dataset
The foundation of offline evaluation is a good dataset. This is a collection of representative inputs, the kinds of queries and tasks the product will actually encounter, paired with either expected outputs or evaluation criteria for judging quality.
Building this dataset is harder than it sounds, and it is one of the most important investments a product team can make.
What makes a good eval dataset:
- It reflects the real distribution of user inputs, not just the ideal cases
- It includes edge cases, adversarial inputs, and queries that fall at the boundaries of the product's intended scope
- It is large enough to be statistically meaningful but small enough to be maintained as the product evolves
- It grows over time as new failure cases are discovered in production
The team that builds their eval dataset from real user data, even a small sample, will always outperform the team that invents synthetic test cases based on what they imagine users will ask.
Methods of Offline Evaluation
Once you have a dataset, there are several approaches to evaluation, and the right combination depends on the nature of the product.
Automated metrics use algorithms to score outputs against expected answers. For tasks with clear right answers, like information extraction or classification, metrics like accuracy or exact match work well. For generative tasks, metrics like ROUGE measure overlap between generated and reference text, though they have well-known limitations when it comes to capturing meaning.
LLM-as-a-judge is one of the most powerful techniques available to modern teams. Rather than scoring outputs against a rigid reference, you use a separate, capable LLM to evaluate the quality of outputs based on a rubric you define. LLM-as-a-judge evaluators let a model critique another model's output, enabling flexible evaluation of dimensions like factuality, coherence, and tone that rule-based metrics cannot capture. This approach scales well and handles the kind of nuanced quality judgments that automated metrics miss entirely.
Human evaluation remains the gold standard for quality dimensions that require genuine judgment: tone appropriateness, nuanced correctness, whether a response would actually satisfy a real user. It is expensive and slow, but for high-stakes products or for validating that automated metrics are tracking what actually matters, it is irreplaceable.
The practical approach for most teams is a combination:
Automated metrics and LLM-as-a-judge for scale
Human evaluation for calibration and high-stakes scenarios.