Decomposing Complex Questions into Subqueries
In this article
- Split a question with several parts into subqueries drawn as a graph, and say which ones wait for another's answer and which can run at the same time.
- Copy a shared condition, such as an audience or an employee type, into every subquery with code instead of trusting each subquery's wording.
- Join the results with one cited chunk per part, compare only like with like, and report an empty part as a gap.
- Tell when a question should stay one search.
- Terms defined here: multi-hop question, query decomposition.
Overview
A home customer asks Brightline's support assistant: "How did the refund time limit for home customers change on 1 April 2026?" The assistant answers that the limit went from 14 days to 60 days. Both numbers are real, both come from real help pages with ids, and the answer is wrong: 60 days is the business customers' limit. Home customers went from 14 to 28.
Brightline is an invented home-internet provider; its pages, ids and numbers are made up. Its assistant searches help pages and router manuals and puts the best 3 chunks (short passages cut from those pages) into each request. Every chunk carries an audience field (home or business) and a version field (2025 or 2026-04).
The wrong answer came from a sound idea, splitting the question into smaller searches, run without safeguards. You will learn to draw the split as a graph, copy shared conditions into every search with code, join the results so a business number cannot pose as a home one, and report a part that found nothing as a gap. You will also learn when not to split at all.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Two facts behind one question
- Draw the plan as a graph
- Shared filters are copied by code
- The join compares like with like
- When a subquery comes back empty
- When one search is enough
- Common mistakes
- Sources
- Check yourself, 13 questions