Medium5 min readUpdated 2026-08-12

How do you evaluate LLM outputs? What metrics do you use?

LLM outputs evaluation: How do you evaluate LLM outputs? What metrics do you use? This page explains common automatic metrics, embedding and calibration checks, and how to combine them with human evaluation for practical decisions.

Hand-drawn knowledge card showing boxes for automatic metrics, human eval, embeddings, arrows, and a bottom takeaway
TL;DR
  • Start with automatic metrics to get fast, repeatable signals: token overlap, embedding similarity, and model confidence.
  • Add human evaluation focused on correctness, helpfulness, and safety for final judgments.
  • Use calibration checks and labeling protocols to interpret scores across tasks and populations. Key tradeoffs: speed and scale versus coverage and reliability.

In this question, we will learn how to evaluate LLM outputs and which metrics to use for different goals. We will keep the answer practical so you can pick measures for quick experiments or production monitoring.

We will cover the following:

  • The intuition (an analogy that makes it click)
  • How it actually works (concrete worked example)
  • Practical metrics guide
  • When to use which metric
  • Tradeoffs and failure modes
  • Questions the interviewer might ask
  • What the interviewer is really testing

Direct answer: Use a mix of automatic and human metrics matched to the task objective, and validate with calibration and labeling protocols. Automatic metrics like BLEU, ROUGE, and embedding-based cosine similarity give fast signals, but human evaluation is required for correctness, helpfulness, and safety. Monitor confidence calibration and task-specific errors to close gaps between automatic scores and real user outcomes.

The intuition (an analogy that makes it click)

Think of evaluation as a layered inspection process. Automatic metrics are like a camera that takes quick pictures of output quality. They catch obvious problems and let us compare many models quickly. Human evaluation is like an inspector who reads the whole manual and judges usefulness and nuance. Calibration and uncertainty checks are the inspector's ruler that tells us how much to trust the camera.

How it actually works (the real mechanics, with one concrete worked example)

We separate metrics into families and compute them on a held-out set or in live logs.

  • Surface overlap metrics: BLEU and ROUGE measure token or nn-gram overlap with references.
  • Embedding metrics: cosine similarity between sentence embeddings or BERTScore measure semantic alignment.
  • Probabilistic metrics: perplexity and confidence distributions measure model certainty.
  • Human metrics: correctness, helpfulness, and harmlessness rated by annotators.

Worked example. Suppose we evaluate a summarization model on 100 examples and compute four signals. Here are aggregated results from one run:

MetricScore
BLEU (approx)0.42
ROUGE-L0.55
BERTScore (F1)0.88
Embedding cosine0.93

These numbers tell us that surface overlap is moderate but semantic similarity is high. That suggests the model paraphrases references well but does not reuse exact phrasing.

For calibration we compute expected calibration error ECE\mathrm{ECE}. If we partition predictions into MM bins BmB_m and measure accuracy and mean confidence per bin we get the usual formula:

ECE=m=1MBmnacc(Bm)conf(Bm)\mathrm{ECE} = \sum_{m=1}^M \frac{|B_m|}{n} \left| \mathrm{acc}(B_m) - \mathrm{conf}(B_m) \right|

Low ECE\mathrm{ECE} means confidence aligns with accuracy. In practice, we inspect calibration by label and by input slice so we do not overtrust a model in specific cases.

Practical metrics guide

Here is a short checklist for common tasks:

  • Classification: accuracy, precision, recall, F1, confusion matrix, and calibration ECE\mathrm{ECE}.
  • Generation (open ended): human helpfulness and correctness, BERTScore, BLEU/ROUGE for tight domains, and embedding cosine for semantic similarity.
  • Code and math: unit test pass rate, exact match, and human correctness checks.
  • Safety and bias: targeted probing tests, human harm ratings, and slice-level metrics by demographic or content category.

When you compute automatic metrics, always report variance: standard deviation or bootstrap confidence intervals. That helps avoid over-interpreting small score differences.

When to use which metric

Use lightweight automatic metrics for iteration and A/B testing because they scale. When behavior or safety matters, run targeted human evaluation. If interpretation depends on phrasing, prefer embedding-based metrics and human checks to token-overlap scores.

Examples:

  • Use ROUGE-L and BERTScore during early summarization experiments for fast feedback. Add human correctness later before deployment.
  • Use accuracy and ECE\mathrm{ECE} for classification that feeds automated decisions. Calibrate the model if ECE\mathrm{ECE} is high.
  • Use unit tests and exact match for code generation plus manual review for correctness and security.

Tradeoffs and failure modes

Automatic metrics are fast but can be gamed and can disagree with humans. Embedding metrics are robust to paraphrase but depend on the embedding model and may hide critical factual errors. Human evaluation is expensive and subjective, so you must design clear annotation guides and inter-annotator agreement checks.

Do not rely on a single metric for deployment decisions. A high BERTScore or low perplexity does not guarantee factual accuracy or safety. Always align your evaluation suite with the specific failure modes you care about.

Questions the interviewer might ask

Some follow-up questions you might get:

Why not just use BLEU or ROUGE for everything? BLEU and ROUGE measure surface overlap and fail for paraphrase and abstractive tasks. They are useful when references are constrained but misleading for open-ended outputs.

How do you design a human evaluation study? Define clear instructions, examples of each rating level, randomize example order, collect multiple annotators per item, and measure inter-annotator agreement like Cohen kappa.

How do you combine automatic and human metrics into a single decision? Use automatic metrics for gating and continuous monitoring, and require passing human-evaluation thresholds for release. Consider weighted scoring informed by business risk.

What is calibration and why does it matter? Calibration checks whether model confidence matches empirical accuracy. For decisions that rely on confidence thresholds, poor calibration leads to over- or under-triggering.

How do you handle ambiguous or multiple correct answers? Prefer embedding-based metrics and human checks. Provide annotators with task context and allow multiple acceptable answers or graded scoring.

Some things to note:

  • Always measure variability and report confidence intervals.
  • Create targeted slices to find systematic errors.
  • Keep annotation guidelines short, with clear examples.

What the interviewer is really testing

They want to know you can pick the right measurements for the job, not just list metric names. They are looking for an understanding of strengths and weaknesses, how to interpret scores in context, and how to design evaluations that surface real user risk. Show that you can combine automatic signals, calibration, and human judgment into a coherent evaluation plan.

Related questions

#llm-evaluation#nlp-metrics#human-eval#embedding-metrics

How would you rate the quality of this article?

Prepare for your AI engineering interview

This is one of many detailed questions and explainers on StudyAIDesign. Browse the full set, work through the curriculum, and walk into your interview ready.

Follow along for new questions and explainers:Instagram