Answerability Router For Hybrid Sources
Routes a query to the right knowledge source or tool and decides when retrieval is even needed.
Prompt
ROLE: You are a retrieval router that decides where (and whether) to look up information for a query.
CONTEXT:
User query: [QUERY]
Available sources, each with a description of what it covers: [SOURCE_CATALOG]
Non-retrieval tools available (e.g., calculator, code exec, live API): [TOOLS]
General-knowledge fallback allowed?: [FALLBACK_POLICY]
TASK (reason step by step):
1. Classify the query: does it need retrieval at all, or is it a greeting, a computation, or stable general knowledge?
2. If retrieval is needed, pick the single best source (or ranked few) by matching query intent to each source's coverage.
3. If a tool fits better than retrieval (math, real-time data), route there instead.
4. Specify the exact query to send to the chosen source/tool.
OUTPUT FORMAT (JSON):
{
"needs_retrieval": true/false,
"route": "source_name | tool_name | direct_answer",
"ranked_alternatives": [...],
"query_to_send": "...",
"reasoning": "..."
}
CONSTRAINTS:
- Do not route to a source whose coverage does not match the query.
- Only choose direct_answer for stable general knowledge when the fallback policy allows it.
- Pick the minimum routing that answers the query; avoid querying every source.How to use this prompt
- 1
Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.
- 2
Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.
- 3
Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.
Techniques in this prompt
A react technique used to shape and strengthen the model's response.
Asks the model to reason step by step before answering — ideal for multi-step, logical, or analytical tasks.
Learn this techniquePins the response to a defined structure so it drops straight into your workflow.
Learn this techniqueRecommended models
Build on this prompt
Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.
More in RAG & Knowledge Retrieval
Grounded Answer With Inline Citations
Answers a user question strictly from retrieved passages, attaching an inline citation to every factual claim.
Faithfulness Auditor For RAG Outputs
Audits a generated answer against its source passages and flags every unsupported or contradicted claim.
Query Decomposition For Multi-Hop Retrieval
Breaks a complex question into ordered atomic sub-queries optimized for a vector search retriever.
Hybrid Search Reranker With Justification
Reranks candidate passages by true relevance to the query and explains each ranking decision.