Home/AI Innovation/8-Factor Smart Routing

8-Factor Smart Routing

http://localhost:3334/smart-chat
Open ↗

Click to open live demo

http://localhost:3334/smart-chat

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

Overview

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.

By the Numbers

Decision Factors8
Cost Reduction~200x
PrivacyPII-Safe

Tech Stack

TypeScriptWeighted Scoring AlgorithmRegex PII DetectionNext.js API Routes