Term
Query Expansion
Query expansion enriches the original query in a RAG pipeline with synonyms, reformulations or hypothetical answer texts in order to lift retrieval recall.
Query Expansion — explained in more detail
User queries tend to be short, informal and ambiguous — while the documents being searched are long, jargon-heavy and structured. That vocabulary gap is the main reason plain vector retrieval misses relevant hits. Query expansion closes the gap by having an LLM generate additional search variants from the original question (synonyms, reformulations, alternative angles). Each variant is searched separately, the results are merged, deduplicated and trimmed back to the final top-k list with a reranker.
Example / Practical context
A question like “why is my build slow?” often yields only hits with identical wording when run through plain vector search. With multi-query expansion the LLM generates variants such as “optimise build performance”, “reduce compile times” and “speed up CI pipeline” — and so also finds documents that describe the same issue with different vocabulary. The cost: three to five times the latency and LLM spend per query, plus extra noise that must be filtered out downstream with a reranker.
Distinction from related concepts
HyDE (hypothetical document embeddings) is a specific variant: instead of multiple search variants the LLM generates a hypothetical answer document and searches with its embedding — effective for short, precise queries. Multi-query retrieval is the umbrella term for any approach that runs several reformulated queries in parallel. Reranking only kicks in after retrieval and re-orders the hits without issuing any new searches.
Entdecke mehr
AI Workflows by Keyword: How We Make Recurring Routines Enforceable
A typed keyword triggers a fixed AI routine — and every single step must be committed before the next one appears. Why that's the actual trick.
GlossarS-RAG
S-RAG (Search-optimized RAG) is boostN.ai's take on Retrieval-Augmented Generation. It extends classic RAG with search-engine principles: relevance ranking, recency decay and typed links between chunks for deterministic follow-up retrieval.
LexikonRAG Tuning and Balancing — Embeddings, Weights, Decay and MCP for Advanced Setups
How to steer retrieval on purpose: embedding choice, hybrid weights, reranker cascades, time decay, authority boost, MMR and MCP as a retrieval tool.