🧪 EvalKit
A simple evaluation tool to measure how much of your retrieved context is actually needed to answer a question.
🚀 Why EvalKit?
RAG systems often retrieve too much irrelevant context.
EvalKit helps you answer:
Which retrieved chunks were actually useful for generating the answer?
📊 What it does
Given:
- a user query
- retrieved contexts
- a final answer
EvalKit computes:
✔ Retrieval Efficiency
How much of the retrieved context was actually necessary.
✔ Required vs Redundant Contexts
Which chunks helped vs which were unnecessary.
⚡ Quickstart
1. Install
pip install evalkit-rag
Why EvalKit
| Tool | Focus | Missing insight |
|---|---|---|
| Ragas | retrieval + answer score | context necessity |
| DeepEval | LLM eval benchmarks | counterfactuals |
| EvalKit | context necessity (WHY) | — |
🦙 2. (Optional) Run Ollama
ollama serve
ollama pull llama3
⚡ 3. Use EvalKit
from evalkit import RetrievalEfficiency, LLMJudge
judge = LLMJudge(model="ollama/llama3")
metric = RetrievalEfficiency(judge)
query = "What is refund policy?"
contexts = [
"Refunds are allowed within 30 days",
"Customer must provide receipt",
"Office hours are 9-5"
]
answer = "Refunds are allowed within 30 days with receipt"
result = metric.measure(query, contexts, answer)
print(result)
📊 Output
Retrieval Efficiency: 0.67
Required Contexts: [0, 2] Redundant Contexts: [1]
🧠 What this tells you
Which chunks were necessary Which chunks were not needed How efficient your retrieval system is
Metadata
Release files for evalkit-rag 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| evalkit_rag-0.1.1.tar.gz | 4.6 kB | Without provenance | Details for evalkit_rag-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evalkit_rag-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for evalkit_rag-0.1.1-py3-none-any.whl |
Total release size: 11.0 kB
Release files / evalkit_rag-0.1.1.tar.gz
| Download URL | evalkit_rag-0.1.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e02572e5fc20fd5ce7b90ebad1f82812e632c3f109ffe701ae08ab7afde216a
|
|
BLAKE2b-256 checksum How to use checksums |
e0895d050c112a3a9e8a2f9aa34a5d72e5ae65e8388efb7d7e4e9f1543bdcfe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / evalkit_rag-0.1.1-py3-none-any.whl
| Download URL | evalkit_rag-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e351e5d3282f5e182c90dff94f228d762d695ab9dfbd0864adae1476bb7e4ce3
|
|
BLAKE2b-256 checksum How to use checksums |
d75d90fca71ae351dc31bbbd12813861b7bb466eb9822c4351dd6dccacef5fc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for evalkit-rag 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.