Agent Wealth HubFree public resources
中文 EN العربية

Back to catalog / Agent workflows

Route document questions to summary or detail retrieval

Configure summary and vector query engines over one corpus and route each question to the appropriate depth.

Goal

Configure summary and vector query engines over one corpus and route each question to the appropriate depth.

Steps

  1. Write selection descriptions for summary and vector engines. [source-anthropic-route-document-question-by-answer-depth]
  2. Test overview, detailed-fact, and unmatched questions with RouterQueryEngine. [source-anthropic-route-document-question-by-answer-depth]
  3. Check routes and passage citations; say when evidence is absent. [source-anthropic-route-document-question-by-answer-depth]

How to verify

Test a short factual question and a detail-heavy question; verify routing to summary versus vector engines and inspect cited passages.

Troubleshooting

If a detail question takes the summary path, refine route descriptions and boundaries; if a summary is wrong, inspect the document version it covers.

Permissions

Prerequisites

Permissions

Limitations

Run the source on isolated test data, then check outputs and dependency versions before adapting it.

Pinned upstream source

https://github.com/anthropics/anthropic-cookbook/blob/9c1e493ddd2b82df399d2a61b9c806c539e18be6/third_party/LlamaIndex/Router_Query_Engine.ipynb

Repository
anthropics/anthropic-cookbook
File path
third_party/LlamaIndex/Router_Query_Engine.ipynb
Pinned commit
9c1e493ddd2b82df399d2a61b9c806c539e18be6
Source checked
2026-10-14 · Reviewed against the pinned upstream source

Repository metrics

These values describe the upstream repository, not popularity or likes for an individual skill or playbook.

Stars
Not collected
Forks
Not collected
Observed at
Not collected

No metrics snapshot is available yet.

License: MIT

Main topic

Turn ecommerce campaign materials into a reviewable weekly brief

Related resources