haiku.rag/evaluations/tests
Yiorgis Gozadinos 19d5b2e7f6
Split the evaluation benchmark by responsibility
benchmark.py was 1220 lines holding six unrelated jobs: populating a
database, running retrieval, running QA, resolving datasets, moving
databases to and from HuggingFace, and wiring the Typer CLI.

qa.py takes both QA runners with their live summary, refusal metrics and
target resolution. population.py takes populate_db and the batched ingest.
retrieval.py takes run_retrieval_benchmark. artifacts.py takes HF_REPO_ID and
the download/upload bodies. experiment.py takes DEFAULT_JUDGE_MODEL and
build_experiment_metadata, which retrieval and QA both record.

benchmark.py keeps the CLI at 258 lines: the Typer app, config and case-id
loading, dataset resolution, evaluate_dataset, and three commands whose
bodies are now a loop over specs. The module-level side effects stay with it
— load_dotenv before configure_telemetry, so credentials and LOGFIRE_TOKEN
are in the environment before telemetry and model setup read them — so no
importable module carries one.

Test patch targets follow the code. get_model, run_capability_question,
run_capability_conversation, set_eval_attribute and HaikuRAG are patched
inside moved code, so they move with it; run_qa_benchmark,
run_retrieval_benchmark and find_config_file stay patchable on
evaluations.benchmark because evaluate_dataset and _load_config still look
them up there.

One assertion got stronger: a QA test patched benchmark.HaikuRAG to prove the
QA path does not open its own client. qa.py has no HaikuRAG reference at all
now, so the test asserts that instead.
2026-08-20 14:08:09 +03:00
..
__init__.py Tests for gepa 2026-03-12 12:05:25 +02:00
test_benchmark.py Split the evaluation benchmark by responsibility 2026-08-20 14:08:09 +03:00
test_capability_runner.py Thread the document filter through the live QA runner 2026-08-17 11:03:52 +03:00
test_citation_evaluators.py Add MTRAG ClapNQ multi-turn evaluation 2026-08-17 10:53:16 +03:00
test_config.py Add MTRAG ClapNQ multi-turn evaluation 2026-08-17 10:53:16 +03:00
test_conversation_evaluator.py Add MTRAG ClapNQ multi-turn evaluation 2026-08-17 10:53:16 +03:00
test_datasets.py Remove the wix evaluation dataset 2026-08-14 14:46:51 +03:00
test_evaluators.py Add MTRAG ClapNQ multi-turn evaluation 2026-08-17 10:53:16 +03:00
test_mtrag.py Simplify the eval harness and share the embed-fill path. 2026-08-17 10:56:26 +03:00
test_numbers.py Normalize unicode signs 2026-06-06 14:52:04 +03:00
test_reference_configs.py Pin the eval judge to qwen3.8 2026-08-18 14:28:16 +03:00
test_submission.py Add T²-RAGBench leaderboard submission exporter 2026-06-08 11:51:02 +03:00