
OmniCore is a token-efficient AI routing agent built for the AMD Developer Hackathon: ACT II — Track 1. It exploits the most important rule of the competition: local model inference costs zero Fireworks tokens. Every architectural decision flows from this principle. The agent runs a 5-layer cost ladder for each incoming task: 1. Semantic Cache — Normalized exact-match plus Jaccard character n-gram similarity (threshold 0.92) catches near-duplicate prompts instantly at zero cost. 2. OmniSolver — A zero-token rule-based engine that handles arithmetic via an AST-based safe evaluator (no eval()), percentage and discount problems, compound interest, multi-leg distance/speed/time problems, and a 60-entry deterministic factual lookup table covering world capitals, scientific constants, famous founders, and more. 3. Scoring Classifier — Unlike first-match regex classifiers, OmniCore scores all 8 task categories simultaneously using weighted feature detectors and structural bonuses. The highest-scoring category wins, with a calibrated confidence value. This prevents misclassification on hybrid prompts. 4. Ollama Local LLM (Gemma 2B) — Sentiment analysis, named entity recognition, summarization, and factual Q&A are routed to a locally-running Gemma 2B model via Ollama. These tasks cost zero Fireworks tokens. The agent gracefully falls back to Fireworks if Ollama is unavailable, so it always works. 5. Fireworks API — Only math, logic, code debugging, and code generation hit the Fireworks API. Prompts are compressed before every call (stripping filler phrases and code comments), token budgets are 30–50% tighter than baseline, and system prompts are single-line judge-aligned instructions averaging 13 tokens. On the 20-task evaluation set: 3 tasks solved by OmniSolver, 9 by Ollama, 8 by Fireworks. Estimated total: ~2,100 Fireworks tokens versus 3,545 for the #1 competitor and 5,133 for the #3 baseline — a 39% reduction with improved accuracy.
13 Jul 2026