SmartFAQs.ai
Back to Learn
Intermediate

Query Reformulation

The process of rewriting or expanding a user's initial input into one or more optimized versions to improve the precision and recall of the retrieval step in a RAG pipeline. While it significantly enhances search relevance by resolving ambiguities and injecting context, it introduces additional latency and token costs due to the required intermediate LLM call.

Definition

The process of rewriting or expanding a user's initial input into one or more optimized versions to improve the precision and recall of the retrieval step in a RAG pipeline. While it significantly enhances search relevance by resolving ambiguities and injecting context, it introduces additional latency and token costs due to the required intermediate LLM call.

Disambiguation

Distinguish from 'Query Expansion' by its focus on transforming the semantic structure rather than just adding synonyms.

Visual Metaphor

"A skilled translator taking a vague, slang-heavy request and turning it into a formal, precise library catalog search string."

Key Tools
LangChain (MultiQueryRetriever)LlamaIndex (QueryTransform)DSPyHaystack (QueryRewriter)
Related Connections

Conceptual Overview

The process of rewriting or expanding a user's initial input into one or more optimized versions to improve the precision and recall of the retrieval step in a RAG pipeline. While it significantly enhances search relevance by resolving ambiguities and injecting context, it introduces additional latency and token costs due to the required intermediate LLM call.

Disambiguation

Distinguish from 'Query Expansion' by its focus on transforming the semantic structure rather than just adding synonyms.

Visual Analog

A skilled translator taking a vague, slang-heavy request and turning it into a formal, precise library catalog search string.

Related Articles