Skip to main content

An evaluation library for RAG models

Project description

This repo is under development ❄️

Hashnode logo

GitHub Build GitHub GitHub GitHub

Documentation | API reference | Quickstart | Join the Community | Pypi |

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
uv sync

🚀 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

ragrank-0.0.9.tar.gz (549.0 kB view details)

Uploaded Source

Built Distribution

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

ragrank-0.0.9-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file ragrank-0.0.9.tar.gz.

File metadata

  • Download URL: ragrank-0.0.9.tar.gz
  • Upload date:
  • Size: 549.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ragrank-0.0.9.tar.gz
Algorithm Hash digest
SHA256 808a45c494f28251cc4e1716604e1fbd8acea160720c6ce909b086fc73ff7e98
MD5 7b50be8e29d6c75b75b553eff0daa7c2
BLAKE2b-256 9dc71c8ffab94b9e2ef47d26dc7860ceb2f679dcee69ee908aae770d380d77cd

See more details on using hashes here.

File details

Details for the file ragrank-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: ragrank-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ragrank-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 20704e6c71410fcaffbed4ed00cd2c725ed937d41e28bfed55a74bebdf6db7e5
MD5 26124800821c1c53fa5568b0fd92a12c
BLAKE2b-256 5aed90dbc6d0d9e022d2e9625a38fbcfbc0352a5febdfb0bce36b03c43febc67

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