Query Decomposition: Breaking Complex Questions into Sub-Queries

~15 min read

A single complex question often can't be answered by one retrieval pass. Query decomposition breaks it into smaller, independently-answerable sub-queries, retrieves for each, then synthesizes a final answer — a common complement to the core agentic RAG loop.

Query Decomposition: Breaking Complex Questions into Sub-Queries is a Pro topic

Sign in, then upgrade to Pro or Power to unlock this topic and the full AI Engineering curriculum.

Key points

  • Complex, multi-part questions often can't be answered by a single retrieval pass
  • Query decomposition breaks a complex question into smaller, independently-answerable sub-queries, each with its own retrieval
  • A final synthesis step combines individual sub-answers into one coherent answer to the ORIGINAL question — not just concatenation
  • Decomposition typically happens early in the pipeline, before source selection and retrieval begin for each sub-query
  • Most valuable for analytical/comparative/multi-hop questions — adds little value (just extra LLM calls) for simple single-fact questions