Skip to main content
Evaluations run your retriever against a curated set of queries with known-relevant documents, then compute standard information retrieval metrics at multiple cutoff points. Use them to quantify retriever quality, compare configurations, and catch regressions before they reach production.

Quickstart

1

Create a ground truth dataset

Each query pairs an input with the document IDs that should be returned.
2

Run the evaluation

Execute your retriever against every query in the dataset. The evaluation runs asynchronously and returns a task_id for progress tracking.
3

Get results

Poll the evaluation until status is completed.
Example response

Metrics

Every metric is computed at each K value you specify. The defaults cover most use cases:
F2 vs F1: Use F2 when missing a relevant document is worse than showing an irrelevant one — the common case in search, recommendations, and discovery. F1 treats both errors equally.

Reading Your Scores

Graded Relevance

When you provide relevance_scores in your dataset, NDCG uses graded relevance instead of binary. This distinguishes “exactly right” from “somewhat relevant”:
Without relevance_scores, all metrics use binary relevance (relevant or not).

Comparing Retrievers

Run the same dataset against different retriever configurations to find the best pipeline:
Compare the metrics_by_k side by side:
Run the same dataset after every pipeline change — adding stages, swapping models, adjusting fusion weights — to quantify the impact before deploying.

Ground Truth Datasets

Dataset Requirements

  • At least 1 query (aim for 50+ for statistically meaningful results)
  • Each query must have at least 1 relevant document
  • query_input must match your retriever’s input schema
  • relevance_scores, if provided, must cover all relevant_documents

Managing Datasets

Building Good Datasets

Include query diversity

Cover head queries (popular), torso (moderate), and tail (rare/specific). Don’t just test easy cases.

Use graded relevance

Binary relevant/not-relevant misses nuance. Score documents 0–5 so NDCG can distinguish good rankings from great ones.

Match real traffic

Sample queries from production logs. Synthetic queries test what you think users ask, not what they actually ask.

Version your datasets

Keep datasets stable across evaluations so you can track metric trends over time. Create new versions for schema changes.

Configuration Reference

string
required
Name of the ground truth dataset to evaluate against.
integer[]
default:"[1, 5, 10, 20]"
Cutoff positions for @K metrics. Include the K values that match your UI — if you show 10 results per page, include 10.
string[]
Metrics to compute. Available: precision, recall, f1, f2, map, ndcg, mrr.