Skip to content
anythingai.space
Retrieval & RAGintermediate14 min · 10 steps

Query Understanding

Users type vague, conversational, multi-part questions. Before retrieval: skip RAG when it isn't needed, resolve references, clarify ambiguity, rewrite, classify, route, decompose — and normalise the query vector.

right chunk found41%
LLM calls / query1
“and how much is it for the bigger one?”UserQuery understandingRetrieverno matchLLM
requesterrorresponsedata
metrics are illustrative
1 / 10
ProblemStep 1 of 10

What users type is not what search needs

Turn 3 of a chat: “and how much is it for the bigger one?”. Embedded as-is, that query has no product name, no plan, nothing to match. Other queries are greetings, vague (“I have a problem”), or three questions in one.

Query understanding is a layer between the user and the retriever that turns the raw message into one or more good search queries — or decides no search is needed.

InsightEvery technique in this lesson runs before retrieval. A better query is often cheaper than a better index.

Lesson 25 of 37 in Retrieval & RAG