Query refinement
Query refinement is the modification or reformulation of a search query to clarify or better express an information need and improve retrieval.
AI Agents in Action, Second Edition
Query refinement is the technique of reformulating a search query when its results are absent, weak, or insufficiently relevant.
- How it is used
- Improves retrieval-augmented agents by recovering from thin or empty search results before they finalize an answer.
- How deep it goes
- Explains three refinement tactics and prompt or tool-description fixes, but stops short of retrieval-system changes.
- Examples
- Uses an empty search for “Nebula Forge engine uses,” an “Unknown” answer, and a clarified keyword-search tool.
- What you can do after
- Apply it via agent instructions or a tool description to retry searches with synonyms, broader terms, or subquestions.
Read how AI Agents in Action, Second Edition explains query refinement →
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.
- How it is used
- Improves retrieval by rewriting, decomposing, disambiguating, or skipping queries before answer generation.
- 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 you can do after
- Evaluate RQ-RAG when deliberate query handling justifies supervised fine-tuning and its refinement modes match production traffic.
Read how Retrieval Augmented Generation, The Foundational Ideas explains query refinement →
Related concepts
- RQ-RAGimplemented by · RQ-RAG is a retrieval technique that trains a language model to refine queries through actions such as skipping retrieval, rewriting, decomposition, and disambiguation.
- refinementkind of · Refinement is an iterative process of revising an intermediate result, often using evaluation or feedback, to progressively improve it.
- related queryalternative to · A related query is a query whose meaning or search behavior is sufficiently associated with another query to form a useful query pair.
Questions about query refinement
What is query refinement?
Query refinement is the modification or reformulation of a search query to clarify or better express an information need and improve retrieval.
Which Manning books explain query refinement?
AI Agents in Action, Second Edition and Retrieval Augmented Generation, The Foundational Ideas.
What is the difference between query refinement and related query?
Query refinement is the modification or reformulation of a search query to clarify or better express an information need and improve retrieval. A related query is a query whose meaning or search behavior is sufficiently associated with another query to form a useful query pair.
What is query refinement a kind of?
Query refinement is a kind of refinement. Refinement is an iterative process of revising an intermediate result, often using evaluation or feedback, to progressively improve it.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

