The user's question is often a poor search query, and rewriting fixes that before retrieval.
Follow-ups are the clearest case, since what about last year retrieves nothing on its own.
The conversation history must be folded in to make it self-contained.
Vague questions can be expanded with likely synonyms and related terminology.
Complex questions can be decomposed into several sub-queries run separately.
Compare our revenue and headcount across three years is really several searches.
Retrieving for each and merging the results beats one muddled search.
Multi-query generates several phrasings of the same question and unions the results.
That covers the case where the document uses different words than the user did.
HyDE takes a different angle by generating a hypothetical answer first.
That fake answer is embedded and used as the query.
It works because an answer resembles the documents more closely than a question does.
Every rewrite costs a model call before retrieval even starts, which adds latency.
Use a small fast model for it, since the task is simple.
Log the rewritten query, because a bad rewrite is invisible unless you look.