The Rewrite-Retrieve-Read research formulation puts rewriting before retrieval because casual user language and document language often do not line up. Rewriting closes that gap. It must not silently rewrite the scope of the request.
How does query rewriting help RAG?
An LLM can resolve pronouns from chat history, add an official product name, split a compound question, or create a query in the language used by source documents. The goal is better retrieval, not a prettier question. RAG then retrieves against the rewritten form, and semantic search helps when the useful passage uses different words again.
What can go wrong with a rewrite?
A rewriter can drop a qualifier or invent a detail, which sends retrieval toward persuasive but irrelevant text. Keep the original question in the trace and preserve structured metadata filtering outside the model’s rewrite. Measure the retrieved evidence and final answer with and without rewriting. In an agentic search loop, the agent can retry only after it sees that the first retrieval did not answer the question.