In a chat, 'what about its pricing?' returns junk from retrieval — diagnose the failure and fix it
Your conversational RAG assistant works fine for standalone questions, but when a user follows up with 'what about its pricing?', retrieval comes back with irrelevant chunks. Explain precisely why retrieval fails on this turn, and describe the fix.
The follow-up is embedded literally with 'its' unresolved, so the query vector is near-meaningless. Fix it by rewriting the turn into a standalone query before retrieval — query contextualization.
Imagine texting a librarian who can only read your latest message, never the chat above it. You ask 'What's the population of France?' and get a great answer. Then you text 'what about its capital?' — but the librarian, seeing only that one line, has no idea what 'its' means. So she fetches random books. The problem is she never saw the France message. The fix is to clean up your follow-up before sending it: rewrite 'what about its capital?' into 'What is the capital of France?' so it makes sense on its own. A conversational search assistant works the same way — it has to rewrite a dependent follow-up into a complete question before it searches, because the search only sees the words you hand it.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Diagnose first: the follow-up is embedded literally, 'its' is unresolved, so the query vector is meaningless and the retriever — which sees only the current string — returns junk. Prescribe query contextualization that rewrites the turn into a standalone query before retrieval. Justify the placement against reranking, then raise rewriter failure modes and latency.
Real products, models, and research that use this idea.
- LangChain's condense-question chain rewrites a follow-up into a standalone query using chat history before retrieval.
- LlamaIndex's CondenseQuestion chat engine performs the same rewrite step ahead of the retriever.
- Perplexity-style conversational search resolves pronouns from the thread before issuing the next retrieval.
- Customer-support copilots rewrite 'what about its refund policy?' into 'refund policy for the Pro subscription' before searching the docs.
- OpenAI Assistants threads pair history-aware rewriting with file-search so follow-ups stay grounded.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhat can go wrong with the rewriting step itself, and how do you guard against it?
QIs rewriting the only option, or could you pass conversation history to retrieval another way?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Trying to fix this by filtering or reranking retrieved chunks. The query vector was already meaningless, so there is nothing good in the candidate set to rerank toward.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.