Conversational RAG
Why Your RAG Assistant Fails on the Second Question
A follow-up question can lose the very details that make it searchable. Learn how to test query rewriting, authorised retrieval, reranking and evidence sufficiency.
The search query lost the inverter
A technician asks which inverter is installed at a site. The asset record shows an AX-450 running firmware 2.3. The technician replies, “Does it need a firmware update?” The model name and version in this example are fictional. The failure pattern is familiar to anyone building conversational search.
A language model reading the full exchange can infer what “it” refers to. A retriever given only the second message has very little to work with. It may surface generic update instructions or a bulletin for a different revision. Giving the final answer a stronger model still leaves it working from those results.
Resolve the reference before searching
Construct a standalone search query using the latest user turn and the trusted context it refers to. In this case, try “AX-450 firmware 2.3 update requirements and applicable hardware revisions.” Keep the original question and conversation available to the answer stage. The search query can use index-friendly terms while the answer still addresses the technician’s question.
Preserve identifiers, versions, exclusions and corrections exactly. A rewrite that changes 2.3 to 3.2 can rank the wrong bulletin first. If the site has two inverters or the installed version came from an unverified earlier answer, ask for the missing identifier or fetch the asset record before proceeding. Treat a topic switch as a fresh question when the current wording supports it.
Conversational query rewriting has been evaluated directly as a retrieval problem. The CONQRR paper is a starting point for testing whether rewritten queries actually improve passage retrieval.
Work through two nearly identical follow-ups
Take two conversations with the same final question. In the first, the asset record identifies inverter A, a revision B unit. In the second, the technician says, “Sorry, I meant the newer inverter next to it.” Both end with “Does it need a firmware update?” If the rewriter emits the same query for both, the rest of the pipeline has no way to recover the distinction.
For inverter A, include the confirmed revision if the asset record supplies it. For the newer inverter, resolve the new asset first. If two assets fit the description, a clarification such as “Do you mean inverter B in bay 2 or inverter C in bay 3?” carries the work forward. That response requires a trusted source for the bay labels. If the assistant cannot see those records, it can ask for the asset tag instead.
Now try “What does our annual inspection checklist say?” immediately after the firmware discussion. The technician has changed subjects. A rewrite that carries the old firmware and model into this search may suppress the correct checklist. A practical rule is to inherit details only when the current question depends on them. Record the original turn beside the rewrite in an access-controlled evaluation environment so reviewers can spot where an assumption entered the query.
Apply access scope before ranking for relevance
The user’s identity, tenant and document permissions should determine which candidates can enter the pipeline. Apply those constraints in the retrieval layer before sending candidates to a reranker or a generation model. A rewrite can refine a search term. The trusted application supplies the scope.
A first pass can combine exact identifiers with semantic search when the backend supports it. A reranker can then move a version-specific bulletin ahead of a general manual. Measure both steps separately. If the relevant bulletin never reaches the candidate set, a reranker cannot rescue it. If the bulletin applies to different hardware, a high score is still insufficient evidence.
The BEIR benchmark illustrates the trade-off between ranking quality and computational cost across retrieval tasks. Use your own manuals and queries to decide whether the extra pass earns its latency.
Walk the candidate set before judging the answer
In an illustrative search, the raw follow-up returns a generic update guide at rank 1. The rewritten query brings a service bulletin into the top five at rank 4. Reranking moves the bulletin to rank 1. That gives you two distinct observations. The rewrite found a candidate the raw query missed, and the reranker made that candidate more likely to reach the answer stage if the pipeline forwards only two passages.
Now read the bulletin. Its heading says AX-450, but the applicability table covers revision C. The asset record says revision B. The retrieval stack improved the ranking of a related document while the question remained unanswered. Mark that candidate as wrong for this asset. If there is a separate current bulletin for revision B, label its exact passage as the expected evidence. A useful evaluator asks whether the first result is applicable to the intended asset as well as whether it mentions the right product.
Run the same example as a technician and as a documentation owner. The owner may be allowed to read an internal bulletin the technician cannot see. The technician’s trace should show only permitted candidates and a response that neither relies on restricted text nor names a document outside their access. If you cache retrieval results, cover changes in identity and permissions in the test. Give the cache a scope and invalidation strategy that prevents a result from crossing that boundary.
Say which evidence is missing
Suppose the approved manual describes how to apply firmware but gives no rule for whether this version requires an update. A usable answer is “I found the update procedure for the AX-450. The sources I can access don’t establish whether firmware 2.3 needs an update for this unit. Can you confirm the hardware revision?” If the revision is already known and the bulletin is missing, direct the technician to the service documentation owner.
A source link lets the technician check applicability. Have a reviewer confirm that the linked passage actually supports the recommendation. Where access is insufficient, offer the approved handoff without disclosing restricted documents.
Reproduce it with a small evaluation set
Freeze the index snapshot and permission assignments. For each conversation, record the intended asset, the expected authorised passage if one exists, and the expected answer or handoff. Run the same turns with latest-turn-only retrieval, then with rewriting, then with reranking added. Keep the generator fixed so changes are easier to attribute.
- Before ranking Measure how often the labelled passage appears in the top k candidates for answerable cases. Include ambiguous follow-ups, user corrections, topic changes and exact part or version numbers.
- After ranking Measure the position of the first usable passage and record any incorrect revision promoted ahead of it. Track the extra response time.
- At the answer Check entity and version accuracy, passage support, clarification quality and responses when evidence is missing. Test two users with different permissions and check that restricted content reaches neither the answer nor model inputs.
Turn a failed answer into a reproducible case
Suppose six out of ten answerable follow-ups retrieve the labelled passage, but only four of those six answers cite evidence that supports their conclusion. The first four failures need retrieval diagnosis. Among the six successful retrievals, the two unsupported answers call for an answer-stage review. Check whether the usable passage survived context selection before changing the prompt or model. These illustrative numbers describe different failure points and help assign the repair to the right stage.
Keep an artefact for each regression case with the relevant turns, trusted asset facts, the expected rewrite or clarification, the permitted evidence and the expected user response. Write down which revisions or tenant boundaries must be preserved. Include at least one case that correctly returns no answer. If the index changes, update the evidence label using a specific document version or passage identifier so the case stays reproducible.
When inspecting real traces, minimise retained material and separate diagnostic access from ordinary assistant access. For a review of revision drift, identifiers and ranking positions often suffice. Full manuals and user messages need a clear purpose and a suitable retention policy.
Add a test for a document that was correct last month. If an old revision and its replacement are both indexed, check how the application decides which is current. Where the documentation catalogue offers reliable version or supersession metadata, use it in candidate selection or evidence review. Where that metadata is missing, show the conflict and let the technician verify the current bulletin with the documentation owner. The evaluation should reward a well-explained handoff in that case. Otherwise the team may inadvertently tune the assistant to prefer an unsupported answer over an honest account of the evidence.
Where Cortex IR fits
Cortex IR supports multi-stage chat, conversational query rewriting, permission-scoped document retrieval and optional reranking. The equipment-specific evidence rule and escalation path in this example are decisions for the assistant’s deployment. Start by inspecting the original question, the rewritten query and the authorised candidates together. That will tell you which stage needs attention.