LESSON 36 / 215·2 min readIntermediate

Query rewriting, multi-query retrieval, and query decomposition

Should knowConcept lesson
01 Understand02 Recall03 Prepare

Words made simple

A few useful meanings before you read the explanation.

Retrieval
Finding and fetching information that is useful for the current question.

Overview

  • Query rewriting restates a request for search, often resolving references from conversation.
  • Multi-query retrieval searches alternative formulations.
  • Query decomposition splits a compound question into smaller questions that may require separate evidence.

Why this matters

Users say “what about that one?” or combine several issues in one sentence, which can produce weak retrieval.

An everyday example

A librarian translates a vague question into searchable terms and checks two chapters for a two-part question.

A technical example

“Does it cover flooding and how do I report it?” becomes an applicability lookup, a coverage-evidence search, and a reporting-procedure search.

How it works

  1. Read the original request and trusted context
  2. Create bounded rewrites/subquestions
  3. Preserve identifiers
  4. Search
  5. Merge and deduplicate
  6. Answer the original question.

Architecture and flow

Original query → rewrite/subquestions → bounded parallel retrieval → merged evidence.

The insurance assistant example

Resolve “my policy” from authenticated account data, not from a model guess.

When to use it

Conversational follow-ups, vocabulary mismatch, and compound evidence questions.

When to avoid it

Exact ID queries may become worse if rewritten. Avoid uncontrolled multi-query fan-out.

Interview answer

“These methods improve search formulation and coverage. I keep the original intent and identifiers and cap the number of retrieval calls.”

Benefits, trade-offs, and production considerations

A rewrite can introduce an unsupported assumption, such as changing “water damage” to “flood coverage.” Log original and rewritten queries, evaluate intent preservation, and keep user-provided facts distinct from inferred search terms.

PAUSE & RECALL

Can you explain it without the notes?

Query rewriting, multi-query retrieval, and query decomposition

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

Query rewriting restates a request for search, often resolving references from conversation. Multi-query retrieval searches alternative formulations. Query decomposition splits a compound question into smaller questions that may require separate evidence.

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Hybrid RAG, reranking, and parent-child retrieval

Adapted from 13_AI.MD · “Query rewriting, multi-query retrieval, and query decomposition”. Examples are study fragments; framework behavior can depend on your version.