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
- Write selection descriptions for summary and vector engines. [source-anthropic-route-document-question-by-answer-depth]
- Test overview, detailed-fact, and unmatched questions with RouterQueryEngine. [source-anthropic-route-document-question-by-answer-depth]
- 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
- Python, LlamaIndex, Anthropic API, and test corpus; all sources traceable.
Permissions
- Reads one authorized corpus, builds summary/vector indexes, and calls the model API; writes only to test vector storage, while users still need source-system authorization.
Limitations
Run the source on isolated test data, then check outputs and dependency versions before adapting it.
Pinned upstream source
- 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