Skip to main content

⚡ CLI tool to evaluate and compare RAG systems.

Project description

⚡ RAG Harness

The fastest way to evaluate and compare RAG systems from your terminal.

PyPI version Python License CLI

📦 Install

pip install rag-harness

🚀 Why this exists

Evaluating RAG systems is messy.

  • Different metrics everywhere
  • No standard CLI tools
  • Hard to compare models

👉 RAG Harness fixes that.

🎥 Demo

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


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.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rag_harness-0.1.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file rag_harness-0.1.1.tar.gz.

File metadata

  • Download URL: rag_harness-0.1.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for rag_harness-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9cb7bbbcb49a42509342aec209e20946011ae4d461ea98ff9685a60d2a8ae88b
MD5 265c95c403fba2066d16fd73365fa087
BLAKE2b-256 ebc9a31001aadc386b065dee3769f945c3b80aa6bfb2dcdca5ff279393eca961

See more details on using hashes here.

File details

Details for the file rag_harness-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rag_harness-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for rag_harness-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8886d4aa9e6aad019af3a952d0625381c7d0a90e63150a372a362667a65e6622
MD5 4ffbd73baade2ffb6abd6c248d618dc5
BLAKE2b-256 5ffba3749015e82156650554d7004ec931d605df73611e26e25ea52b6a93d38d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page