haiku.rag/evaluations
2026-03-24 14:02:03 +02:00
..
evaluations Configurable judge and reflect models for evaluations 2026-03-18 17:14:11 +02:00
tests Configurable judge and reflect models for evaluations 2026-03-18 17:14:11 +02:00
LICENSE Restructure into uv workspace to support minimal and full installations 2025-11-04 17:59:12 +02:00
pyproject.toml Fix CI failures: update tests for pydantic-ai 1.70.0 and FastMCP API changes 2026-03-24 14:02:03 +02:00
README.md Rename iterations to num_candidates 2026-03-12 13:00:51 +02:00

Haiku RAG - Evaluations

Internal benchmarking and evaluation scripts for haiku.rag.

This package is not published to PyPI and is only used for development and testing purposes.

Overview

Contains evaluation scripts for benchmarking RAG retrieval and QA performance, plus GEPA-based prompt optimization. Available datasets:

  • RepliQA
  • WiX
  • HotpotQA
  • OpenRAG Bench

Usage

After installing the package, you can run evaluations using the evaluations command:

# Run retrieval + QA benchmarks
evaluations run repliqa
evaluations run wix

# Use a custom config file
evaluations run repliqa --config /path/to/haiku.rag.yaml

# Override the database path
evaluations run repliqa --db /path/to/custom.lancedb

# Skip database population and run only benchmarks
evaluations run repliqa --skip-db

# Skip specific benchmarks
evaluations run repliqa --skip-retrieval
evaluations run repliqa --skip-qa

# Limit the number of test cases
evaluations run repliqa --limit 100

Pre-built Databases

Download pre-built evaluation databases from HuggingFace:

evaluations download repliqa
evaluations download all
evaluations download repliqa --force

Upload databases (maintainer only):

evaluations upload repliqa
evaluations upload all

Prompt Optimization

Optimize QA system prompts using GEPA (Generalized Evolutionary Prompt Algorithm):

evaluations optimize wix
evaluations optimize repliqa --limit 40 --num-candidates 30
evaluations optimize wix --output optimized_prompt.txt

See Tuning docs for details on applying results.

Database Storage

By default, evaluation databases are stored in the haiku.rag data directory:

  • Linux: ~/.local/share/haiku.rag/evaluations/dbs/
  • macOS: ~/Library/Application Support/haiku.rag/evaluations/dbs/
  • Windows: C:/Users/<USER>/AppData/Roaming/haiku.rag/evaluations/dbs/

You can override this with the --db option.