Exercises: Build a Simple Query Router
Use starter.py to route queries to dense, sparse, hybrid, or high-risk retrieval paths.
1 Detect exact-term signals
Route IDs, SKUs, clauses, and error codes safely.
2 Detect semantic signals
Route paraphrase-heavy questions to dense retrieval.
3 Choose hybrid when both matter
Combine dense and sparse only when evidence needs both signals.
4 Explain the route
Return route, reason, controls, and metric to monitor.