# How to Evaluate a RAG App With an LLM as a Judge (Free, on Your Own Laptop)

> A step-by-step way to evaluate a RAG app: build test questions from your own document, grade every answer with an LLM as a judge, and track the runs in MLflow. Free, in Docker.

Page: https://datautility.in/blog/how-to-evaluate-rag-app-llm-as-a-judge-free-lab
This is the Markdown copy of the page. The tool itself runs in the browser: your files are processed on your own device and are not uploaded.

Published 2026-11-28 · Analyze & protect · how to evaluate rag, llm as a judge, rag evaluation, ai evals tutorial, llm evaluation for beginners, evaluate rag app free, mlflow llm evaluation, deepeval tutorial

Short answer: to evaluate a RAG app you need three things: a set of test questions with the answers you expect, a way to run your app on each question, and a judge that grades every answer and explains why. An LLM can be the judge. You can try the whole loop for free on your own computer with Data Utility's Evals Lab: upload a document, let the model write test questions from it, run an LLM as a judge, and read a score and a reason for every case.

Open the tool: [Evals Lab](https://datautility.in/evalslab)

## Why "it looks fine" is not an evaluation

A RAG app answers from your documents. It can fail in three different places: the **retrieval** can fetch the wrong chunk, the **answer** can say something the chunk does not support, or the answer can ignore the question. If you only read a few replies by hand, you will miss most of these. An evaluation runs the same questions every time and gives you numbers you can compare after a change.

## The four pieces of a RAG evaluation

| Piece | What it is | In Evals Lab |
|---|---|---|
| Test set | Questions with the answer you expect | Step 3: the model writes one question per chunk, or you add your own |
| Retrieval | Which chunks are fetched for a question | Keyword (BM25) search over your chunks; you choose how many (k) |
| Answer | What your app says, from those chunks | A small RAG system answers each question |
| Judge | A model that grades the answer | Step 4: your judge prompt, with a score and a reason per case |

## Step by step in the lab

1. **Start the lab.** Docker Desktop plus two commands from the [Evals Lab page](https://datautility.in/ai-evals-lab). The build takes about a minute.

2. **Add your own model key.** Gemini, Claude, OpenAI, or any OpenAI-compatible server. Gemini has a free tier.

3. **Upload a document and cut it into chunks.** Pick one of five methods (recursive, Markdown, paragraph, sentence, fixed size). See [which chunk size works best](https://datautility.in/blog/rag-chunk-size-best-chunking-strategy-experiment).

4. **Generate test questions.** The model writes a question and an expected answer from each chunk. Read them and delete the weak ones. Add a few of your own: they matter most.

5. **Write or pick a judge.** Start from Correctness, Faithfulness or Relevance and edit the prompt.

6. **Run it, then read Results.** You get a score and a pass rate per metric, and a reason for every test case.

## Which judge to use

| Judge | Question it answers | Uses {context}? |
|---|---|---|
| Correctness | Does the answer match the expected answer? | No |
| Faithfulness | Is every claim supported by the retrieved chunks? | Yes |
| Relevance | Does the answer address the question directly? | No |

Faithfulness is the one that catches hallucinations: the judge sees the retrieved chunks (`{context}`) and is told not to use its own knowledge. The prompt can use `{question}`, `{expected}`, `{answer}` and `{context}`, and the judge replies with JSON that has a `score` and a `reason`. The defaults are a 1 to 5 scale, a pass at 4 or above, 3 retrieved chunks and 20 test cases.

## Read the reasons, not only the score

A pass rate is a summary. The reason on each case tells you what to fix: a wrong chunk was retrieved (change chunking or k), the answer added facts (tighten the answer prompt), or the question was badly written (fix the test case). If the judge gives every case full marks, it is not measuring anything. See [how to check your judge](https://datautility.in/blog/can-you-trust-llm-as-a-judge-check-your-judge).

## Track every run

Every judge run is logged. The **MLOps** tab shows model calls, input and output tokens, latency and an estimated cost for each run, and the same runs are logged to MLflow at `localhost:5050`, where you can put two runs side by side on one chart. Each test case makes two model calls (one to answer, one to judge), so the default 20 cases make 40 calls.

## What this does not do

- Retrieval in the lab is keyword search (BM25), not embeddings. It is good for learning how chunking and k change results, but it is not your production retriever.

- Twenty questions is a learning-sized test set. For a real app, build a larger set from real user questions.

- An LLM judge can be wrong or lenient, so check it before you trust a number.

## Your data stays with you

The lab runs in Docker on your computer and the page talks only to `localhost`. Your files live in a Docker volume. The lab sends chunks and questions only to the model provider you chose.

## Further reading

If you want the theory, these are good guides: the [MLflow LLM-as-a-judge page](https://mlflow.org/llm-as-a-judge), [DeepEval's guide to LLM-as-a-judge](https://deepeval.com/guides/guides-llm-as-a-judge) and the [Evidently RAG evaluation guide](https://www.evidentlyai.com/llm-guide/rag-evaluation).

## How to use the Evals Lab: step by step

1. Start the lab with the Docker commands
2. Add your API key and upload a document
3. Generate test questions and add a few of your own
4. Run a judge and read the reasons in Results

## When to use the Evals Lab

- Learning how RAG evaluation works before building it at work
- Checking a document-based assistant for made-up answers
- Comparing chunking settings with the same judge
- Practising for AI engineer interviews

## Frequently asked questions

### How do I evaluate a RAG app?
Build test questions with expected answers, run your app on each one, and grade every answer with a judge that returns a score and a reason. Evals Lab does this on your own computer: it generates questions from your document, runs an LLM judge and logs each run to MLflow.

### What is an LLM as a judge?
A language model that grades another model's answer using a prompt you write, for example "is every claim supported by this context?". It replies with a score and a reason for each test case.

### Is Evals Lab free?
The lab is free and runs in Docker on your computer. You use your own model key; Gemini has a free tier, and Claude and OpenAI bill you directly.

### Does it use embeddings?
No. Retrieval in the lab is BM25 keyword search over your chunks, which is enough to see how chunking and the number of retrieved chunks change the results.

Tip: Run Faithfulness and Correctness on the same test cases. A case that passes Correctness but fails Faithfulness is an answer that is right by luck, not because of your documents.

## Also try

- [Which chunk size is best for RAG?](https://datautility.in/blog/rag-chunk-size-best-chunking-strategy-experiment)
- [Can you trust an LLM judge?](https://datautility.in/blog/can-you-trust-llm-as-a-judge-check-your-judge)
- [Free dbt playground](https://datautility.in/blog/free-dbt-playground-learn-dbt-without-warehouse)

## More guides

- [Data Profiler: Check Data Quality Before You Use It](https://datautility.in/blog/data-profiler-check-data-quality)
- [Compare Two CSV or Excel Files: Find Added, Removed and Changed Rows](https://datautility.in/blog/compare-two-csv-files-find-differences)
- [Data Masking: Hide Emails, Phones and Names Before Sharing](https://datautility.in/blog/data-masking-hide-emails-phones-pii)
