Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Ragas Examples

Official examples demonstrating how to use Ragas for evaluating different types of AI applications including RAG systems, agents, prompts, workflows, and LLM benchmarking. These examples might be unstable and are subject to change.

Installation

From PyPI (after release)

pip install "ragas[examples]"

Local Development

Install both main ragas and examples packages in editable mode:

cd /path/to/ragas
uv pip install -e . -e ./examples

Or using regular pip:

cd /path/to/ragas  
pip install -e . -e ./examples

Available Examples

  • ragas_examples.agent_evals - Agent evaluation examples
  • ragas_examples.benchmark_llm - LLM benchmarking and comparison examples
  • ragas_examples.prompt_evals - Prompt evaluation examples
  • ragas_examples.rag_eval - RAG system evaluation examples
  • ragas_examples.workflow_eval - Workflow evaluation examples

Usage

Set Environment Variables

Most examples require API keys to be set:

export OPENAI_API_KEY=your_key_here

For Google Drive examples, also install the gdrive extra:

pip install "ragas[examples,gdrive]"

Running Examples as Modules

After installation, you can run examples directly:

# Run benchmark LLM prompt example
python -m ragas_examples.benchmark_llm.prompt

# Run benchmark LLM evaluation
python -m ragas_examples.benchmark_llm.evals

# Run other examples
python -m ragas_examples.rag_eval.evals
python -m ragas_examples.agent_evals.evals
python -m ragas_examples.prompt_evals.evals
python -m ragas_examples.workflow_eval.evals

Release process

  • The examples package is released together with ragas and shares its version, which comes from the release tag (e.g., v0.4.4).
  • Publishing is handled by the GitHub Actions workflow python-publish.yml. When a GitHub release is published it checks the tag, runs the unit tests and a clean-install check, and then uploads both ragas and ragas-examples to PyPI.

Local Development & Testing

Local Development & Testing

Verify Installation

# Test module execution
python -m ragas_examples.benchmark_llm.prompt --help

Metadata

Release files for ragas-examples 0.4.4rc1

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

Source distribution (sdist)

Source distribution for ragas-examples 0.4.4rc1
File Size Uploaded Provenance Actions
ragas_examples-0.4.4rc1.tar.gz 91.5 kB Without provenance Details for ragas_examples-0.4.4rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ragas-examples 0.4.4rc1
File Interpreter ABI Platform Actions
ragas_examples-0.4.4rc1-py3-none-any.whl Python 3 none any Details for ragas_examples-0.4.4rc1-py3-none-any.whl

Total release size: 176.8 kB

Release files / ragas_examples-0.4.4rc1.tar.gz

Download URL ragas_examples-0.4.4rc1.tar.gz
Size 91.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e202f79ff681fa9cc24386eebc79a9a7f5621d1ab9da498a09d6b85631122bfe
BLAKE2b-256 checksum
How to use checksums
9dbb47dca3e9d83980e46d24b03627db98ae2c8a387751fb987babe0cde982af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ragas_examples-0.4.4rc1-py3-none-any.whl

Download URL ragas_examples-0.4.4rc1-py3-none-any.whl
Size 85.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f72ad2e9abd3531963d2256f314a5cab55a1050a1ef4d0ad2e1d42659e023d8
BLAKE2b-256 checksum
How to use checksums
97a56e5d134506a079b5bf60008ad48492a1e5831e43bfca7bebdc03459aeb7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for ragas-examples 0.4.4rc1

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.

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