Enhancement-overlay SOP for query-type routing — sending a query to the right index / tool / engine *before* retrieving, not after. Activate when a calling agent owns a retrieval or answering surface that fronts more than one handler (a summary index, a vector index, a text-to-SQL engine, a tool) and the inbound queries differ in kind: "summarize this doc" vs "find the clause about X" vs "how many orders shipped in Q3". Encodes the one non- negotiable insight — one retriever cannot serve all query types; route first, retrieve second — plus the three router families (LLM/selector, embedding/semantic, keyword/rule), confidence-threshold + fallback discipline, and the cross-framework mapping (LlamaIndex RouterQueryEngine / SelectorPromptTemplate, Dify Question Classifier node, LangGraph conditional edges). This is an ENHANCE overlay over the per-framework skills — cross-link [[llamaindex]], [[agentsop-dify]], [[agentsop-langgraph]] for the deep API. Search keywords: route query, semantic router, query classification, RouterQueryEngine, multi-index routing, pick the right tool for a query.trigger_keywords: - "query routing" - "route to index" - "RouterQueryEngine" - "question classifier" - "conditional edge router" - "text-to-SQL or RAG" - "summary vs lookup query" - "selector" - "intent routing"
$npx -y skills add agentsope/skillalchemy --skill agentsop-query-routingInstalls into the current project.
Run `npx skills use "https://github.com/agentsope/skillalchemy" --skill "agentsope/skillalchemy/agentsop-query-routing"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/agentsope/skillalchemy" that are relevant to the current task. Run `npx skills add "https://github.com/agentsope/skillalchemy"` and select the relevant skills, then follow their instructions.