Back to Blog
Insights

How to Test a RAG System Before Your Users See It

The problem: the demo looked fine, so why not launch? Your team built a search assistant over company documents. In the demo, it answered ten questions well. Leaders clapped. Now someone asks, "Can we...

Abstract diagram of two linked stages, a search funnel feeding an answer block, with a row of checkmark shapes beneath each stage.
SG
Saksham Gupta
Founder & CEO, EduBild
December 4, 2026
5 min read
TechniqueRAGEnterprise AIProduction Trust

The problem: the demo looked fine, so why not launch?

Your team built a search assistant over company documents. In the demo, it answered ten questions well. Leaders clapped. Now someone asks, "Can we roll it out?"

That is the hard moment. Ten good answers do not tell you how the system behaves on the next ten thousand questions. Nobody has measured it yet.

This post is for the practitioners who must answer that question, and for the leaders who sign off. We explain how to test a retrieval-augmented generation (RAG) system. RAG means the AI looks up your documents before it answers. We end with what it means for you as a leader.

Why it is hard in production, not just in a demo

A RAG system has two parts. One part finds passages in your documents. The other part writes the answer from those passages. Either part can fail, and the failures look different.

If the search part finds the wrong passage, the writing part will still produce a fluent answer. It will sound sure of itself. Users cannot tell the difference, so they trust a wrong answer.

Real questions are also messier than demo questions. People misspell words. They use short forms from their own team. They ask in more than one language. They ask things the documents do not cover at all.

Documents change too. A policy gets updated. A table is replaced. An answer that was right last month is wrong today, and no one gets an alert.

So a single score on launch day is not enough. You need tests that run again and again.

How we approach it

We test the two parts separately, then together. Our engineers work inside your team, so your own experts help build the tests. Our process puts this work before any rollout, not after.

Step 1: Build a question set from real work

We start with real questions. We ask your staff for the questions they ask today, and we pull them from email, chat and helpdesk history where you allow it. Aim for a mix: easy ones, hard ones, badly worded ones and some with no answer in the documents.

For each question, a subject expert writes the correct answer and marks the page or section it comes from. This is slow work. It is also the most valuable asset in the project. Without it, you are guessing.

Step 2: Test the search part alone

For each question, check one thing first. Did the system find the right passage in its top results? Do this before looking at any written answer.

Track how often the right passage appears near the top. When it does not, fix the search. Common fixes include cutting documents into better pieces, cleaning scanned files, and adding keyword search next to meaning-based search. Our RAG systems work covers these fixes. Scanned and messy files often need document AI and OCR first, so the text can be read at all.

Step 3: Test the written answer

Now check the answer against two questions:

  1. Is every claim backed by the passages the system found?
  2. Does the answer actually address what the user asked?

An answer can be true yet miss the point. It can also sound on point while adding facts that are not in the sources. Both need to be caught.

You can use a second AI model to grade answers at scale. Treat it as a helper, not a judge. Have experts grade a sample by hand, and compare their grades with the AI grader. If the two disagree often, do not trust the AI grader yet.

Step 4: Test what the system should refuse

Some questions have no answer in your documents. The right reply is "I could not find this." Include these in your set. Many systems fail here, because they try to be helpful and guess.

Also set a confidence level below which the system hands the question to a person. That rule belongs in the test plan from the start.

Step 5: Keep testing after launch

Run the full question set every time you change a document set, a model or a setting. Treat a drop in scores like a failed build. Add new real questions from users each month, especially the ones they rated badly. A simple dashboard of these scores lets owners see quality at a glance.

An example from our work

One example from our work: RAG search for a national statistics ministry: questions in Hindi, English and Kannada, by voice or text, with citations that link to the exact source page. 490+ legacy statistical tables indexed and queryable in plain language.

Citations like these matter for testing. When every answer points to a source page, an expert can check it in seconds.

An illustrative scenario

Imagine a mid-sized manufacturer that builds a RAG assistant over its quality manuals. The team writes 150 test questions with its quality engineers. Search testing shows the right page is missing for questions that use plant slang. The team adds a short list of local terms and re-runs the set. Scores improve before a single user logs in. This is a made-up case to show the method, not a result.

Takeaways: a pre-launch checklist

  1. Build a question set from real work, with expert-written answers and source pages.
  2. Test search and answers separately, so you know which part to fix.
  3. Include questions with no answer, and test that the system declines.
  4. Compare any AI grader with human graders before you rely on it.
  5. Re-run the full set after every change, and set a pass mark for release.

What this means for a business leader

You do not need to read the scores line by line. You need to ask four things before approving a launch.

  • Who wrote the test questions, and are they from real work?
  • What is the pass mark, and who set it?
  • What happens when the system does not know?
  • Who re-runs the tests when documents change?

If your team cannot answer these, the system is not ready. A clear test plan also gives you ROI evidence later, because you can show quality before and after each change.

Next step

If your team has a RAG assistant that needs proper testing in pilot but not in production, book a discovery call.

Share this article
SG

Saksham Gupta

Founder & CEO, EduBild

Saksham Gupta is the founder and CEO of EduBild, which embeds forward-deployed AI engineers with enterprise teams to ship production AI. Ex-Daimler AG; KIT Germany.