A collection of evaluation metrics for LLM tasks
Project description
EvalBench 🧪📊
Lightweight, extensible, open-source evaluation framework for LLM applications covering approximately 18 metrics and allows adding of user-defined custom metrics
🔍 About EvalBench
EvalBench is a plug-and-play Python package for evaluating outputs of large language models (LLMs) across a variety of metrics.
Supports:
- Predefined metrics (faithfulness, coherence, BLEU, hallucination, etc.)
- Easy registration of custom user-defined metrics
- Evaluation across different modalities/ use-cases
- Flexible input/output options (print/ save) with support for list-based batching
Modules and Metric Categories:
| Module | Metrics | Required Arguments | Argument Types |
|---|---|---|---|
| response_quality | conciseness_score, coherence_score, factuality_score | response | List[str] |
| reference_based | bleu_score, rouge_score, meteor_score, semantic_similarity_score, bert_score | reference, generated | List[str], List[str] |
| contextual_generation | faithfulness_score, hallucination_score, groundedness_score | context, generated | List[List[str]], List[str] |
| retrieval | recall_at_k, precision_at_k, ndcg_at_k, mrr_score | relevant_docs, retrieved_docs, k | List[List[str]], List[List[str]], int |
| query_alignment | context_relevance_score | query, context | List[str], List[str] |
| response_alignment | answer_relevance_score, helpfulness_score | query, response | List[str], List[str] |
| user defined module | User-registered custom metrics | Varies (user-defined) | Varies (user-defined) |
EvalBench is especially useful when you're:
- Building small-scale LLM pipelines
- Comparing different prompts or model outputs
- Rapidly iterating on metrics
🚀 Usage
Installation
pip install evalbench
For detailed usage instructions and examples, see USAGE.md
💡 Use Cases
EvalBench is built for fast feedback loops while developing:
- LLM Applications: Chatbots, assistants, summarization tools
- Prompt Engineering: Compare prompt variations using faithfulness, conciseness, or BLEU
- Model Evaluation: Benchmark outputs from different model runs
- Custom Evaluation Design: Rapidly prototype domain-specific metrics
🚧 Coming Soon
- Basic visualizations: Histograms and score distributions to quickly interpret results
- Batch mode via JSONL/Pandas: Evaluate and export results from structured files
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
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 evalbench-0.1.1.tar.gz.
File metadata
- Download URL: evalbench-0.1.1.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2696cacc04b029e069a606137c260cd457fd256b879f3adf58324d0563f4f62
|
|
| MD5 |
4c4d82a3a2ff3b58e335ba0662c24eec
|
|
| BLAKE2b-256 |
69d04dee842f7e553d87a1ee68b3cd7366d2248146d3ab737e5e85b4e3c6d7f7
|
File details
Details for the file evalbench-0.1.1-py3-none-any.whl.
File metadata
- Download URL: evalbench-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
218afddd052e7c2c1edf1e4d905afdc1fafeded0c91917e4b52712a23123d782
|
|
| MD5 |
20e8dfdaffafc104317174b873f52a8c
|
|
| BLAKE2b-256 |
a10825eea89287b912f31c5c20db81254a4019499014a10097714f9669fba897
|