liveBook · Manning

Query decomposition

Query decomposition is the technique of dividing a complex information need into smaller subqueries or subtasks that can be processed separately.

How 3 Manning books explain it

Retrieval Augmented Generation, The Foundational Ideas

Query decomposition is the technique of splitting a complex information need into smaller sub-queries that can be searched or answered separately.

How it is used
Splits multi-hop or fragmented information needs into focused retrieval tasks so a RAG system can assemble a more complete answer.
How deep it goes
Details atomic queries, per-query summaries, coverage checks, and follow-up retrieval, but does not specify a query-generation algorithm.
Examples
Uses UK–EU compliance comparisons, CVaR and IRRBB searches, and a merchant-account procedure spread across documents.
What you can do after
Apply it via LevelRAG’s High-Level Searcher or conditional sub-query generation, then check coverage and latency against a simpler retrieval pass.

Read how Retrieval Augmented Generation, The Foundational Ideas explains query decomposition →

Introduction to Generative AI, Second Edition

Decomposition prompting is a technique that breaks a complex problem into smaller subtasks handled in sequence.

How it is used
Guides language models through complex documents, planning problems, and educational or tutoring tasks by sequencing subtasks.
How deep it goes
Defines sequential decomposition and contrasts it with least-to-most prompting, but stops short of implementation details.
Examples
Uses financial-report summarization and stepwise math problem solving as concrete examples.
What you can do after
Apply decomposition prompting by turning a complex task into an ordered sequence of smaller subtasks.

Read how Introduction to Generative AI, Second Edition explains query decomposition →

Build an Advanced RAG Application (From Scratch)

Query decomposition transforms a compound information need into multiple atomic sub-queries that can be processed independently.

How it is used
Deploys query decomposition as a pre-retrieval transformation in Enterprise RAG, routing and retrieving each distinct information need independently.
How deep it goes
Explains embedding dilution, atomic splitting, independent routing and retrieval, synthesis, and simple-query pass-through.
Examples
Uses an Uber revenue-and-growth comparison, separate Uber and Lyft filings, and a single-query pass-through case.
What you can do after
Build it from scratch with Python and an OpenAI GPT-4o call that returns validated JSON sub-queries.

Read how Build an Advanced RAG Application (From Scratch) explains query decomposition →

What to know first

Related concepts

Questions about query decomposition

What is query decomposition?

Query decomposition is the technique of dividing a complex information need into smaller subqueries or subtasks that can be processed separately.

Which Manning books explain query decomposition?

Retrieval Augmented Generation, The Foundational Ideas, Introduction to Generative AI, Second Edition and Build an Advanced RAG Application (From Scratch).

What should I know before learning query decomposition?

Manning books that teach query decomposition usually introduce retrieval-augmented generation and routing first.

What is query decomposition a kind of?

Query decomposition is a kind of decomposition. Decomposition is the process of dividing a complex problem, task, or system into smaller constituent parts that can be handled or analyzed separately.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.