An evaluation library for RAG models
Project description
Documentation | API reference | Quickstart | Join the Community
Welcome to Ragrank! This toolkit is designed to assist you in evaluating the performance of your Retrieval-Augmented Generation (RAG) applications. You will get proper metrics for evaluate RAG model. The product is still in beta
stage.
🔥 Installation
Ragrank is available as a PyPi package. To install it, simply run:
pip install ragrank
If you prefer to install it from the source:
git clone https://github.com/Auto-Playground/ragrank.git && cd ragrank
poetry install
🚀 Quick Start
Set your OPENAI_API_KEY
as an environment variable (you can also evaluate using your own custom model, refer docs):
export OPENAI_API_KEY="..."
Here's a quick example of how you can use Ragrank to evaluate the relevance of generated responses:
from ragrank import evaluate
from ragrank.dataset import from_dict
from ragrank.metric import response_relevancy
# Define your dataset
data = from_dict({
"question": "What is the capital of France?",
"context": ["France is famous for its iconic landmarks such as the Eiffel Tower and its rich culinary tradition."],
"response": "The capital of France is Paris.",
})
# Evaluate the response relevance metric
result = evaluate(data, metrics=[response_relevancy])
# Display the evaluation results
result.to_dataframe()
For more information on how to use Ragrank and its various features, please refer to the documentation. 📚
License
This project is licensed under the Apache License. Feel free to use and modify it according to your needs.
Feedback and Support
If you encounter any issues, have questions, or would like to provide feedback, please don't hesitate to open an issue on the GitHub repository. Your contributions and suggestions are highly appreciated!
Join our community on Discord to connect with other users, ask questions, and share your experiences with Ragrank. We're here to help you make the most out of your NLP projects! 💬
Happy evaluating! 🙂
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
File details
Details for the file ragrank-0.0.7.tar.gz
.
File metadata
- Download URL: ragrank-0.0.7.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.9 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e4738fd17869e4256fdd22ada8a162e6b8a0783678940af4e04b806f3c79a82 |
|
MD5 | 3ec7a90387486e9a6f0948ca19d23136 |
|
BLAKE2b-256 | 0a64e67d61dd4d84fb85468b35334048f89dc014ce32e6656137a94f3aaddb4b |
File details
Details for the file ragrank-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: ragrank-0.0.7-py3-none-any.whl
- Upload date:
- Size: 38.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.9 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3650ac0db5056ecc56d3dbb1baa98a17ee81228e8822b12d1b99e953154a35d |
|
MD5 | cc2bf6a8656d13c3499adec2ae3e2f42 |
|
BLAKE2b-256 | f21d3383abce2da75dac6b4ecd63114cbcfd9f95520fd2fe46b7d5a4ec5d4e86 |