Problem
A bank's quality assurance team uses RAG so that an LLM answers from the company's own documents instead of inventing facts. A wrong answer can come from the chunk split, from retrieval or from the model, and each needs a different fix. The data also contains personal information that must not leave the perimeter, which limits what can be automated.
Example from the article: asked when money can be withdrawn from a deposit without losing interest, the system answered "after 100 days" while the source document said 150 days. The right document was found and the answer was well structured, but accuracy failed.
Solution in brief
Judge a RAG system on three separate layers: retrieval quality, answer accuracy and quality of presentation. Measure each with its own method (gold-standard metrics, an LLM judge, manual review), run the checks on an LLM-generated question set, and repeat the cycle after every change.
Questions this case answers
- How to evaluate a retrieval-augmented question-answering system when retrieval, answer correctness and answer presentation can each fail separately
- How to build a repeatable evaluation loop for an LLM application when automatic judges are imperfect and the data cannot leave the company perimeter
- How to measure whether a RAG system finds the right documents and answers correctly?
- How to split a document base into chunks and check that the split does not hurt answers?
Tools and methods
- Hit Rate and MRR — retrieval metrics against a human-written gold standard
- LLM judge — a second model scores answer accuracy and hallucinations
- RAGAS — reference-free automatic evaluation; the tool PSB uses now
- LangChain, LlamaIndex — chunking and pipeline tooling
- LangSmith, TruLens — debugging and evaluating LangChain chains (LangSmith); monitoring and tracing LLM applications (TruLens)
- Testing pyramid — unit (component), API, E2E and manual tests
Google or a one-time email code. No password.
