Semantic Gateway
About the project
Semantic Gateway — Executive Overview
Semantic Gateway is an intelligent, cost-optimized LLM routing platform designed to evaluate incoming user prompts in real-time and dynamically route them to the most efficient language model path.
Key Capabilities & Architecture
-
Semantic Classification: Uses
sentence-transformers(all-MiniLM-L6-v2) to generate vector embeddings and compute cosine similarity scores on incoming prompts to determine complexity. -
Dynamic Dual-Lane Routing:
-
Fast Lane (
gemma2:2bvia Ollama / Mock): Handles short, low-complexity queries (e.g., basic arithmetic, translation) with near-instant latency and minimal compute cost. -
Deep Lane (
llama-3.3-70b-versatilevia Groq API): Routes heavy, high-reasoning tasks (e.g., smart contract audits, complex code generation, multi-step logic) to frontier-class models via Groq’s LPUs. -
OpenAI-Compatible Endpoint: Exposes a unified
/v1/chat/completionsREST API endpoint that returns structured JSON payloads, token consumption, routing latency, and cost-savings analytics. -
Interactive Sandbox Dashboard: Includes a live web interface featuring real-time visual decision pathway trees, latency tracking, and metric telemetry.
Infrastructure & Deployment Strategy
- Backend (Render): Hosts the Python FastAPI service, vector embedding models, and Groq API integrations on a persistent Web Service container.
-
Frontend (Vercel): Serves the static UI dashboard for cross-origin requests (
CORS) to the Render API gateway.
Built with
AI tools
Prize Categories Entered
- Submitted

Best Open-Source AI Project