What problem does it solve?
Measuring retrieval quality and citation behavior in RAG pipelines usually requires model calls or network access, making results non-repeatable and unsuitable for CI. This Skill computes Recall@K, reciprocal rank, context precision, citation coverage, and citation validity from explicit document IDs in JSONL fixtures, fully offline and deterministically.
Core Features & Use Cases
- Offline Metric Computation: Calculates Recall@K, reciprocal rank, context precision@K, citation coverage, and citation validity by comparing explicit document ID arrays, with no model calls or network requests.
- CI Threshold Gating: Accepts minimum thresholds for each metric and exits with code 1 when any threshold fails, enabling quality gates in continuous integration pipelines.
- Diagnostics and Reporting: Flags empty retrieval, missing relevance labels, duplicate retrieved IDs, unretrieved citations, and missing citations, then emits Markdown or JSON reports.
- Use Case: A team maintaining a RAG search feature commits a JSONL fixture of questions with known relevant documents, then runs the evaluator in CI with --min-recall 0.8 to block regressions in retrieval quality.
Quick Start
Run the bundled evaluator script with Node against a JSONL fixture file, specifying a K value and optional metric thresholds, to get a Markdown or JSON evaluation report.