rag-eval: A Zero-Dependency, No-API-Key RAG Evaluation Tool

rag-eval: a lightweight, zero-dependency RAG evaluation tool with free local metrics and optional LLM judging.
rag-eval is an open-source evaluation tool for RAG pipelines, offering zero dependencies, framework-agnostic design, and no API keys required. It reads standard JSONL files and is compatible with Haystack, LangChain, and LlamaIndex. Built-in local lexical claim-overlap scoring and set-based retrieval metrics enable fast, cost-free bulk evaluation; an optional `--judge openai` flag activates LLM Judge for semantic precision when needed. Available as both a CLI and a FastAPI microservice, it supports both manual local evaluation and CI/CD integration — making it ideal for small teams and individual developers in rapid iteration phases.
The Pain Points of RAG Evaluation: Expensive, Heavy, Hard to Deploy
Retrieval-Augmented Generation (RAG) has become the dominant paradigm for building enterprise-grade AI applications, yet objectively measuring the quality of a RAG pipeline remains a persistent headache for engineers. Existing evaluation frameworks tend to fall into one of two traps: either they require installing a mountain of heavy dependencies that bloat your project environment, or every evaluation run calls the OpenAI API and costs money that scales linearly with the number of experiments.
Neither option is developer-friendly for teams that need to iterate frequently and compare retrieval strategies repeatedly. An open-source tool called rag-eval is built specifically to fill this gap — its core value proposition is straightforward: zero dependencies, no API keys required, and framework-agnostic.

Core Design of rag-eval
The author introduced the tool on Reddit, highlighting several key features centered on one overarching philosophy: take "lightweight" and "no lock-in" to the extreme.
Zero Lock-In: Works Directly with JSONL Files
rag-eval doesn't bind to any specific framework. Whether your data comes from Haystack, LangChain, LlamaIndex, or a hand-rolled Python script, as long as you can export it as a standard .jsonl file, you can feed it directly into rag-eval for evaluation. This design avoids deep coupling between the tool and any particular ecosystem, so teams can switch underlying frameworks without rewriting their evaluation code.
Local Scoring — No API Keys Needed
This is rag-eval's most practical feature. It includes two types of scoring that run entirely locally — free and fast:
- Lexical claim-overlap scorer: Measures consistency between the generated answer and the reference answer using vocabulary overlap.
- Set-based retrieval metrics: Evaluates the quality of documents retrieved during the retrieval stage.
Neither metric depends on any external large language model. They're fast and cheap to run, making them ideal for rapid iteration and regression testing during development.
The underlying logic of the claim-overlap scorer draws from classical information retrieval methods. It decomposes both the generated and reference answers into tokens or n-gram segments and computes their overlap ratio — essentially the same family of ideas as ROUGE metrics (especially ROUGE-1 and ROUGE-2). The advantages of these metrics are speed, reproducibility, and determinism, making them excellent "smoke tests" for quickly filtering out obviously poor retrieval or generation results. Their limitations are equally clear: synonym substitution, reordering, and paraphrasing can cause answers that are semantically correct but lexically dissimilar to score poorly. In practice, lexical metrics are best used to filter bulk obvious failures, not as the sole final quality arbiter. Set-based retrieval metrics correspond to classic concepts like Precision@K and Recall@K, measuring how many retrieved documents are truly relevant and what fraction of relevant documents were recalled.
Optional LLM Judge
Lexical scoring is fast, but it struggles to capture semantic correctness. To address this, rag-eval includes an optional switch: when you need finer-grained semantic judgment, simply add --judge openai to enable a large language model as a "judge" for validation. This layered strategy — "save money by default, evaluate precisely when needed" — balances cost and quality effectively.
LLM-as-Judge is an important paradigm that has gained traction in RAG evaluation over the past couple of years, popularized by research like MT-Bench and Chatbot Arena. The core idea is to send both the candidate answer and the reference answer (or scoring rubric) to a capable large language model, which then outputs a quality score or comparative judgment. This approach can capture semantic equivalence, logical correctness, and factual consistency — dimensions that lexical metrics simply cannot cover. However, it comes with known biases: position bias (favoring the first option), verbosity bias (giving higher scores to longer answers), and self-preference (OpenAI models tend to favor GPT-style responses). rag-eval's decision to make this an opt-in rather than the default reflects a pragmatic engineering trade-off between cost controllability and evaluation precision.
CLI and FastAPI: Two Modes of Use
rag-eval ships in two forms:
- CLI: Outputs rich-text terminal tables that display metrics at a glance, with support for exporting JSON results.
- FastAPI microservice: Provides an
/evaluateendpoint for easy integration into CI/CD pipelines or online evaluation systems.
This means rag-eval covers both local manual evaluation runs and automated pipeline integration. Getting started is trivially simple: a single pip install rag-eval is all it takes.
Integrating evaluation into CI/CD pipelines is a hallmark of RAG engineering reaching production maturity. The typical approach is to automatically trigger an evaluation pipeline after each code commit or retrieval strategy change, compare key metrics (such as claim-overlap scores and retrieval recall) against predefined thresholds, and block merges if metrics degrade beyond an acceptable range. The FastAPI endpoint makes it possible for tools like GitHub Actions, GitLab CI, or Jenkins to call rag-eval via standard HTTP requests — no need to install complex dependencies in the CI environment. Just spin up a lightweight service and complete the evaluation loop. This "evaluation as a service" pattern is the key step in upgrading RAG quality assurance from after-the-fact manual review to automated regression testing.
Who Is It For?
rag-eval has a very clear positioning — it's not trying to replace full-featured, heavyweight evaluation platforms. Instead, it offers a pragmatic choice for developers who prioritize being lightweight, fast, and cost-efficient.
If you're in the rapid development phase of a RAG application, frequently comparing different retrieval strategies or prompts, and don't want to pay API fees every time, then using its local lexical metrics for initial screening — and only enabling the LLM Judge at critical checkpoints for semantic validation — is a highly efficient workflow.
For teams looking to embed evaluation into their engineering process, the FastAPI endpoint also lowers the integration barrier significantly.
A Thought: The Value of Lightweight Evaluation
The emergence of tools like this reflects the maturing of RAG engineering practices. In the early days, the focus was on "can it run at all?" Now, more and more teams recognize that without quantifiable evaluation, there's no way to truly optimize a pipeline.
And if evaluation itself becomes too expensive, it actually slows down iteration velocity. rag-eval's layered approach — "free local metrics + optional LLM precision evaluation" — keeps evaluation costs within a manageable range, which is especially meaningful for small-to-medium teams and individual developers.
Of course, lexical overlap metrics have their limits and cannot fully replace semantic-level judgment. Final quality assurance still requires careful use of LLM Judge or human evaluation. As an open-source project, its maturity and long-term maintenance are also subject to community validation. Interested readers can check out the source code on GitHub.
Related articles

Charging AI Agents Per Web Page: I Watched Claude Pay a Penny Per Visit
A developer charged AI agents one cent per page and watched Claude pay automatically. This experiment reveals new possibilities for micropayments, agent economics, and content monetization.

TMLR's Bold Experiment: Asking Authors to Explain Their Own Papers — The Results Are Alarming
TMLR contacted authors of 10 desk-rejected papers and asked them to explain their submissions. The results were alarming — none passed. A wake-up call on AI-era academic integrity.

Snap Launches Specs Intelligence: A Cross-Platform AI Assistant Coming to iOS and Mac
Snap launches Specs Intelligence, an anticipatory AI assistant connecting digital accounts for work and travel, coming to iOS and Mac to compete with Meta Muse and Gemini Spark.