Skip to content

ragdrift

Your RAG system is in production. Embeddings drift. Retrieval quality silently degrades. By the time users complain, it has been broken for weeks.

ragdrift watches five dimensions at once — data, embedding, response, confidence, and query-pattern — and gives you a single report you can threshold-alert on. Rust core for the math, Python for the glue.

Install

pip install ragdrift-py

Optional adapters and exporters:

pip install 'ragdrift-py[opensearch,aws]'    # OpenSearch + CloudWatch
pip install 'ragdrift-py[pgvector,prometheus]'
pip install 'ragdrift-py[pinecone,datadog]'

30-second example

import numpy as np
from ragdrift import RagDriftMonitor

baseline = np.load("baseline_embeddings.npy")  # (n, 768) float32
current  = np.load("current_embeddings.npy")

monitor = RagDriftMonitor(embedding_threshold=0.05)
report = monitor.evaluate(
    baseline_embeddings=baseline,
    current_embeddings=current,
)

if report.any_exceeded():
    print(report.to_json())

Where to next