RAG evaluation

RAG evaluation against
your own documents.

Retrieval-augmented generation only works if the answer stays true to what was retrieved. Latent Lens grounds every claim in the retrieved context and shows where the answer drifts from your documents.

Two places a RAG system fails

  1. Retrieval: the right passage was never fetched, so the model fills the gap.
  2. Generation: the right passage was fetched, but the answer changes a number, adds a detail or ignores an instruction.

Latent Lens evaluates the answer against the context you give it, which isolates generation errors. When the answer is unsupported but the context is short or off-topic, that points to retrieval.

How to run a RAG check

  • Paste the user question and your system prompt as the prompt.
  • Paste the model's answer as the response.
  • Paste the retrieved chunks as the ground truth.

Every claim is labeled with the evidence sentence quoted, so you can see which chunk supports it. Instructions such as "answer only from the context" are checked too.

What you learn

  • Faithfulness and hallucination rate for the answer.
  • Which claims drift from the source, and how (numbers, entities, contradictions).
  • A fix per failure type: tighten the prompt, adjust retrieval or add a post-generation guard.

From one answer to your whole pipeline

A single check shows one answer. A Custom Pilot runs your real traffic and test scenarios against your documents and tracks quality as the pipeline changes. Start with the free checker, or read about hallucination detection.

Questions

Frequently asked

What is RAG evaluation?

RAG evaluation checks whether answers from a retrieval-augmented generation system stay true to the retrieved context, and whether the right context was retrieved in the first place.

What should I paste as ground truth?

The chunks your retriever returned for that question. Latent Lens grounds each claim of the answer in those chunks and quotes the supporting sentence.

Can you evaluate retrieval quality as well?

Retrieval metrics on your own index are part of a Custom Pilot, where we test your pipeline end to end on your documents.

Ground your next answer

Paste the question, the answer and the retrieved chunks. See every claim matched to its evidence.

Open the free checker