PubliusAu / ragas

Evaluation framework for your Retrieval Augmented Generation (RAG) pipelines

Home Page:https://docs.ragas.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Evaluation framework for your Retrieval Augmented Generation (RAG) pipelines

GitHub release Build License Open In Colab discord-invite Downloads

๐Ÿš€ Dedicated solutions to evaluate, monitor and improve performance of LLM & RAG application in production including custom models for production quality monitoring.Talk to founders

Ragas is a framework that helps you evaluate your Retrieval Augmented Generation (RAG) pipelines. RAG denotes a class of LLM applications that use external data to augment the LLMโ€™s context. There are existing tools and frameworks that help you build these pipelines but evaluating it and quantifying your pipeline performance can be hard. This is where Ragas (RAG Assessment) comes in.

Ragas provides you with the tools based on the latest research for evaluating LLM-generated text to give you insights about your RAG pipeline. Ragas can be integrated with your CI/CD to provide continuous checks to ensure performance.

๐Ÿ›ก๏ธ Installation

pip install ragas

if you want to install from source

git clone https://github.com/explodinggradients/ragas && cd ragas
pip install -e .

๐Ÿ”ฅ Quickstart

This is a small example program you can run to see ragas in action!

from ragas import evaluate
from datasets import Dataset
import os

os.environ["OPENAI_API_KEY"] = "your-openai-key"

# prepare your huggingface dataset in the format
# Dataset({
#     features: ['question', 'contexts', 'answer', 'ground_truths'],
#     num_rows: 25
# })

dataset: Dataset

results = evaluate(dataset)
# {'context_precision': 0.817,
# 'faithfulness': 0.892, 
# 'answer_relevancy': 0.874}

Refer to our documentation to learn more.

๐Ÿซ‚ Community

If you want to get more involved with Ragas, check out our discord server. It's a fun community where we geek out about LLM, Retrieval, Production issues, and more.

๐Ÿ” Open Analytics

We track very basic usage metrics to guide us to figure out what our users want, what is working, and what's not. As a young startup, we have to be brutally honest about this which is why we are tracking these metrics. But as an Open Startup, we open-source all the data we collect. You can read more about this here. Ragas does not track any information that can be used to identify you or your company. You can take a look at exactly what we track in the code

To disable usage-tracking you set the RAGAS_DO_NOT_TRACK flag to true.

About

Evaluation framework for your Retrieval Augmented Generation (RAG) pipelines

https://docs.ragas.io

License:Apache License 2.0


Languages

Language:Python 98.8%Language:Makefile 1.1%Language:Dockerfile 0.1%