Gapless

Metrics

The metrics that measure retrieval, answer quality, citations, safety, and operations, how each is computed, and which ones to watch first.

A metric turns a quality criterion into a number you can compare across versions. This page lists the metrics that matter for an enterprise assistant, grouped by what they measure, with how to compute each one.

Metric map

Retrieval metrics

Computed on the retrieval dataset, where each question is labeled with the chunks or documents that contain the answer. No model judge needed, so they are cheap, fast, and deterministic.

MetricFormulaGood for
Recall at kShare of questions with at least one relevant item in the top kThe key retrieval metric. If the answer is not retrieved, nothing else helps
Full recall at kShare of questions with all required items in the top kMulti-hop questions that need several documents
MRRAverage of 1 divided by the rank of the first relevant itemHow high the right content ranks
Precision at kRelevant items in top k, divided by kNoise level in the prompt
nDCG at kRank-weighted relevance with graded labelsWhen some sources are more relevant than others

Measure recall at two points: after hybrid search (for example k = 50) and after re-ranking (for example k = 8). The gap tells you whether to improve search or re-ranking.

Labeling at the document level is easier than at the chunk level, and usually good enough: a hit is any chunk from a relevant document.

Answer metrics

MetricWhat it measuresHow to compute
Answer point coverageShare of expected answer points present in the answerLLM judge checks each point: present, partially, absent
CorrectnessNo claims that contradict the expected answer or sourcesLLM judge with expected answer and sources
Groundedness (faithfulness)Share of the answer's claims supported by the retrieved sourcesSplit the answer into claims. Judge checks each claim against the sources
Correct abstentionFor unanswerable questions, did it say it could not find the answer?Judge or pattern match against the "couldn't find" wording
False abstentionFor answerable questions, did it wrongly say it could not find the answer?Same, on answerable cases
Forbidden contentContains any must_not_contain itemString or semantic match
Format complianceStarts with a direct answer, uses lists or tables where requiredRules or judge

Groundedness and correctness are different. An answer can be fully grounded in an outdated source and still be wrong. An answer can be correct from the model's general knowledge but not grounded, which in an enterprise assistant is still a failure, because the user cannot verify it.

Track abstention in both directions. Teams often tune prompts until hallucinations disappear, then discover the assistant now refuses half of the answerable questions. Correct abstention and false abstention must be read together.

Citation metrics

MetricDefinition
Citation precisionShare of citations that actually support the sentence they follow
Citation coverageShare of factual sentences that have a citation
Invalid citationsCitations pointing to source numbers that were not provided

Compute citation precision with a judge that sees each cited sentence and the cited chunk. Invalid citations are a simple check in code.

Safety metrics

Computed on the safety dataset. These are usually gates, not scores: any failure in some categories blocks a release.

MetricDefinition
Harmful compliance rateShare of harmful requests the assistant complied with
Over-refusal rateShare of legitimate but sensitive-sounding requests it refused
Injection success rateShare of injected instructions in documents or inputs that changed behavior
Data leak rateShare of cases where content from a document the user cannot access appeared
Unconfirmed action rateWrite actions attempted without confirmation. Must be zero

See Red teaming.

Agent and tool metrics

MetricDefinition
Tool selection accuracyCorrect tool chosen for each case
Argument accuracyArguments match expected values, per field
Task success rateEnd state matches the expected state in a sandbox
Steps per taskMean and p95 number of model calls
Wasted callsRepeated or failed tool calls per task

Operational metrics

Measured in every eval run, because quality changes often come with cost and latency changes.

MetricWhy
Input and output tokens per answerCost and latency driver
Cost per answerDirect cost comparison between versions
Time to first token and total latencyUser experience
Fallback rateHow often the primary model failed

Production metrics

These come from real usage, not datasets. See Online evaluation.

MetricSignal
Thumbs down rateExplicit dissatisfaction
Regeneration rateImplicit dissatisfaction
Copy rateImplicit satisfaction: users copy answers they will use
Citation click rateUsers verifying, or users unsure
"Not found" rateCoverage gaps in the corpus, or retrieval problems
Guardrail block ratePolicy pressure, or false positives
Conversation abandonment after first answerThe answer did not help, or fully helped. Read together with other signals

Which metrics to start with

Do not build all of these on day one. A practical order:

  1. Recall at k on a retrieval set. Cheap, deterministic, and finds the biggest problems.
  2. Answer point coverage and groundedness on the golden set, with an LLM judge.
  3. Correct and false abstention.
  4. Safety gates: data leak rate and unconfirmed action rate.
  5. Thumbs down and regeneration rates in production.
  6. Everything else as your system and team grow.

Reporting results

An eval report for a change should show, for old and new versions side by side:

  • Each metric overall, with the difference and whether it is within noise.
  • Each metric per tag (HR, IT, finance, follow-ups, non-English).
  • The list of cases that flipped from pass to fail, with links to their traces.
  • Token, cost, and latency differences.

The flipped cases list is the most useful part. Read them. Averages hide whether the new failures are acceptable.

Checklist

  • Retrieval recall is measured after search and after re-ranking.
  • Answer metrics include coverage, groundedness, and both directions of abstention.
  • Citation precision and invalid citations are measured.
  • Safety metrics are gates, with zero tolerance for leaks and unconfirmed actions.
  • Every eval run records tokens, cost, and latency.
  • Reports show per-tag scores and the list of flipped cases.

On this page