Part 4 of 7 · 1 min read
Routing
Pick where to search.
Query routing
Deciding, per question, which source or index to search (or whether to search at all). It is an if/else decided in natural language.
Routing is about where, not what. A company may have a vector store for documentation, a SQL database for orders and a web API for live status. The example routes among three subsets of the corpus (errors, billing, how-to) by keyword votes.
Routing's weakness is built in: the router has to be right, and one route cannot answer a question that spans two. In the results, routing scores 25 percent on compound questions, because "refund" and "webhook retry" live in different subsets and the router picks one. A test checks exactly that. If you route, give the router a fallback ("search everything when unsure") and consider fanning out to several routes.