Retrieval Evaluation Metrics for RAG

Retrieval metrics and diagnostic slices for evaluating the evidence selected before language-model generation.

  • JSON5,843 B
  • YAML4,276 B · −27%
  • TOON3,576 B · −39%

Retrieval metrics and diagnostic slices for evaluating the evidence selected before language-model generation. Each row includes a practical application and a failure to check before using it.

Use it when

  • Compare retrievers using a fixed judged query set.
  • Find why an answer lacks evidence before changing the generator.

Watch out for

  • Retrieval quality is separate from answer correctness.
  • Keep test queries out of retriever tuning and report uncertainty.

The data

MetricDefinitionUseLimitation
Precision at kRelevant retrieved items divided by k.Measure how much top-ranked context is useful.It depends on relevance judgments and the chosen k.
Recall at kRelevant retrieved items divided by all known relevant items.Measure how much required evidence is recovered.Incomplete relevance labels distort the denominator.
Hit rate at kFraction of queries with at least one relevant top-k item.Check whether the retriever finds any useful evidence.One relevant item can still be insufficient to answer.
Mean reciprocal rankMean of the reciprocal rank of the first relevant result.Reward finding useful evidence early.It ignores relevant results after the first one.
NDCG at kDiscounted graded relevance normalized by the ideal ranking.Compare rankings with multiple relevance grades.Judgment policy and gain function affect scores.
Context coverageFraction of required answer facts supported by retrieved context.Find multi-document evidence gaps.It requires an explicit set of required facts.
Duplicate rateFraction of retrieved context redundant with other selected items.Detect wasted context capacity.Overlapping chunks can be useful in some tasks.
Retrieval latencyElapsed time for retrieval under a declared load.Balance evidence quality against responsiveness.Cache state and concurrency change the distribution.
Empty-result rateFraction of queries returning no eligible evidence.Track abstention and indexing problems.An empty result can be the correct behavior.
Slice performanceA metric calculated by query or content subgroup.Expose failures hidden by an overall average.Small slices need uncertainty reporting.

Fields

The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.

SectionFieldTypeExample
datametricstringPrecision at k
datadefinitionstringRelevant retrieved items divided by k.
datausestringMeasure how much top-ranked context is useful.
datalimitationstringIt depends on relevance judgments and the chose…

Fetch the same bytes

The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.

curl "https://yjtoon.com/api/dataset/rag-retrieval-metrics?format=toon"
const res = await fetch(
  "https://yjtoon.com/static-data/dataset/rag-retrieval-metrics.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Sources and editorial notes

Original editorial reference notes by YJTOON, informed by the linked primary documentation. External specifications retain their own licenses.

Editorial review: . Source documents keep their own licenses.

Topics

  • ai-ml-terms
  • rag retrieval metrics
  • reference
  • engineering

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets