Query rewriting rephrases a user’s question so its meaning aligns more closely with the language stored in retrievable document chunks. It uses an LLM before vector similarity search. section 4.3
A query-rewriting workflow can address several retrieval problems:
- Rephrase vague wording into language likely to match the documents. section 4.3
- Generate hypothetical answer text and search with it using HyDE. section 4.3
- Translate the query when the question and documents use different languages. section 4.3
From thirst to drinks
A user asks, “What should I order if I’m thirsty?” A rewriting prompt can produce language about drinks before the system searches a menu, improving the chance of matching the relevant section. section 4.3




