NewAI impact in application development 2026 guide Explore Now
Quick Enquiry

How to Evaluate a RAG System Before Launch

A RAG application can retrieve a relevant document and still produce an incomplete answer. It can also generate a convincing response that includes information the retrieved material does not support.

Knowing how to evaluate RAG means examining retrieval, generated answers, and application behaviour separately, then checking how they perform together.

Before launch, the objective is to establish whether the system answers the intended questions using appropriate evidence, respects access boundaries, and behaves predictably when information is missing.

Define What the Evaluation Covers

Retrieval-augmented generation combines information retrieval with AI-generated responses. Evaluating RAG in AI applications therefore requires more than reviewing the final text.

The assessment should cover three areas:

  • Retrieval: Whether the system finds the evidence needed for the question.
  • Response quality: Whether the answer uses that evidence correctly and addresses the request.
  • Application behaviour: Whether permissions, failures, response times, and operating limits meet the intended requirements.

Nextwebi’s RAG application planning article covers broader architecture and readiness decisions. Pre-launch evaluation takes those decisions further by testing the implemented system against defined expectations.

Record the version being evaluated, including the source collection, index, retrieval settings, prompt configuration, and model. Without that record, results from different versions can become difficult to compare.

Build a Test Set That Reflects Actual Usage

An evaluation set should represent the work users expect the application to perform.

Collect questions from relevant employees, support records, search activity, or other approved sources. Remove unnecessary personal information before using operational records for testing.

Include more than straightforward questions with obvious answers. The test set should cover:

  • Questions answered by a single passage.
  • Requests requiring information from several passages.
  • Ambiguous questions that need clarification.
  • Questions involving updated or superseded information.
  • Requests outside the available knowledge.
  • Questions attempted by users with different access permissions.

For each case, record the expected behaviour, supporting sources where available, and the information an acceptable answer must contain.

A reference answer should identify the required facts without forcing the system to reproduce one exact wording.

Keep a separate evaluation subset that is not repeatedly used to tune the application. Otherwise, improvements may reflect familiarity with the test questions rather than broader reliability.

Inspect Retrieval Before Judging the Answer

When an answer fails, first check whether the necessary evidence reached the model.

A document being present in the repository does not establish that its relevant passage was retrieved or included in the final context.

Inspect the complete path: source ingestion, text extraction, indexing, filtering, ranking, and context assembly. Useful evidence can be lost at any of these stages.

For example, a retriever may find the correct document but select a passage that omits an important qualification. Alternatively, the required passage may be retrieved and then excluded when the application builds the model’s context.

Nextwebi’s RAG services include retrieval architecture, data preparation, ranking, filtering, and retrieval optimisation. These are relevant areas to investigate when evaluation reveals missing or unsuitable evidence.

Record the retrieved results and the context actually supplied to the model so those failures can be distinguished.

Choose RAG Evaluation Metrics That Answer Specific Questions

RAG evaluation metrics should explain different aspects of performance. Combining everything into one score can hide the reason a system succeeds or fails.

Evaluation measure What it assesses Important limitation
Precision@k The proportion of the first k retrieved results labelled relevant Relevant results may still omit necessary evidence
Recall@k The proportion of known relevant results found within the first k results Depends on the completeness of the relevance labels
Groundedness or faithfulness Whether answer claims are supported by the supplied context Does not establish that the source itself is current or correct
Answer correctness Whether the answer agrees with verified facts for the question Requires a suitable reference or informed review
Completeness Whether the answer includes the required information A complete answer can still contain unsupported additions
Citation quality Whether references support the claims attached to them The presence of a link alone is insufficient
Response time and cost Whether operation fits the application’s requirements Must be measured under representative workloads

For an illustrative retrieval calculation, suppose the system returns five passages and three are labelled relevant. Precision@5 is 3 ÷ 5, or 0.60. If four passages are known to be relevant and the system retrieves three, recall@5 is 3 ÷ 4, or 0.75.

Define whether the evaluation unit is a document, passage, or another item, and apply that definition consistently.

Also check the evaluator’s documentation. A tool-specific “context precision” score may use ranking or model-based judgements rather than the simple Precision@k calculation.

