Router RAG and choosing your retrieval strategy

Router RAG chooses a strategy based on the question.

What you will learn

  • Explain: rag accesses evidence, it does not retrain
  • Apply the idea in an example: Router RAG and choosing your retrieval strategy
  • Recognize limitations and verify the exercise outcome

Router RAG chooses a strategy based on the question. Distinguish retrieval routing from workflow routing to an agent specialist.

These steps refer to features identified in the application code. This material has not been validated on a live instance; check the documentation and the options in your version.

How it works, step by step

Comparison and production readiness

Naive is the baseline. Rerank improves candidate ordering; Multimodal also prepares images; Graph follows relationships; Hybrid combines meaning and words; Router chooses a strategy. Choose by measured failures. Before production, check current sources, access before retrieval, unanswerable cases, indexing status and costs of both paths. Direct answers may be unsuitable for questions that must use company policy.

Detailed lab

Routing does not evaluate truth

The router model classifies a query and selects a path. It does not prove the path retrieved appropriate evidence. Record route, retrieved sources and supported claims. For company-policy questions, explicitly verify that direct generation was not selected instead of retrieval.

Test paraphrases and mixed queries such as “Which adapter do I need and how long is delivery?”. They can require different evidence types. Router complexity is justified only if selection improves success or cost against a baseline using the same corpus.

The visual map

Router RAG and choosing your retrieval strategy Follow the solid arrows for the main flow. Dashed blue arrows supply data or context; dashed pink arrows show feedback or returning results. Colors and shapes distinguish models, stores, decisions and outputs. Exactly one retrieval route is chosen. The direct branch bypasses retrieval and returns its own answer. Retrieval returns evidence. If a response model is enabled, it also composes an answer; retrieved evidence still needs checking. Connections: User request → Router: classify intent; Router: classify intent → Intent and selected strategy; Semantic search → Build evidence context; Build evidence context → Response model (optional); Response model (optional) → Evidence with sources; Extract entities from query → Bounded graph traversal; Bounded graph traversal → Build evidence context; Hybrid retrieval → Build evidence context; Direct answer without retrieval → Final answer; Instructions and context → Router: classify intent; Capabilities and constraints → Router: classify intent; Intent and selected strategy → Semantic search (vector); Intent and selected strategy → Extract entities from query (graph); Intent and selected strategy → Hybrid retrieval (hybrid); Intent and selected strategy → Direct answer without retrieval (direct); Vector index → Semantic search; Neo4j knowledge graph → Bounded graph traversal; Vector index → Hybrid retrieval. R08 · Relationship map Router RAG and choosing your retrieval strategy Input User request Data Instructions and context Data Capabilities and constraints AI model / agent Router: classify intent Decision / control Intent and selected strategy Processing Semantic search AI model / agent Extract entities from query Processing Hybrid retrieval AI model / agent Direct answer without retrieval Store / index Vector index Processing Bounded graph traversal Store / index Neo4j knowledge graph Processing Build evidence context AI model / agent Response model (optional) Output Final answer Output Evidence with sources vector graph hybrid direct Main flow Data and context Feedback and return

Follow the solid arrows for the main flow. Dashed blue arrows supply data or context; dashed pink arrows show feedback or returning results. Colors and shapes distinguish models, stores, decisions and outputs. Exactly one retrieval route is chosen. The direct branch bypasses retrieval and returns its own answer. Retrieval returns evidence. If a response model is enabled, it also composes an answer; retrieved evidence still needs checking. On smaller screens, scroll horizontally to follow the entire diagram.

A complete example

Returns policy may use vector; part–adapter relationships use graph; exact identifiers use hybrid; general questions use direct. The direct route does not consult private documents.

Try it yourself

  1. Choose Router and a router model; test vector, graph, hybrid, direct and an ambiguous request.
  2. Record the input, source and expected outcome before running the experiment. Use only the fictional data in the example.
  3. Follow the diagram stages. At every step record what information is received and produced; do not confuse intermediate output with the final outcome.
  4. Repeat after removing necessary information or making the input ambiguous. Check whether the system clarifies, stops or invents an answer.
  5. Compare with the explained solution. Keep the configuration, date, result and an explanation for differences. Change one thing and retest.

An explained solution

Record the chosen route and whether evidence was actually used. Compare all six variants on identical questions. A successful exercise lets you show the connection between input, stages and outcome. When information is missing, a cautious answer is more useful than invented details. Compare more than style: check conditions, sources and operations too.

When it helps and what can go wrong

The local hybrid branch merges and deduplicates; it does not automatically apply the separate Hybrid template’s RRF and rerank. Choose this approach when it improves a measured need. Keep a simple baseline and compare outcomes using identical inputs. One successful example does not establish reliability in every situation.

Check your understanding

Does RAG change LLM parameters?

No. It supplies request-time context; parameter changes belong to training.

Can a reranker fix an unindexed document?

No. The passage must first exist in the index and candidate list.

What outcome should this exercise produce?

Record the chosen route and whether evidence was actually used. Compare all six variants on identical questions.

Words to remember

  • Retrieval: Finding relevant information in accessible sources.
  • Rerank: A more careful reordering of candidates already retrieved.
  • Regresie / Regression: A change that breaks a previously correct case.

Sources and your next step

To prepare: R07 — Hybrid RAG: meaning and exact words

Continue with: D04 — Good questions for testing RAG · E02 — Evaluating RAG stage by stage · C03 — An assistant for complex documents