Why RAG chatbots fail at question three, and how to prove the fix
The usual culprit is a pronoun the retriever cannot resolve; rewriting the question helps, but only a test set split by turn will convince a client.
In brief
- The retriever does not know what "that" refers to. On the mtRAG benchmark, query rewriting always retrieved better than using the last-turn question alone.
- Models are weakest on later turns and on unanswerable questions, so the test set needs enough of both.
- Rewriting adds latency and cost. Skip it on the first turn, run it on a cheaper model, and turn it off when the client does not need conversational references resolved.
A client’s internal HR chatbot gets three questions in a row. “How many days of annual leave do probationary employees get?” “What about seasonal contracts?” “Can that be carried over?” In this hypothetical exchange, the bot handles the first two smoothly. Its answer to the third has nothing to do with the question.
The language model is not at fault here; the failure happens one step earlier. A guide to LlamaIndex’s CondenseQuestionChatEngine describes the same situation: the retriever has no idea what “that” is. Embedded verbatim, “Can that be carried over?” may match any document that mentions carrying something over.
An FDE’s demo usually runs for a single turn, while the client’s real users ask questions in chains. The workflow below fits on a laptop: build a multi-turn test set, measure a baseline, add query rewriting, then read the results in a way that will persuade a client.
What do benchmarks say about later turns?
mtRAG is a human-created benchmark for conversational RAG. It contains 110 conversations across four domains, averaging 7.7 turns each, for a total of 842 tasks. Two of its authors’ conclusions should shape your test set.
Every model struggles, most visibly on unanswerable questions and on later turns. And query rewriting always retrieved better than using the last-turn question alone.
Rewriting does not solve everything, though. According to mtRAG, non-standalone questions remain difficult even though rewriting helps. MTRAG-UN, a version released in 2026, focuses on this hard territory: unanswerable, underspecified and non-standalone questions, with 666 tasks and more than 2,800 conversation turns across six domains.
Your test set therefore needs to measure three things separately: which turn a question falls on, whether it can stand alone, and whether it has an answer.
Step 1: Build the test set before writing code
You need a working RAG pipeline (any vector store will do), a model you can call through an API, and Python. The code below is simplified: retrieve and call_llm are functions you wire into your own system and do not belong to any library’s API.
Each line of the JSONL file is one question turn, with the history up to that point:
{"conv_id": "hr-01", "turn": 3,
"history": [["user", "How many days of annual leave do probationary employees get?"], ["bot", "..."],
["user", "What about seasonal contracts?"], ["bot", "..."]],
"question": "Can that be carried over?",
"type": "non_standalone",
"gold_doc_ids": ["leave-seasonal-carryover"]}
The type field takes one of three values: standalone, non_standalone or unanswerable. For questions with no answer, leave gold_doc_ids empty. Draw the questions from the client’s real logs, anonymized, because real users ask far terser questions than any you would invent.
Check: count the lines by type and by turn. If nearly all of them are turn 1 and standalone, the test set is measuring your demo and has yet to measure the real product.
Step 2: Measure a baseline on the last-turn question alone
import json
from collections import defaultdict
def hit_at_k(retrieved_ids, gold_ids):
return any(d in gold_ids for d in retrieved_ids)
def evaluate(rows, make_query, k=5):
buckets = defaultdict(lambda: [0, 0]) # hit, total
for r in rows:
if r["type"] == "unanswerable":
continue # measured separately in step 4
q = make_query(r["history"], r["question"])
ids = [d.id for d in retrieve(q, k=k)]
key = (r["type"], "turn1" if r["turn"] == 1 else "turn2+")
buckets[key][0] += hit_at_k(ids, r["gold_doc_ids"])
buckets[key][1] += 1
for key, (h, n) in sorted(buckets.items()):
print(key, f"{h}/{n}")
rows = [json.loads(l) for l in open("multiturn_eval.jsonl")]
evaluate(rows, lambda history, q: q) # baseline: last turn only
Check: print results for each group and resist rolling them into one average. Say the test set has 10 first turns and 20 follow-ups, and the baseline hits 9/10 on first turns and 8/20 on follow-ups. The combined 17/30 looks passable, but it hides the fact that the system misses more than half of the follow-up questions.
Step 3: Rewrite the question, but only when there is history
This step turns a follow-up into a standalone query for retrieval. One design detail should be kept, and the documentation for the RAGLight library does the same: if the history is empty, make no extra model call.
REWRITE_PROMPT = """Using the conversation history, rewrite the last question
as a standalone question, replacing every pronoun with the specific thing it refers to.
Do not answer the question. Return only the rewritten question.
History:
{history}
Last question: {question}"""
def rewrite_query(history, question):
if not history:
return question # first turn: no extra model call
text = "\n".join(f"{role}: {msg}" for role, msg in history[-6:])
return call_llm(REWRITE_PROMPT.format(history=text, question=question))
evaluate(rows, rewrite_query)
For the leave example, you would hope to see something like “Can annual leave for seasonal contract employees be carried over to the next year?” Keeping only the six most recent messages is a simplification. Adjust the number to the length of the client’s real conversations.
Check: look beyond the score. For every non_standalone turn, print the rewritten question beside the original. If the model answers the question outright, or inserts a detail that is absent from the history, fix the prompt before trusting any number.
Step 4: Measure unanswerable questions separately
Better retrieval can have a side effect: the bot grows more confident about questions the documents never address. According to mtRAG, this is a group where every model is weak. Run the full pipeline on the unanswerable lines and check whether the bot says plainly that it could not find the information.
REFUSAL_MARKERS = ["could not find", "no information"] # simplified
unans = [r for r in rows if r["type"] == "unanswerable"]
ok = sum(any(m in answer(r).lower() for m in REFUSAL_MARKERS) for r in unans)
print(f"Correct refusals: {ok}/{len(unans)}")
String matching is crude. As the test set grows, you can replace it with a human grader or a model grader working from a rubric. Whichever you choose, this metric belongs next to hit@k in every report you send the client.
Step 5: Work out the cost before turning it on for everyone
Rewriting is not free. RAGLight’s documentation advises turning the option off if latency and model cost matter more than resolving conversational references.
There are two ways to cut the bill: skip rewriting on the first turn, as in the code above, and use a cheaper model for this step. The LlamaIndex guide uses gpt-3.5-turbo for rewriting as its example.
The decision is fairly simple. Rerun Step 3 with the cheaper model. If the number of follow-ups retrieved correctly barely changes, you have your answer. And if the logs show that the client’s users almost always ask one question and leave, that measurement is a sound reason to keep rewriting off.
Common mistakes and how they surface with clients
The most common mistake is a test set made up entirely of first turns. The second is leaving out unanswerable questions altogether, which makes rewriting look like a pure improvement. The third is scoring without reading the rewritten questions; by the time the client notices the bot inventing extra conditions, it is too late.
Query rewriting is not the end of the road either. The SELF-multi-RAG research argues that conversational systems must also decide for themselves when to retrieve, and its authors report an improvement of about 13% in response quality as judged by human raters.
That figure measures answer quality, not recall, so do not compare it with your hit@k.
On the client side, the need for this skill often arrives as a vague complaint such as “the longer it talks, the dumber the bot gets.” Being able to respond with a table split by turn and question type gives you an advantage.
When reading job descriptions, look for terms such as “evaluation”, “conversational” and “retrieval quality”. On your résumé, say that you built a multi-turn eval set and which question group you improved. That is much stronger evidence than “worked on RAG.”
The next time a client’s chatbot starts to drift off topic, begin by opening the logs and counting how many questions start with “what about”, “that one” or “so then”.
Was this article useful?
Thanks for the feedback!
5 sources
- MTRAG: A Multi-Turn Conversational Benchmark for Evaluating Retrieval-Augmented Generation Systems · 2025-01-07
- MTRAG-UN: A Benchmark for Open Challenges in Multi-Turn RAG Conversations · 2026-02-26
- Query reformulation
- CondenseQuestionChatEngine: reformulating follow-ups · 2026-04-15
- Learning When to Retrieve, What to Rewrite, and How to Respond in Conversational QA · 2024-09-23