Glossary · L

LLM Evaluation (Evals)

Systematic measurement of LLM output quality with test datasets, automated metrics, LLM judges and human review, before and after release.

By Obseria Editorial TeamUpdated

Definition

LLM evaluation (evals) is the systematic measurement of how well a language model application performs a task. It combines test datasets, automated checks, model-based judges and human review to score properties such as correctness, faithfulness to sources, relevance, safety and format, both before a release and continuously on production traffic.

What is LLM evaluation?

LLM evaluation, usually shortened to evals, answers a question that classic tests cannot: is the output of a non-deterministic model good enough? A unit test checks that a function returns an exact value. An LLM can phrase a correct answer in many ways, and a fluent answer can still be wrong. Evals therefore score outputs against criteria, across many examples, and track those scores over time.

Evals matter whenever something changes: a new model version, a modified prompt, a different retrieval strategy or a new tool. Without them, teams judge changes by a handful of manual tries, and regressions surface only when users complain.

A good eval suite turns vague impressions such as "the new model feels better" into numbers per criterion and per category. That makes decisions explicit: a team can see that a cheaper model is equally good for simple questions but worse for complex ones, and route traffic accordingly. Evals also document what the application is supposed to do, which helps when several people change prompts and configuration.

Types of evals

  • Offline evals run a fixed dataset of inputs, ideally with reference answers, through the application before release. They work like a regression test suite.
  • Online evals score a sample of real production traffic continuously, often without a reference answer.
  • Human evaluation by domain experts remains the reference for subtle quality questions and is used to calibrate automated methods.
  • Red-team evals test robustness against adversarial inputs such as prompt injection.

Methods and metrics

MethodSuitable forLimitation
Deterministic checks (exact match, regex, JSON schema)Classification, extraction, structured outputCannot judge free text
Reference similarity (e.g. embedding similarity)Answers with a known referenceSimilar wording is not the same as correct content
LLM-as-a-judgeRelevance, faithfulness, tone, helpfulnessJudges have biases and need calibration against human labels
Task successAgents: was the goal reached, with how many stepsRequires a clear definition of success

For RAG systems, common criteria are context relevance (did retrieval find the right documents), faithfulness (is the answer supported by them) and answer relevance. Faithfulness scores are a practical way to quantify hallucinations.

Example: evaluating a prompt change

An illustrative workflow: a team maintains 300 curated questions for its documentation assistant, each with a reference answer and the expected source. Before switching to a new prompt version, it runs both versions over the dataset. A judge model scores faithfulness and relevance from 0 to 1, deterministic checks verify that every answer cites a source, and token usage and latency are recorded alongside. The new prompt scores higher on relevance but lower on faithfulness for pricing questions, so the team fixes it before rollout, then releases it to a small share of traffic as a canary with online evals active.

Best practices

  • Build the dataset from real user questions, including hard and edge cases, and extend it with every production failure.
  • Define criteria precisely and give judges a rubric with examples.
  • Calibrate LLM judges against human ratings and re-check after changing the judge model.
  • Evaluate quality together with cost and latency; a better answer that takes three times as long may not be an improvement.
  • Compare against a baseline run, not against absolute numbers alone.
  • Version datasets, prompts, models and judge configurations so results stay reproducible.

Common mistakes

Typical pitfalls are datasets that are too small or too easy, judges that reward long answers, evaluating only before release and never in production, and averages that hide failures in one important category. Report scores per category and look at the worst examples, not only the mean.

Another frequent issue is evaluating the model in isolation. In production, quality depends on the whole chain: retrieval, prompt assembly, tool calls and post-processing. Evals should run against the real application path, and their results should be linked to traces so that a low score can be traced back to the step that caused it. Finally, keep the judge model and its prompt stable while comparing versions; changing the judge and the application at the same time makes results impossible to interpret.

How Obseria helps

Obseria's AI observability includes built-in evaluators for relevance, faithfulness, toxicity and PII leaks on production traffic, and compares quality, cost and latency across model and prompt versions in the same traces.

Frequently asked questions

Evals measure quality, usually across many examples and over time. Guardrails act on individual requests in real time and block or correct violations. The same checks can serve both purposes.

A method in which a language model scores the output of another model against a rubric, for example for relevance or faithfulness. It scales well but must be calibrated against human ratings because judges have biases.

Large enough to cover your important use cases and edge cases with several examples each. Many teams start with a few dozen curated cases and grow the set with every production failure.

Yes. Online evals on a sample of real traffic catch drift and problems that the offline dataset does not cover, for example new user intents or changed source documents.

Put these concepts into practice

Try Obseria free for 14 days, with OpenTelemetry and no proprietary agents.