Skip to main content

RagaAI - Logo

Raga LLM Hub

Raga AI | Documentation | Getting Started

PyPI - Version Open In Colab Python Compatibility

Welcome to Raga LLM Eval, a comprehensive evaluation toolkit for Language and Learning Models (LLMs). With over 100 meticulously designed metrics, it is the most comprehensive platform that allows developers and organizations to evaluate and compare LLMs effectively and establish essential guardrails for LLMs and Retrieval Augmented Generation(RAG) applications. These tests assess various aspects including Relevance & Understanding, Content Quality, Hallucination, Safety & Bias, Context Relevance, Guardrails, and Vulnerability scanning, along with a suite of Metric-Based Tests for quantitative analysis.

The RagaAI LLM Hub is uniquely designed to help teams identify issues and fix them throughout the LLM lifecycle, by identifying issues across the entire RAG pipeline. This is pivotal for understanding the root cause of failures within an LLM application and addressing them at their source, revolutionizing the approach to ensuring reliability and trustworthiness.

Installation

Via pip

# Create and activate a new Python environment
python -m venv venv
source venv/bin/activate
# Install Raga LLM Hub
pip install raga-llm-hub

Via conda

# Create and activate a new Conda environment
conda create --name myenv python=3.11
conda activate myenv
# Install Raga LLM Hub
python -m pip install raga-llm-hub

Quick Tour

Initialization

from raga_llm_hub import RagaLLMEval, get_data

# Initialize the evaluator with your API key
evaluator = RagaLLMEval(api_key="your_api_key")
  1. Re-using Previous Results Leverage previous results for comparative analysis or to track your LLM's performance over time.
PREV_EVAL_ID = "PREVIOUS_RUN_ID"

evaluator.load_eval(
    eval_name=PREV_EVAL_ID
)

evaluator.print_results()
evaluator.save_results("filename.json")

Discover and Run Tests

# List all available tests
evaluator.list_available_tests()

# Add and run a custom test
evaluator.add_test(
    test_name="relevancy_test",
    data={
        "prompt": "How are you?",
        "context": "Responding as a student to a teacher.",
        "response": "I am well, thank you.",
    },
    arguments={"model": "gpt-4", "threshold": 0.5},
).run()

# Review the results
evaluator.print_results()

Managing Results

  • Instant Overview: Quickly view your test results directly.
  • Save for Detailed Analysis: Export your results for comprehensive examination or sharing with your team.
  • In-depth Access: Utilize the app for advanced result processing and visualization.
  • Historical Comparisons: Leverage past evaluations for ongoing performance tracking.
# Printing Results: View your test results immediately for a quick analysis
evaluator.print_results()

# Saving Results: Export your results to a JSON file for in-depth analysis 
evaluator.save_results("my_test_results.json")

# Accessing Results: Utilize the fetched detailed results and metrics for further processing or visualization
detailed_results = evaluator.get_results()

# Re-using Previous Results: If you have an evaluation ID from a previous run, you can load and compare those results
previous_eval_id = "your_previous_eval_id_here"
evaluator.load_eval(previous_eval_id)

# After loading, you can print, save, or further analyze these results
evaluator.print_results()

Enterprise

Enterprise Version Introducing raga-llm-platform,(enterprise version of raga-llm-hub) for Large Language Model (LLM) evaluation and guardrails, designed to empower organizations to harness the full potential of LLMs securely and efficiently. Here’s what sets raga-llm-platform apart:

  1. Production Scale Analysis
  2. State-of-the-Art Evaluation Methods and Metrics
  3. Issue Diagnosis and Remediation
  4. On-Prem/Private Cloud Deployment with Real-Time Streaming Support
  5. Real-Time Evaluation and Guardrails

To learn more and see how raga-llm-platform can benefit your organization, book a call with our team today. Discover the value of enterprise-grade LLM management tailored to your needs.

Learn More

For those who wish to dive deeper, we encourage exploring our extensive documentation

For more details and the latest news from RagaAI, visit our official website.

Release files for raga-llm-hub 1.0.0.9

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

Source distribution (sdist)

Source distribution for raga-llm-hub 1.0.0.9
File Size Uploaded
raga-llm-hub-1.0.0.9.tar.gz 783.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for raga-llm-hub 1.0.0.9
File Interpreter ABI Platform
raga_llm_hub-1.0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / raga-llm-hub-1.0.0.9.tar.gz

Download URL raga-llm-hub-1.0.0.9.tar.gz
Size 783.3 kB
Tags Source
SHA-256 checksum
How to use checksums
26b40ece45ae23cc4487c6f3c3003acb57d2e3ec909feef285ece4ba7e7c0bd8
BLAKE2b-256 checksum
How to use checksums
38ec8f79c048be4ae2a4a6ed3d1e261e19352bc69cb495c71bfba682deeabab0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.4

Release files / raga_llm_hub-1.0.0.9-py3-none-any.whl

Download URL raga_llm_hub-1.0.0.9-py3-none-any.whl
Size 903.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
915c41f12ff0986aa682a56b2cc2b6ff638e9e6ea376c3f4ae645b88f6e1f141
BLAKE2b-256 checksum
How to use checksums
76f16e621a37d8d41fb6bf8d4d7d0ddcf0d545932dd5642b69c013e2d20b1ddd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.4
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