Query rewriting improves retrieval by turning a vague user question into a more targeted search query. In retrieval-augmented generation, the system can rewrite or expand the raw input before searching the target collection. section 7.3.3
From broad question to targeted searches
A user asks, “What trends should we be aware of in AI?” The system can create focused searches such as “What are the latest trends in AI for SaaS platforms?” and “What AI developments are impacting workflow automation?” These queries reduce irrelevant results from areas such as healthcare or finance. section 7.3.3
A practical retrieval flow can:
- Detect vague or poorly structured input. section 7.3.3
- Rewrite or expand the query into focused subqueries. section 7.3.3
- Classify the query so retrieval can prioritize appropriate sources and pipelines. section 7.3.3
Figure 7.10 Optimization potentials in the RAG system
Use the optimization overview to relate query rewriting to other retrieval and generation improvements. section 7.3.3




