Skip to content

Routing Heuristics

A router should classify query intent before retrieval begins. The objective is to separate focused lookups from exhaustive synthesis and route each to the cheapest path that preserves answer quality.

  • Query targets a specific document, person, or known artifact.
  • User asks for a single fact or narrow lookup.
  • Expected answer likely exists in one or a few sources.

Examples:

  • “What is our enterprise pricing tier?”
  • “Find references to the Chicago office.”
  • Query asks for “all”, “every”, “across”, “patterns”, or “compare”.
  • User asks for summary over a broad period or corpus segment.
  • Query requires cross-source aggregation before answering.

Examples:

  • “Summarize all postmortems from last quarter.”
  • “Compare onboarding quality across departments.”
  • Query has a broad synthesis goal plus a clear topical filter.
  • A pre-filter can reduce corpus size before recursive analysis.

Example:

  • “Analyze all support tickets about billing and list systemic failure patterns.”

Hybrid path:

  1. Retrieve likely billing-related material.
  2. Run exhaustive reasoning on that narrowed corpus.
  • Start with simple heuristics and explicit keywords.
  • Add model-based routing only when heuristic recall/precision is insufficient.
  • Log route decisions and answer quality outcomes for iterative tuning.