πŸ‰ HydraRoute: Zero-Token-First Hybrid AI Router

Created by team Smiley on July 09, 2026
Hybrid Token-Efficient Routing Agent

HydraRoute is a token-efficient routing agent for the AMD Developer Hackathon ACT II Track 1 that radically minimizes API token consumption while maximizing accuracy. The core insight: most tasks don't need an LLM at all. Architecture: β€’ Tier 0 β€” 11 local Python solvers (arithmetic, SymPy equations, percentages, date math, string ops, unit conversion, regex extraction, factual lookup, number conversion, word analysis, sentiment classification). These 11 modules solve ~93% of all tasks at ZERO token cost with 100% deterministic accuracy. β€’ Tier Local (optional) β€” Qwen2.5-1.5B GGUF model bundled via llama.cpp for zero-token local inference on simple NER and sentiment tasks. β€’ Tier 1 β€” Gemma 4 26B MoE for language tasks (NER, factual knowledge, summarization). Only 3.8B active parameters for fast, efficient inference. β€’ Tier 2 β€” Gemma 4 31B for complex reasoning and code generation/ debugging with self-consistency voting (3 parallel calls with majority consensus). Our key innovations: β€’ SymPy-LLM Symbiosis: LLM only generates equation strings from word problems β€” SymPy solves them locally with 100% accuracy, zero hallucination risk. β€’ Session Dedup: Tasks sharing >80 character context are batched into a single API call. β€’ Relevance Compression: TF-IDF sentence scoring keeps top 60% of content (disabled for reasoning/math to preserve logical structure). β€’ RTK Stack Trace Compression: Truncates tracebacks to 10 lines for code debugging. β€’ FrugalGPT Cascade + YES/NO Judge: Self-validates Tier 1 output before acceptance, auto-escalates to Tier 2 on failure. β€’ Temperature Scaling + Prompt Mutation: Different temperature and prompt phrasing on same-model retry for increased robustness. β€’ Prompt caching: Common prefix "HydraRoute |<category> |" for Fireworks/OpenRouter cache hits. Benchmark: 67 tasks across all 8 categories β†’ 97% official / 100% real accuracy, avg 3.4s per task.

Category tags:
Explore more applications