Skill Detail

Compare retriever rankings on fixed relevance datasets with BEIR

Compare baseline and candidate retrievers on the same labeled dataset, then hand off ranking metrics, saved runs and query-level regressions before a RAG retrieval change.

Security & VerificationMulti-Framework
Security & Verification Multi-Framework Security Reviewed
⭐ 2.3k GitHub stars
COPY SKILL INSTRUCTIONS (OPTIONAL)
npx skills add agentskillexchange/skills --skill compare-retriever-rankings-on-fixed-relevance-datasets-with-beir Copy
Uses the third-party skills CLI, not an ASE-owned installer. Check your agent’s compatibility. This copies instructions; complete the upstream tool setup below separately.
At a glance
Tools required
Python 3.9+, pip, BEIR, selected dataset and retriever dependencies; compute and disk space appropriate to the chosen model and corpus
Install & setup
Create an isolated environment with python3 -m venv .venv, activate it, then run python -m pip install beir==2.2.0. Select a documented dataset and retriever from the upstream README, load a fixed split with GenericDataLoader, retrieve via EvaluateRetrieval, and export metrics and run files. Install only the dependencies required by the selected retriever; model and dataset downloads are separate.
Author
BEIR contributors (beir-cellar)
Publisher
Community
Last updated
Nov 6, 2026
Quick brief

Invoke this workflow before changing a RAG retriever when an operator needs a repeatable comparison against labeled relevance judgments. Supply a benchmark dataset and split, baseline and candidate retrievers, model revisions, scoring settings, and the cutoffs that matter to the application. The agent returns comparable ranking scores, saved retrieval runs, and a recommendation grounded in the observed differences.

How it works

What this skill actually does

Run a controlled retrieval comparison

  1. Install BEIR in an isolated Python environment. Choose one documented dataset and keep its corpus, queries, relevance judgments and split identical for both runs.
  2. Load the dataset with GenericDataLoader. Configure a supported retriever through EvaluateRetrieval; the upstream quick example demonstrates SentenceBERT with dense exact search.
  3. Run the baseline and candidate separately. Record model revisions, similarity function, prompts, batch settings and dataset identity so the comparison can be reproduced.
  4. Compute NDCG, MAP, recall and precision at the chosen cutoffs; calculate MRR when useful. Save each retrieval run and its metric results with the documented export helpers.
  5. Compare scores at matching cutoffs, inspect queries with worse rankings, and deliver the artifacts alongside the recommendation. State the dataset coverage limits before suggesting a production change.

Scope and handoff

This skill ends at an offline retriever comparison. It does not deploy a retrieval service, ingest production documents, train a model, or evaluate generated answers. Use it when a fixed relevance-labeled benchmark can resolve a retriever choice more reliably than informal search examples. The operator selects the dataset and models; the agent coordinates matched runs and reports evidence. The Python interface can be invoked from different agent runtimes and does not require a particular agent SDK or MCP server.

Prerequisites: Python 3.9 or later, pip, BEIR, the selected dataset and retriever dependencies, and compute/storage appropriate to the corpus and model. Model and dataset downloads may be needed. No benchmark was executed during metadata verification.