SmartFAQs.ai
Back to Learn
Intermediate

Query Refinement

The process of programmatically rewriting, expanding, or decomposing a user's raw input into an optimized format to improve retrieval precision and agent reasoning. While it significantly boosts retrieval quality (Recall/NDCG), it introduces trade-offs in the form of increased inference latency and higher token costs due to the additional LLM call required before retrieval.

Definition

The process of programmatically rewriting, expanding, or decomposing a user's raw input into an optimized format to improve retrieval precision and agent reasoning. While it significantly boosts retrieval quality (Recall/NDCG), it introduces trade-offs in the form of increased inference latency and higher token costs due to the additional LLM call required before retrieval.

Disambiguation

Distinct from simple spell-check; it focuses on semantic alignment with the underlying vector database or tool API schemas.

Visual Metaphor

"A blurry photograph being processed through a sharpening filter to reveal hidden details for an image recognition system."

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

Conceptual Overview

The process of programmatically rewriting, expanding, or decomposing a user's raw input into an optimized format to improve retrieval precision and agent reasoning. While it significantly boosts retrieval quality (Recall/NDCG), it introduces trade-offs in the form of increased inference latency and higher token costs due to the additional LLM call required before retrieval.

Disambiguation

Distinct from simple spell-check; it focuses on semantic alignment with the underlying vector database or tool API schemas.

Visual Analog

A blurry photograph being processed through a sharpening filter to reveal hidden details for an image recognition system.

Related Articles