Fix the question before you retrieve
Real users type things like 'it's not working again' or 'what about the other plan?' Search on that and you get junk. Rewrite the query before you retrieve.
There are three simple ways. Condense: in a chat, turn the latest message plus the history into one standalone question, so 'what about the other plan?' becomes 'what does Pro include compared to Basic?' Split: turn a broad question into two or three narrower ones, search each, and merge the results. HyDE: ask the model to write a short hypothetical answer first, embed that, and search with it. A made-up answer often sits closer to the real passages than the question does.
Condense helps any chatbot with memory. Splitting helps multi-part questions. HyDE helps short or vague queries against long, formal documents.
There's a cost: one extra model call per query, and a rewrite can drift from what the user meant. Keep the original query in the mix, and log both versions so you can see when the rewrite made things worse.
Then measure. Run your labeled test questions with and without rewriting, and keep it only if recall goes up.
Does your RAG app rewrite queries, or does it search on the raw message?
New notes go out on LinkedIn first. Building something with AI? We can help.
