Knowledge & Data · Software component
Query Rewriter
Software componentKnowledge & DataKnowledge & Dataarc:QueryRewriter
A retrieval-preparation component that reformulates a question or sub-question into a search query, incorporating intermediate answers from earlier hops.
Responsibility. Formulates retrieval queries from the current sub-question and prior intermediate results.
Also known as: Retrieval query formulation, Query expansion, Query expander
Relationships
is invoked by dependency
reads dependency
- Conversation State Store abstract Ch5.8
- Working Memory Buffer abstract Ch3.3
sends data to dynamic
Design guidance
- SHOULD be improved first when evaluations show agents consistently fail at second-hop retrieval.
- SHOULD split vague questions into specific sub-retrievals (e.g., 'performance' into revenue, earnings, growth metrics).
Classification
- Patterns
- Query formulation from intermediate resultsQuery expansionQuery decompositionCoreference resolution from conversation historyQuery expansion with synonyms and related terms
- Quality attributes
- Functional suitability: correctness and validity (ISO/IEC 25010 | NIST AI RMF: valid)
- Risks mitigated
- Searching with wrong keywordsSecond-hop retrieval of documents about the wrong entityGeneric queries retrieving non-specific documents
Sources
- Ch3.3: T. Nguyen, "Web Navigation and Interaction Benchmarks," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.3. ISBN: 9798244538229.
- Ch3.10: T. Nguyen, "Efficiency Metrics," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.10. ISBN: 9798244538229.
- Ch5.8: T. Nguyen, "Semantic Memory," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.8. ISBN: 9798244538229.