Skip to main content

RAGE - Retrieval Augmented Generation Evaluation

TL;DR

RAGE is a tool for evaluating how well Large Language Models (LLMs) cite relevant sources in Retrieval Augmented Generation (RAG) tasks.

What am I looking at?

RAGE is a framework designed to evaluate Large Language Models (LLMs) regarding their suitability for Retrieval Augmented Generation (RAG) applications. In RAG settings, LLMs are augmented with documents that are relevant to a given search query. The key element evaluated is the ability of an LLM to cite the sources it used for answer generation.

The main idea is to present the LLM with a query and with relevant, irrelevant, and seemingly relevant documents. Seemingly relevant documents are from the same area as the relevant documents but don't contain the actual answer. RAGE then measures how well the LLM recognized the relevant documents.

Rage Evaluation Process Figure 1: RAGE Evaluation Process. Examples are extracted from the Natural Questions Dataset.

For a more detailed description of the inner workings, dataset creation and metrics, we refer to our paper:
→ Evaluating and Fine-Tuning Retrieval-Augmented Language Models to Generate Text With Accurate Citations

Installation

Pip:

pip install rage-toolkit

Build from source:

$ git clone https://github.com/othr-nlp/rage_toolkit.git
$ cd rage_toolkit
$ pip install -e .

Get Started

We recommend starting at the rage_getting_started.ipynb Jupyter Notebook. It gives you a quick introduction into how to set up and run an evaluation with a custom LLM.

Datasets

Note that RAGE works with any datasets that comply with our format. Feel free to create your own datasets that suit your needs.

For guidance on creating one, take a look at our preprocessed examples or refer to our paper.

Our datasets are built on top of those from the BEIR Benchmark (BEIR Benchmark).

Our preprocessed datasets can be found here:

Original Dataset Website RAGE version on Huggingface
Natural Questions (NQ) https://ai.google.com/research/NaturalQuestions RAGE - NQ
HotpotQA https://hotpotqa.github.io/ RAGE - HotpotQA

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests for improvements.

Metadata

Release files for rage-toolkit 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rage-toolkit 0.0.2
File Size Uploaded Provenance Actions
rage_toolkit-0.0.2.tar.gz 153.1 kB Without provenance Details for rage_toolkit-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rage-toolkit 0.0.2
File Interpreter ABI Platform Actions
rage_toolkit-0.0.2-py3-none-any.whl Python 3 none any Details for rage_toolkit-0.0.2-py3-none-any.whl

Total release size: 160.4 kB

Release files / rage_toolkit-0.0.2.tar.gz

Download URL rage_toolkit-0.0.2.tar.gz
Size 153.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7f7b676bae2b09cf523a3cb1dd98baac99cafd97d8689094de9f74041a84b7dc
BLAKE2b-256 checksum
How to use checksums
bda332006fa525acdd757ebecd6943bd38eb92633976820a44e62c8b26cc0008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.6

Release files / rage_toolkit-0.0.2-py3-none-any.whl

Download URL rage_toolkit-0.0.2-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f76e51a8b7ff6931babe201634eae894e24516db06d9d35a1831ded3cec7052
BLAKE2b-256 checksum
How to use checksums
43d685d05789d289cf4f2a4cb46ce69788e847e02faf6ed8bd783fadf1cf43c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.6

Security for rage-toolkit 0.0.2

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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page