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 examplesragas_examples.benchmark_llm- LLM benchmarking and comparison examplesragas_examples.prompt_evals- Prompt evaluation examplesragas_examples.rag_eval- RAG system evaluation examplesragas_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 versioned independently using Git tags with prefix
examples-v(e.g.,examples-v0.1.0). - Publishing is handled by the GitHub Actions workflow
publish-examples.yml, which builds fromexamples/and publishes to PyPI when such a tag is pushed.
Release Commands
To create and push a new release:
# Create and push a new tag (replace X.Y.Z with actual version)
git tag examples-vX.Y.Z
git push origin examples-vX.Y.Z
# Example:
git tag examples-v0.1.0
git push origin examples-v0.1.0
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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ragas_examples-0.4.3.tar.gz | 89.9 kB | Without provenance | Details for ragas_examples-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ragas_examples-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for ragas_examples-0.4.3-py3-none-any.whl |
Total release size: 175.3 kB
Release files / ragas_examples-0.4.3.tar.gz
| Download URL | ragas_examples-0.4.3.tar.gz |
|---|---|
| Size | 89.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d3e5666abe6e81c46c137b785c11649d3a88d922e58e074b23ad52aaef591bb
|
|
BLAKE2b-256 checksum How to use checksums |
2576013c73aabb23af84a756aa05cc913f81034785c6b402fae82e70e35a76a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / ragas_examples-0.4.3-py3-none-any.whl
| Download URL | ragas_examples-0.4.3-py3-none-any.whl |
|---|---|
| Size | 85.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d601d2272fbb0224e90abaac65d2c73e50ee38057c185adf800c70feeaa49d54
|
|
BLAKE2b-256 checksum How to use checksums |
3faf16b9697be82df3cc65823a7a71538c9524cef0a53e7ce952b1a461330753
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for ragas-examples 0.4.3
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.