Separate Supported Answers From Correct Answers

Groundedness is an important part of RAG evaluation, but it is not a complete quality assessment.

An answer can faithfully repeat an obsolete policy. It can also reproduce one passage accurately while overlooking a qualification elsewhere in the approved material.

Review the answer against several distinct requirements:

Evidence support: Important claims should be supported by the context supplied to the model.

Correctness: The response should agree with the applicable verified information.

Completeness: It should address the necessary parts of the question.

Relevance: It should answer the user’s request without substituting a related topic.

Citation support: Each reference should lead to evidence that supports the associated claim.

Automated evaluators can help review larger datasets, but their judgements also need validation. Use a documented scoring rubric and compare a sample of automated assessments with knowledgeable human reviewers.

Disagreements between evaluators and reviewers are useful diagnostic evidence, particularly when they expose unclear reference answers or inconsistent scoring rules.

Test Missing Answers, Restricted Information, and Misleading Content

RAG systems need evaluation cases where producing a substantive answer would be inappropriate.

When approved sources do not contain the answer, the expected behaviour may be to acknowledge the limitation, request clarification, or direct the user to an established support route.

Permission testing should include attempts to access information through direct questions and indirect requests, such as summaries or comparisons. Restricted content should not become available merely because it is requested in a different form.

Also test retrieved material containing instructions that attempt to redirect the application. Content supplied as evidence should not acquire authority to override the application’s operating instructions.

These tests should examine generated answers, citations, and any retrieved content exposed through the interface.

An acceptable average quality score should not conceal an unresolved access-control failure.

Evaluate the Application Under Realistic Conditions

A controlled question set does not establish how the application behaves during normal operation.

Test concurrent requests, unavailable source systems, failed searches, and slow model responses. Check that errors are handled clearly and that an interrupted response is not presented as a completed answer.

Measure response-time distributions rather than relying only on an average. Include both initial response timing and the time required to complete the answer where those affect the user experience.

Cost estimates should account for the relevant retrieval, model, hosting, indexing, and monitoring components.

Nextwebi’s software testing services cover functional, performance, security, and usability testing. These application checks complement evaluation of retrieved evidence and generated responses.

For RAG system development, the release assessment should bring these results together without treating them as interchangeable.

Turn Evaluation Results Into a Launch Decision

Define acceptance criteria before reviewing the final scores.

Different question categories may need different expectations. Routine information requests, permission-sensitive enquiries, and questions with no approved answer should not be assessed solely through one combined average.

The release record should identify:

  • Which version was tested.
  • Which user groups and question categories were covered.
  • The results and unresolved failure types.
  • Any limitations on the approved launch scope.
  • The owner responsible for accepting the release.

Failures should be assigned to their likely cause. Missing evidence may require ingestion or retrieval changes. Unsupported claims may require changes to context handling or response generation. Incorrect sources require content correction.

When engaging a RAG development company, include evaluation datasets, test results, and unresolved issues among the agreed delivery artefacts.

Launch readiness should reflect the intended use and remaining limitations—not a universal score that every application must achieve.

Frequently Asked Questions

1. How many questions are needed to evaluate a RAG system?

There is no universal number. Coverage should reflect the application’s users, subject areas, access roles, and important failure conditions. A large set of similar questions can provide less useful coverage than a smaller, carefully varied set.

2. Can RAG evaluation be performed without reference answers?

Some checks can assess response relevance or support from retrieved context without a reference answer. However, assessing factual correctness and missing required information is stronger when verified references or knowledgeable reviewers are available.

3. Should answers be scored using exact wording matches?

Usually, wording alone is insufficient for open-ended answers. Different sentences can communicate the same facts. Evaluate required information and evidence support, while using exact checks where appropriate for identifiers or other fixed values.

4. Can the same language model generate and evaluate answers?

It can, but agreement is not independent proof of correctness. Validate the evaluator against human-reviewed examples and inspect important failures rather than accepting its scores without review.

5. When should evaluation be repeated after launch?

Repeat relevant tests after meaningful changes to source content, indexing, retrieval settings, prompts, models, permissions, or integrations. Maintain regression tests and add representative failures observed during actual use.