liveBook · Manning

Query refinement

As explained in Retrieval Augmented Generation, The Foundational Ideas

Query refinement is the transformation of an information need into a more effective retrieval query or sequence of sub-queries.

Query refinement transforms an information need into a more effective query or sequence of sub-queries. RQ-RAG makes this behavior an explicit model capability rather than a runtime prompt wrapper. section 7.6.5

RQ-RAG supports four refinement actions:

Chained multi-hop refinement

The question “What kind of university is the school where Rey Ramsey was educated?” becomes “Where was Rey Ramsey educated?” → “Rutgers University” → “What university is Rutgers University an instance of?” → “Land-grant University.” Partial answers guide later retrieval, while trajectory selection chooses among candidate refinement paths. section 7.6.5

Table 7.2 Comparison of HyDE variants and query-side techniques
Variation
Primary benefit
Implementation cost/complexity
Latency impact
Use case
Standard HyDE
Significant zero-shot retrieval improvement
Low
Medium
General-purpose RAG where baseline retrieval is poor.
Multi-Sample HyDE
Improved stability and robustness to noise
Medium (requires averaging)
High
Applications where query robustness is critical.
Hybrid HyDE (Fusion)
Combines semantic and lexical strengths
High (requires fusion logic)
Medium
High-precision search that cannot miss keyword matches.
HyDE + Re-ranker
Maximizes precision for top results
High (requires a second model)
High
Safety-critical or expert systems (e.g., legal, medical).
Reverse HyDE
Eliminates query-time LLM latency
Medium (shifts cost to indexing)
None at query time
Read-heavy corpora that change rarely (docs, catalogs, KBs).
RQ-RAG
Built-in rewrite / decompose / disambiguate; strong on multi-hop
High (requires supervised fine-tuning of the generator)
High (multiple sequential refinements per query)
Systems where query patterns are complex and a custom-trained generator is acceptable.

Compare query-side retrieval techniques by benefit, implementation complexity, latency, and use case. section 7.6.5

How Retrieval Augmented Generation, The Foundational Ideas covers it

How deep it goes
Explains supervised control tokens, chained refinement, trajectory selection, and the latency-versus-training trade-off.
Examples
Uses a Rey Ramsey university question to demonstrate sequential decomposition, retrieval, partial-answer feedback, and trajectory selection.
What it assumes
Assumes retrieval, embeddings, model inference, and supervised fine-tuning as contrasting implementation approaches.
What you can do after
Evaluate RQ-RAG when deliberate query handling justifies supervised fine-tuning and its refinement modes match production traffic.
How it connects
Connects query rewriting, query decomposition, intent disambiguation, HyDE, Self-RAG, and multi-hop retrieval.

Also explained in

Compare how 2 books explain query refinement →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Retrieval Augmented Generation, The Foundational Ideas. The section links point to the parts of the book it draws on.