Unified query with automatic routing
Changed onExecute a unified query against a POT with automatic strategy selection.
How it works:
- Classifies query (relational → GraphRAG, everything else → RAG)
- Executes that strategy
- Returns results with routing metadata
Strategies:
- auto (default): Automatic selection based on query classification
- rag: Force RAG-only (semantic search with embeddings)
- graph_rag: Force GraphRAG (graph traversal for relational queries; seeds from RAG)
- cag: Not available on this endpoint (501 STRATEGY_NOT_AVAILABLE); use POST /pots/{pot_id}/cag/search
Metadata: classification.suggested_strategy is the classifier's suggestion and may still read cag for a factual query; strategy_used is what ran. cag_attempted is always false and strategy_used is never cag or cag_with_rag_fallback (both stay in the schema for compatibility).
Tokens: a read is never refused for tokens. The gap signal's relevance judge (one small LLM call, only on an ambiguous gap) is billed as gap_signal_judge and skipped once the month's tokens are spent, leaving the deterministic verdict (v0.7.27.0).
Latency:
- RAG: ~500ms
- GraphRAG: ~200-800ms (depends on graph density)
Request
- Base URLhttps://api.scipot.ai (the document declares no server; this is the origin it was published from)
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
POT identifier (UUID or slug)
Request body
Example request
{
"enable_fallback": true,
"filters": {
"domain": "architecture",
"levels": [
"CONSTITUTION",
"VERIFIED"
],
"tags": [
"core"
]
},
"query": "What is POT Index?",
"strategy": "auto",
"top_k": 5
}Response
Successful query
Example response
{
"data": {
"results": [
{
"content": "POT Index es el sistema de scoring...",
"domain": "architecture",
"fact_id": "01234567-89ab-cdef-0123-456789abcdef",
"level": "VERIFIED",
"match_details": {
"combined_score": 0.82,
"similarity_score": 0.81
},
"pot_score": 0.85,
"score": 0.82,
"source": "rag",
"tags": [
"core",
"scoring"
]
}
],
"total_results": 1
},
"gap_signal": {
"average_score": 0.85,
"confidence": 0.85,
"high_certainty_facts": 1,
"is_knowledge_gap": false,
"reasons": [
"1_high_certainty_facts"
],
"threshold": 0.45,
"total_facts": 1,
"version": "v3"
},
"is_knowledge_gap": false,
"metadata": {
"cag_attempted": false,
"cag_duration_ms": 0,
"cag_results_count": 0,
"classification": {
"category": "factual",
"confidence": 0.75,
"reasoning": [
"WHAT question pattern detected"
],
"suggested_strategy": "cag"
},
"fallback_triggered": false,
"rag_duration_ms": 470,
"strategy_used": "rag",
"total_duration_ms": 480
}
}Changes
- info
added the optional property
/////to the response with the status - info
added the optional property
///to the response with the status
- info
- info
added the optional property
///to the response with the status - info
added the optional property
///to the response with the status
- info