Skip to main content

RAG Evaluation Framework using Ragas metrics and MLflow tracking

Project description

RAGSentinel

RAG Evaluation Framework using Ragas metrics and MLflow tracking.

Installation

pip install rag-sentinel

Quick Start

1. Initialize Project

mkdir my-rag-eval
cd my-rag-eval
rag-sentinel init

This creates:

  • .env - LLM/Embeddings API keys
  • config.ini - App settings and authentication
  • rag_eval_config.yaml - Master configuration

2. Configure

Edit .env:

LLM_PROVIDER=azure
AZURE_LLM_API_KEY=your-api-key
AZURE_LLM_ENDPOINT=https://your-resource.openai.azure.com/

Edit config.ini:

[app]
app_url = https://your-rag-app.com/backend

[auth]
type = cookie
cookie_name = session
cookie_value = your-session-cookie

3. Create Test Dataset

Create test_dataset.csv:

query,ground_truth,chat_id
Hello,Hello! How can I help you?,1

4. Run Evaluation

rag-sentinel run

View results at: http://127.0.0.1:5001

CLI Commands

rag-sentinel init              # Initialize project
rag-sentinel run               # Run evaluation (auto-starts MLflow)
rag-sentinel run --no-server   # Run without starting MLflow
rag-sentinel validate          # Validate configuration

Metrics

  • Faithfulness - Factual consistency of answer with context
  • Answer Relevancy - How relevant the answer is to the question
  • Context Precision - Quality of retrieved context
  • Answer Correctness - Comparison against ground truth

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rag_sentinel-0.1.2.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rag_sentinel-0.1.2-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file rag_sentinel-0.1.2.tar.gz.

File metadata

  • Download URL: rag_sentinel-0.1.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for rag_sentinel-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1890762959974610bafcde71e38d7bd6b8615f976987da9f7f946d7a36d2dddd
MD5 2ff7ccebfa6aa165b16b6aab50f34c69
BLAKE2b-256 f03a449bc09faadd85059cd89c065e9af1a1e95d82856a212e34da6d39a5f4c5

See more details on using hashes here.

File details

Details for the file rag_sentinel-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: rag_sentinel-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for rag_sentinel-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5bb9019f2c89bec773d310299fb6390d7cecfa02c3116aad496aaa90f4e9d14
MD5 187103ba1fe48cfce5e08cb21c89a866
BLAKE2b-256 c126896a9e777aee70f3ad6619678058ece862b7fe05197b15448cb6d0bb58ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page