⚡ CLI tool to evaluate and compare RAG systems.
Project description
⚡ RAG Harness
The fastest way to evaluate and compare RAG systems from your terminal.
🚀 Why this exists
Evaluating RAG systems is messy.
- Different metrics everywhere
- No standard CLI tools
- Hard to compare models
👉 RAG Harness fixes that.
🎥 Demo
🔥 Features
- ⚡ One-command RAG evaluation
- 📊 Exact Match + F1 + Context metrics
- 🧠 RAGAS-style scoring (no API required)
- ⚔️ Compare multiple RAG systems
- 📁 Works with JSONL / JSON / CSV
⚡ Quick Start
git clone https://github.com/yourname/rag-harness.git
cd rag-harness
python -m venv .venv
.\.venv\Scripts\activate
pip install -e .
▶️ Run Evaluation
rag-harness evaluate examples/dataset.jsonl examples/predictions_a.jsonl
Output
📊 RAG Evaluation Summary
Exact Match 0.5000
F1 Score 0.8333
Context Precision 1.0000
Context Recall 1.0000
🧠 RAGAS Score 0.9000
⚔️ Compare Systems
rag-harness compare examples/dataset.jsonl examples/predictions_a.jsonl examples/predictions_b.jsonl
Output
⚔️ RAG Systems Comparison
Metric A B
--------------------------------
Exact Match 0.50 0.00
F1 Score 0.83 0.00
RAGAS Score 0.90 0.00
🏆 System A wins
📁 Dataset Format
Dataset
{"id":"1","question":"Who wrote Hamlet?","answer":"William Shakespeare","contexts":["William Shakespeare wrote Hamlet."]}
Predictions
{"id":"1","answer":"Shakespeare","contexts":["William Shakespeare wrote Hamlet."]}
🧠 RAGAS-style Scoring
We provide a lightweight RAGAS-inspired score:
RAGAS = 0.6 * F1 + 0.4 * Context Recall
- No API keys required
- Fast and deterministic
- Extendable to real RAGAS later
🤝 Contributing
PRs, Ideas, Improvements welcome.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rag_harness-0.1.0.tar.gz
(6.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rag_harness-0.1.0.tar.gz.
File metadata
- Download URL: rag_harness-0.1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
701779a90173aa47fa28cd1a8ef722525e457ce470084b75ffc2535f4de2ec47
|
|
| MD5 |
b5007e4409fa979d33d43198519e69f4
|
|
| BLAKE2b-256 |
cf7c7281294d41e3bbc2b903ba19c8c37c25ae982c24ca8a58b84fee40b67f32
|
File details
Details for the file rag_harness-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rag_harness-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8edd5375708e1cb203946bea2e52c113444ef852f37f70f3f7bbb0503dc1ca8d
|
|
| MD5 |
8f5dd75621d4885bf80a8fcdd584b2f5
|
|
| BLAKE2b-256 |
fb60ffdeff8c310667a707bc1882b6ce8ede9ad11ee1cadd25fc907ba64021f5
|