Back to .md Directory

Text Retrieval Benchmark

Runs a text retrieval benchmark using BEIR datasets, measuring recall, precision, NDCG, and MRR without LLM generation.

May 2, 2026
0 downloads
3 views
ai llm rag eval openai
View source

What this file does

Runs a text retrieval benchmark using BEIR datasets, measuring recall, precision, NDCG, and MRR without LLM generation.

When to use it

  • Evaluate retrieval-only pipeline performance
  • Compare BM25 against dense retrievers
  • Validate retrieval metrics before adding generation
  • Quickly test BEIR SciFact or NFCorpus datasets

Assumes this stack

PythonBEIRBM25YAML

Text Retrieval Benchmark

Run a text retrieval benchmark without generation (no LLM required).

Download Dataset

autorag-research data restore beir scifact_openai-small

Downloads BEIR SciFact (300 queries, 5,183 documents).

Create Experiment Config

# configs/experiment.yaml
db_name: beir_scifact_test_openai_small

pipelines:
  retrieval:
    - bm25
  generation: []

metrics:
  retrieval:
    - recall
    - precision
    - ndcg
    - mrr
  generation: []

Run

autorag-research run --config-name=experiment

Expected Output

Pipeline: bm25
  Recall@10: 0.847
  Precision@10: 0.085
  NDCG@10: 0.712
  MRR@10: 0.634

Recommended Datasets

DatasetQueriesDocumentsBest For
BEIR SciFact3005,183Scientific claims
BEIR NFCorpus3233,633Biomedical
MTEBvariesvariesGeneral text

See Text Datasets for all options.

Recommended Metrics

MetricMeasures
Recall@kCoverage of ground truth
NDCG@kRanking quality
MRRFirst relevant position

See Retrieval Metrics for details.

Next

What's inside

5 sections: dataset download, config YAML, run command, expected output, recommended datasets and metrics

Change this for your project

  • Replace beir scifact_openai-small with your chosen BEIR dataset
  • Replace db_name: beir_scifact_test_openai_small with your own database name
  • Replace bm25 under pipelines.retrieval with your retriever name

Where it goes

Keep alongside your test suite. Used to define and score model evaluations.

Related Documents