Understanding .benchmarks/ outputs, metrics, and trend analysis.
.benchmarks/
├── runs/
│ ├── 20260409-235448_public_titanic/
│ │ ├── summary.json # Test cases + results
│ │ ├── notes.md # Run metadata and notes
│ │ └── embeddings/ # Cached embeddings (git-ignored)
│ ├── 20260409-235447_dataset/
│ └── ...
├── history/
│ └── metrics.csv # All runs: trend and delta tracking
└── README.md # Benchmark conventions
| Metric | Type | Meaning |
|---|---|---|
pass |
bool | All test cases met thresholds |
total_cases |
int | Number of test cases executed |
passed_cases |
int | Count that passed |
failed_cases |
int | Count that failed |
dataset |
str | Source or dataset name |
dataset_url |
str | Reference URL (if public) |
{
"query": "female passengers first class",
"top_k": 5,
"observed_results": 5, // Records actually retrieved
"observed_citations": 5, // Citations generated
"expected_min_results": 1, // Threshold: minimum required
"expected_min_citations": 1, // Threshold: minimum required
"passed": true // met? Both observed >= expected
}
min_results documentsmin_citations thresholdImportant: Answer quality and source accuracy must be validated manually.
See Citation Mismatch for details.
run_id,timestamp,dataset,total_cases,passed_cases,failed_cases,pass
20260409-235448_public_titanic,2026-04-09T23:54:48,Titanic (datasciencedojo),3,3,0,True
20260409-235447_dataset,2026-04-09T23:54:47,Local CSV,3,3,0,True
Trend analysis:
import pandas as pd
metrics = pd.read_csv(".benchmarks/history/metrics.csv")
print(metrics.tail(10)) # Last 10 runs
print(metrics["pass"].value_counts()) # Pass rate
{
"pass": true,
"total_cases": 3,
"passed_cases": 3,
"failed_cases": 0
}
✓ All test cases met thresholds. Proceed with normal review and test gates.
{
"pass": false,
"total_cases": 3,
"passed_cases": 1,
"failed_cases": 2,
"results": [
{
"query": "rare query",
"observed_results": 0, // ← Failed: no results
"expected_min_results": 1,
"passed": false
},
// ...
]
}
✗ Some cases failed. Debug why expected results weren’t retrieved.
import json
from pathlib import Path
run_dir = Path(".benchmarks/runs/20260409-235448_public_titanic")
summary = json.loads((run_dir / "summary.json").read_text())
for result in summary["results"]:
if not result["passed"]:
print(f"Failed: {result['query']}")
print(f" Expected: {result['expected_min_results']} results")
print(f" Got: {result['observed_results']}")
Remediation:
engine.answer(query)Benchmark runner scripts in this repository can persist outputs under .benchmarks/runs/<timestamp>_*/ and aggregate history in .benchmarks/history/metrics.csv.
python -m ragsearch.evaluation \
--engine-factory mymodule.build_engine \
--cases eval_cases.json
The evaluation CLI itself prints the summary JSON to stdout; persistence is handled by the runner that invokes it.
diff .benchmarks/runs/run1/summary.json .benchmarks/runs/run2/summary.jsonmetrics.csv over timenotes.md in each run| See also: API Reference | Quickstart Guide | Troubleshooting |