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 providerelevance_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:metrics_by_k side by side:
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_inputmust match your retriever’s input schemarelevance_scores, if provided, must cover allrelevant_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.Related
- Retriever Benchmarks — replay live sessions against candidate retrievers
- Improve Relevance — interaction signals, fusion strategies, and the feedback loop
- API Reference: Run Evaluation — full endpoint specification
- API Reference: Create Dataset — dataset creation endpoint

