Back to .md Directory

CLI Reference

Documents 7 CLI commands for evaluating retrieval systems, managing baselines, and detecting drift.

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

What this file does

Documents 7 CLI commands for evaluating retrieval systems, managing baselines, and detecting drift.

When to use it

  • You need to run evaluation on pre-computed retrieval results
  • You want to compare two evaluation runs side by side
  • You need to detect regression from a stored baseline
  • You want to validate a golden set structure

Assumes this stack

PythonTyperCLI

CLI Reference

ir-eval provides a Typer-based CLI with 7 commands for evaluation, baseline management, and drift detection.

Global Usage

ir-eval [COMMAND] [OPTIONS]

Commands

evaluate — Evaluate pre-computed results

Primary evaluation path. Takes pre-computed retrieval results and evaluates against a golden set.

ir-eval evaluate RESULTS_FILE [OPTIONS]
OptionTypeDefaultDescription
--goldenPATHrequiredPath to golden set JSON
--top-kINT10Cutoff for @k metrics
--outputPATHSave EvalRun to JSON
--formatSTRconsoleOutput: console, markdown, json

Example:

ir-eval evaluate results.json --golden golden.json --format markdown --output run.json

run — Live evaluation via adapter

Evaluate a running retrieval system using an adapter registered via entry points.

ir-eval run GOLDEN_SET [OPTIONS]
OptionTypeDefaultDescription
--adapterSTRrequiredEntry point name of adapter
--top-kINT10Results to retrieve per query
--outputPATHSave EvalRun to JSON
--formatSTRconsoleOutput format

Example:

ir-eval run golden.json --adapter research-kb --top-k 10

baseline set — Pin a baseline

Pin an evaluation run as the baseline for drift detection.

ir-eval baseline set RUN_FILE [OPTIONS]
OptionTypeDefaultDescription
--notesSTRNotes about this baseline
--store-dirPATH.ir-eval/baselinesStorage directory

baseline show — View current baseline

ir-eval baseline show GOLDEN_SET_NAME [OPTIONS]
OptionTypeDefaultDescription
--store-dirPATH.ir-eval/baselinesStorage directory

compare — Compare two runs

Side-by-side comparison of two evaluation runs.

ir-eval compare RUN_A RUN_B [OPTIONS]
OptionTypeDefaultDescription
--formatSTRconsoleOutput format

Example:

ir-eval compare baseline.json current.json --format markdown

drift — Detect regression from baseline

Run evaluation and compare against stored baseline with statistical tests.

ir-eval drift GOLDEN_SET [OPTIONS]
OptionTypeDefaultDescription
--adapterSTRrequiredAdapter name
--top-kINT10Results per query
--exit-codeBOOLfalseExit 1 on CRITICAL drift
--ciBOOLfalseShow confidence intervals
--formatSTRconsoleOutput format
--store-dirPATH.ir-eval/baselinesBaseline storage

validate — Validate golden set

Check golden set structure and show distribution summary.

ir-eval validate GOLDEN_SET

history — Baseline history

Show baseline change history for a golden set.

ir-eval history GOLDEN_SET_NAME [OPTIONS]
OptionTypeDefaultDescription
--store-dirPATH.ir-eval/baselinesStorage directory

What's inside

7 commands with options tables, 6 code examples, and global usage syntax.

Change this for your project

  • Replace ir-eval with your own CLI entry point name
  • Replace .ir-eval/baselines with your preferred baseline storage path

Where it goes

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

Worth borrowing

  • Separates pre-computed evaluation from live adapter evaluation
  • Uses a baseline set/show/drift workflow for regression detection

Related Documents