Writing

Evaluating LLM-based applications

LLMs are stochastic: a correct response can look completely different each time. The right evaluation approach starts with one question: do you have ground truths?

Flowchart for evaluating LLM applications, branching on whether ground truths are available.

As we integrate LLMs into more products and workflows, evaluation becomes critical, not just for effectiveness, but also for reliability, safety, and continuous improvement. Unlike traditional ML systems, LLMs are stochastic in nature, and responses can be correct but yet be worded completely differently, making evaluation inherently challenging.

So how do we evaluate them?

The first question to ask is: do you have ground truths?

If yes, use:

  • Classification metrics (Precision, Recall, F1) for discrete answers
  • Overlap & semantic similarity (ROUGE, BLEU, BERTScore, MoverScore) for free-form outputs
  • Or even LLM-as-a-Judge to assess nuanced responses

If no, fall back to:

  • Manual evaluation (human review, crowdsourcing)
  • Fuzzy string matching (e.g., for information extraction tasks)
  • Rule-driven validation (e.g., schema checks, domain-specific rules)
  • LLM-as-a-Judge, again, for fluency, safety, and tone