←
ENFR

Veritas·RAG

Open-source RAG evaluation framework: three retrieval strategies on one corpus, scored by an LLM judge, with regression detection between runs.

3retrieval strategies
1,600+automated tests
CIlint, types, tests, audits, Docker
View on GitHub →
The advisor only asks questions that can change the recommendation: question type, latency, volume, named entities, hosting.
1. A few questions about the project
Veritas·RAG recommends classic RAG and explains why, based on the reference benchmark.
2. The recommended strategy, with its reasons

Problem: Evaluating RAG in Production

Production RAG systems are hard to evaluate. Deploying an optimization looks good in testing but degrades performance on real-world queries. Most teams rely on manual evaluation or naive accuracy metrics that miss latency, token cost, and hallucination risks.

Solution: Evaluation Pipeline

RAG evaluation pipeline Questions enter the pipeline, are embedded and retrieved from the vector store, reranked, then answered by the LLM. Answers are scored by an LLM judge against a golden dataset, and a regression detector flags when a change degrades results. RAG Evaluation Pipeline RAG Input Prompts & Queries LLM Generation Outputs from Multiple Strategies Metric Evaluation Quality, Latency, Tokens Regression Detection Run vs. run Score deltas Report Per-strategy comparison 3 Retrieval Strategies Compared Classic Hybrid: dense + BM25 RRF + cross-encoder Rerank, BM25 fallback reported in each answer Baseline Graph Entity triples Graph walk Relationship questions Lowest latency Same recall as classic Agentic Claude + Tool Use Iterative Retrieval Tool loop 1.9× tokens Can decline to answer Evaluation Metrics Faithfulness & Relevance Latency per question Tokens Recall, MRR

How it works

Ingestion layer: parsers for PDF, DOCX, PPTX, HTML, email and scanned documents (OCR), chunking that cuts at headings first and never splits a table row, and access-control metadata on every chunk. Re-uploading an unchanged file is idempotent.

Retrieval layer: three interchangeable strategies.

Evaluation

Built like a product

Results: measured baseline

34 reference questions on the bundled corpus (41 documents, 107 chunks), measured on 2026-09-08 on the dense-only pipeline, right after the reranker fix (see below). A new baseline on the hybrid pipeline is in progress.

MetricClassicGraphAgentic
Retrieval recall0.7650.7650.544
MRR0.5540.5540.356
Faithfulness0.5070.5190.249
Answer relevance0.8620.8540.521
Latency per question21.7 s15.2 s18.0 s
Tokens (total)389k397k727k

What evaluation exposed

The first LLM-judge scores were low while every request returned HTTP 200. Tracing the pipeline, I found a wrong model ID: the cross-encoder never loaded, and the system silently fell back to BM25. In the same pass: an index holding the corpus twice. After the fix, every answer reports which reranker actually ran, and the model is part of the configuration the regression check compares, so a degraded run is never compared with a healthy one.

Technology stack

QdrantBM25Langfuse