Not Every Question Needs the Same Kind of Search¶
Learning objectives
By the end of this module you should be able to:
- Explain why running the same, most-expensive retrieval strategy on every question is both wasteful and not actually the safest default.
- Describe the difference between meaning-based (semantic) search and exact-term search, and why a system that only does one of them will confidently miss a real category of questions.
- Argue why "when in doubt, search more broadly" is the correct fallback rule for a routing decision, and what would go wrong if it were reversed.
The trap of one-size-fits-all retrieval¶
A retrieval system that reasons over thousands of documents faces a tempting shortcut: run the same, most thorough search on every question, every time. It's simple to build and it's never wrong in the sense of missing something — but it's wrong in a quieter way. A question like "what's the maximum operating temperature of this part" doesn't need the same search effort as "how does this project relate to that vendor across our whole document set." Treating them identically means either the easy question pays for work it didn't need, or the hard question gets shortchanged by a search tuned for the easy case. Neither is actually the safe choice.
Recognizing what kind of question you're answering¶
Most questions a retrieval system sees fall into a small number of shapes:
- A narrow lookup — a single fact, likely stated once, in one or two places. "What's the value of X" doesn't need to consider a wide net of candidate passages; it needs the right one or two.
- A relationship question — asking how two named things connect: who owns whom, what supplies what, which project touches which vendor. This needs a different kind of lookup than a plain text match — one that reasons about entities and the connections between them, not just passages that read similarly.
- Everything else — open-ended, comparative, or genuinely ambiguous questions, where the safest move is the widest search.
A system that can tell these apart — cheaply, before doing the expensive work — can spend less effort on the first kind and reserve its full effort for the third, without ever getting less thorough on a question that actually needs it.
The rule that makes this safe: narrow only when confident¶
The part of this design that actually matters isn't the classification itself — it's the fallback rule. A routing decision that narrows the search strategy is only safe if uncertainty always falls back to the broadest option, never to a narrower one. Recognizing a narrow lookup with high confidence is a genuine efficiency win. Guessing wrong about an ambiguous question and defaulting to a narrow search anyway would quietly drop recall exactly when it's least visible — the user has no way to know a question was answered from a smaller candidate pool than it deserved. The design that's actually trustworthy narrows aggressively when confident and falls back to the full search the instant it isn't, so a classification mistake costs a little extra effort, never a missed answer.
Meaning and exact words are not the same search¶
Underneath any routing decision sits a second, related distinction: searching by meaning and searching by exact words find different things, and a system that only does one will confidently, silently miss a whole category of question.
- Meaning-based (semantic) search finds passages that mean something similar to the question, even if the wording is completely different. It is excellent at "explain this concept" or "find something related to this idea" — and comparatively weak at an exact identifier, a part number, or a specific phrase that has to match precisely.
- Exact-term search finds passages containing the literal words in the question. It's excellent at exactly the case semantic search struggles with — precise identifiers, codes, specific phrases — and comparatively weak at a paraphrased or conceptual question that never uses the "right" words at all.
Neither alone is sufficient for a system meant to answer any real question a person actually asks. The two need to run together, with their results combined, so an exact part number and a paraphrased conceptual question both get matched by the kind of search that's actually good at finding them — not whichever one happened to be built first.
Key takeaways¶
- Running the same retrieval strategy on every question isn't the safe default — it's just one failure mode wearing a simple disguise. The easy question pays for unneeded work; the hard question can get shortchanged by a strategy tuned for the easy case.
- A routing decision is only trustworthy if uncertainty always falls back to the broadest option, never a narrower one. Confidence buys efficiency; doubt has to buy thoroughness, not the reverse.
- Meaning-based and exact-term search find genuinely different things, and a system built on only one will confidently miss real questions that need the other. Combining both, rather than choosing one, is what makes a single search actually reliable across the range of questions a person really asks.
For further study¶
- Design a question that a purely meaning-based (semantic) search would struggle with, and explain specifically why exact-term matching handles it better. Then do the reverse: design a question exact-term matching would struggle with.
- The module argues that an uncertain routing decision must fall back to the broadest search, never a narrower one. Construct a scenario where a system designer might be tempted to do the opposite (default to narrow under uncertainty) to save cost, and explain concretely what goes wrong.
- Propose a way you could measure, after the fact, whether a routing decision's classifications were actually trustworthy — that is, how would you tell whether "narrow when confident" was really only firing when it should have been?
Next: Retrieval That Checks Its Own Work — what happens after retrieval succeeds, when the answer itself has to be checked against what was actually found.