Skip to main content

Lighthouse for RAG systems - diagnose and fix your retrieval pipeline

Project description

ragcheck - Lighthouse for RAG Systems

PyPI version Python License: MIT

One command to diagnose your RAG pipeline and get actionable fixes.

pip install ragcheck-cli
ragcheck init
ragcheck run --docs ./data --query "What is Article 370?"

What is ragcheck?

ragcheck is a lightweight, one-command diagnostic CLI that generates a beautiful, shareable HTML report analyzing why your RAG system fails and how to fix it.

Think of it as Lighthouse for RAG systems — just like Lighthouse audits web pages, ragcheck audits your retrieval pipeline.

Features

  • Auto-Generated Test Suite - 50 synthetic questions from your documents
  • Chunk Visualizer - See exactly where your chunking breaks
  • Retrieval Heatmap - Identify dead chunks and dominant chunks
  • Failure Classification - Know WHY your RAG fails, not just THAT it fails
  • Actionable Recommendations - Specific fixes with predicted impact
  • CI/CD Integration - Fail builds when RAG quality regresses

Quick Start

Installation

pip install ragcheck-cli

Or with uv:

uv tool install ragcheck-cli

Initialize

ragcheck init

Creates a ragcheck.yaml config file in your project.

Run Analysis

ragcheck run --docs ./data --query "Your test query"

Generates ragcheck_report.html with:

  • Scorecards (retrieval accuracy, faithfulness)
  • Chunk boundary visualization
  • Retrieval heatmap
  • Failure mode classification
  • Before/after score predictions

CI Mode

ragcheck run --docs ./data --ci --min-score 0.80

Returns exit code 0/1. Use in GitHub Actions to fail builds on quality regression.

Example Report

ragcheck report

Architecture

ragcheck CLI
    ├── Chunk Analyzer (6 strategies + benchmark)
    ├── Retriever Tester (auto-QA + dense retrieval)
    ├── Failure Classifier (4 failure modes)
    ├── Recommendation Engine (decision tree)
    └── Report Engine (Jinja2 + CSS/HTML)

Tech Stack

Component Tool
CLI Typer + Rich
Config Pydantic
Embeddings sentence-transformers
Vector DB ChromaDB
LLM Interface LiteLLM
Reports Jinja2 + CSS/HTML

Configuration

ragcheck.yaml:

project_name: ragcheck
docs_path: ./data
chunking:
  strategy: recursive
  chunk_size: 512
  chunk_overlap: 128
llm:
  provider: openai
  model: gpt-3.5-turbo
retrieval:
  top_k: 5
  similarity_threshold: 0.7
report:
  format: html
  include_heatmap: true

Development

git clone https://github.com/pranay7863/ragcheck.git
cd ragcheck
uv sync
uv run pytest
uv run ruff check .
uv run mypy ragcheck/

Contributing

See CONTRIBUTING.md

License

MIT — see LICENSE

Roadmap

  • v0.2.0 — Offline reports, NLI faithfulness, scaled auto-QA, chunk viz
  • v0.2.2 — Prompt size fix, Gemini 3+ support, Groq TPM compliance
  • v0.3.0 — More vector DBs (Pinecone, Weaviate)
  • v0.3.0 — SaaS API for teams
  • v0.4.0 — Enterprise features (SSO, audit logs)

Support


Built with discipline. Read the blueprint that started it all.

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

ragcheck_cli-0.2.4.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

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

ragcheck_cli-0.2.4-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file ragcheck_cli-0.2.4.tar.gz.

File metadata

  • Download URL: ragcheck_cli-0.2.4.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for ragcheck_cli-0.2.4.tar.gz
Algorithm Hash digest
SHA256 5fe79eb905f336ffdf237e40d424e80b0247e684163efefd7ae1b7e6f5fddcd8
MD5 1c2f97e9709673dfc6abcfa35149cee0
BLAKE2b-256 8d5e3d3434dd0a580c6798d3fbf046df23f0ddc6fd2d2a4ffd8372f2946bf9b9

See more details on using hashes here.

File details

Details for the file ragcheck_cli-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: ragcheck_cli-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 34.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for ragcheck_cli-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 aafcdda88d15fa10bfc5e825e79496807564d31223256cfaef5f7909afdac7e3
MD5 e1088724615c5bf899202ad320b3fb4b
BLAKE2b-256 ea40bfa38fc5e852181a6354b46ab308c2bc6fd01d2daa3be1f735e825e770bc

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