8-Factor Smart Routing
Intelligent SLM/LLM Hybrid with Weighted Scoring
A novel routing engine that evaluates every query across 8 weighted factors to decide whether a fine-tuned local SLM or a cloud LLM should handle it. Privacy-sensitive queries stay local. Complex reasoning goes to the cloud. Cost and latency are optimized automatically.
Video walkthrough coming soon
2-3 minute overview
Live Demohttp://localhost:3334/smart-chat
Click "Load Demo" to embed the live application
Key Capabilities
- 8 weighted factors: Data Privacy (1.5x), Query Complexity (1.3x), Domain Match (1.2x), Reasoning Depth (1.2x), Response Time (1.1x), Cost Efficiency (1.0x), Query Clarity (0.9x), Context Window (0.8x)
- PII detection triggers automatic routing to local SLM
- Complex multi-step queries escalate to cloud LLM with PII scrubbing
- Visual routing decision breakdown shown in real-time
- Confidence scoring for every routing decision
By the Numbers
8
Decision Factors
~200x
Cost Reduction
PII-Safe
Privacy
Tech Stack
TypeScriptWeighted Scoring AlgorithmRegex PII DetectionNext.js API Routes