routing

Route user queries to vectordb, web_search, or direct_llm with collection strategy.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/edangx100/adaptive_rag --skill routing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: routing
Source: https://github.com/edangx100/adaptive_rag/tree/main/.claude/skills/routing
Command: npx skills add https://github.com/edangx100/adaptive_rag --skill routing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates manual data source selection by automatically routing queries to the most appropriate collections or search methods.

Core Features & Use Cases

  • Intelligent Routing: Determines whether to search vector databases, web search, or use direct LLM.
  • Collection Selection: Identifies which knowledge base collections (catalog, faq, troubleshooting) to search.
  • Use Case: When a customer asks about both technical issues and return policies, this Skill automatically searches both troubleshooting and FAQ collections.

Quick Start

Route the query "What gaming laptops do you have?" to the appropriate data source.

Frequently Asked Questions about routing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically route queries to the right data sources?

Query routing automatically directs search to the optimal data source—vector database, web search, or direct LLM—based on query type. This eliminates manual selection and ensures product searches, policy inquiries, and troubleshooting queries reach the correct collections and search strategy.

What's the difference between routing to a vector database versus web search?

Vector database routing searches internal knowledge collections (catalog, FAQ, troubleshooting) for structured answers; web search routing queries external sources for current information. The routing decision selects the best method based on query intent and available data.

Can routing handle queries that span multiple data sources?

Yes. Routing identifies when a query requires multiple collections—for example, searching both troubleshooting and FAQ collections when a customer asks about technical issues and return policies—and selects the appropriate collection strategy accordingly.

How does routing ensure consistency across retries?

Routing enforces consistent decision logic across retry attempts, returning a stable routing decision with route, collections, strategy, and reasoning. This prevents query instability and ensures the same query type receives the same destination.

What does a routing decision output include?

A routing decision returns the selected route (vectordb, web_search, or direct_llm), the target collection set, the search strategy, and reasoning for the choice. This metadata enables downstream processing to execute the routing plan correctly.

When should I use routing at the start of a query pipeline?

Routing initiates at the pipeline start to determine data source direction before any search or retrieval occurs. This early classification prevents wasted computation and directs all subsequent steps—search, collection selection, and strategy execution—to the correct target.