Skip to content
Duoduo Mediaevidence to decision

Package 06 · Section 5.3

Retrieval Methods and Intelligent Routing

Route each information need to the source and retrieval method most likely to answer it accurately and economically.

Track
B · Knowledge and retrieval engineering
Level
Practitioner
Version
v1.0
Status
Open · initial release
Explanation depthDepth

Learning objectives

  • Use keyword, vector, hybrid, metadata, graph, SQL, governed API and web retrieval appropriately.
  • Implement route selection and fallback.
  • Measure route-specific failure instead of averaging all queries.

In brief

No single retrieval method wins on every query. Keyword search excels at identifiers and exact terms, vector search at paraphrase, SQL at aggregates and APIs at live data. Routing sends each query to the methods most likely to find its evidence.

Core concepts

06.1Retrieval families

Lexical retrieval (BM25) matches terms and handles part numbers, codes and names well. Dense retrieval matches meaning and handles paraphrase. Hybrid retrieval combines both, often with reciprocal rank fusion.

Structured sources such as SQL tables and APIs answer questions about counts, current status and prices more reliably than text search.

06.2Routing

A router classifies the query by intent, entity type and freshness need, then selects one or more routes. Routers can be rules, a classifier or a model with a constrained output schema.

Routing errors are silent: the system confidently answers from the wrong source. Log the route and evaluate routing accuracy separately from answer quality.

06.3Fusion

Reciprocal rank fusion combines ranked lists without needing comparable scores. Weighted fusion requires score normalization and tuning.

Fusion improves recall but can admit noise. Follow it with reranking.

Worked example

Routing a mixed policy query

Situation: Query: "How many days of parental leave do I have left under policy HR-12?"

  1. 1Router detects an identifier (HR-12) and a personal balance request.
  2. 2Route 1: keyword search for HR-12 returns the policy clause.
  3. 3Route 2: HR API returns the user balance, filtered by their entitlement.
  4. 4Vector search alone returned a similarly worded policy from another region.

Outcome: The answer combines the correct clause with the live balance. Routing accuracy on 200 labeled queries is 0.91 versus 0.64 for vector-only.

Decision rules

  • Use keyword retrieval whenever the query contains identifiers or codes.
  • Use structured routes for counts, balances, prices and status.
  • Log the chosen route for every request.
  • Evaluate routing accuracy on a labeled set before tuning answers.

Common pitfalls

  • Using vector search for everything, including exact identifiers.
  • Evaluating only end answers so routing failures stay hidden.
  • Letting the router call routes the user is not authorized for.

Key vocabulary

BM25
A lexical ranking function based on term frequency and document length.
Dense retrieval
Ranking by similarity between learned embedding vectors.
Reciprocal rank fusion
Combining ranked lists by summing 1 / (k + rank) for each item.
Route
A specific retrieval method and source selected for a query.

Tutorial outline

  1. 06.1Lexical and semantic matching; reciprocal rank fusion; graph traversal; structured query generation.
  2. 06.2Intent classification and source authority.
  3. 06.3Parallel, sequential and conditional retrieval; timeout and fallback policies.

Required artifacts

Route taxonomy, router configuration, confusion matrix and per-route scorecard.

Evaluation evidence

Routing accuracy, end-to-end answer quality, latency, cost and unsafe-route rate.