Multi-Turn RAG Evals: Finding Where a Chatbot Fails by Mohsin SheikhaniMulti-Turn RAG Evals: Finding Where a Chatbot Fails by Mohsin Sheikhani

Multi-Turn RAG Evals: Finding Where a Chatbot Fails

Portfolio project
Mohsin Sheikhani
In a chat, later messages lean on earlier ones ("How much does it cost?"), so a bot can fail on turn 4 because of something it got wrong on turn 2. This project measures where that happens, step by step, on IBM's MTRAG benchmark.

What I built

A LangGraph RAG bot with three steps: rewrite the message into a standalone query, retrieve with hybrid search (embeddings in Qdrant plus BM25, merged with reciprocal rank fusion, then an LLM reranker), and answer or say "I don't know"
One check per step: two LLM judges for the rewrite, Recall@5 and nDCG@5 for retrieval, and an "I don't know" judge plus RAGAS faithfulness for the answer
Each turn replayed with the correct history before it, so a failure points to one step instead of the whole conversation
Results split by turn position and answerability, with every turn traced in Langfuse

What I found

One missed rewrite takes down the whole turn. "Who is responsible for covering my expenses?" looked standalone, but "my expenses" meant costs from the turn before. Retrieval found none of the right passages. Grading only the final answer would have blamed the generator
The judge was grading the wrong text. It quoted refusals from earlier turns and scored the answer by them. Fixing the judge prompt moved its score from 0.46 to 0.71 without changing the bot
A prompt fix moved the failure instead of removing it. Letting the bot answer partly answerable turns helped that group, but it then answered unanswerable turns from loosely related passages
Retrieval is the weakest step (Recall@5 of 0.39 across 41 turns), and some gold passages can't be found even with a perfect hand-written query

Stack

Python, LangGraph, Qdrant, BM25, OpenAI (gpt-4o, gpt-4o-mini), RAGAS, Langfuse

0 likes · 0 views · Dec 1, 2026

Per-step evals for a multi-turn RAG chatbot on IBM's MTRAG benchmark, tracing failed answers to missed query rewrites and a judge grading the wrong text.

Tags