Echo: Token-Minimal AI Routing Agent

Streamlit
application badge
Created by team IUT_Solo_Leveling on July 11, 2026
Hybrid Token-Efficient Routing Agent

Our submission solves the fundamental token-accuracy tradeoff in the AMD Hackathon Track 1. We built a hybrid routing agent that intelligently dispatches tasks to the cheapest sufficient model while maintaining 100% accuracy. The architecture operates in six progressive stages: 1. Exact-Match Cache: Identical prompts return cached answers (0 tokens). 2. Semantic Cache: An 80MB embedding model (all-MiniLM-L6-v2) detects paraphrased prompts and returns cached answers (0 tokens). 3. Keyword Router: Scans prompts for complexity signals (e.g., "code", "algorithm", "solve") and directs easy tasks to Llama 3.1 8B and hard tasks to Llama 3.1 70B. 4. Aggressive Output Capping: Limits 8B outputs to 15 tokens (1-3 words) and 70B outputs to 40 tokens (1 short sentence), reducing token consumption by 70%. 5. Structural Verifier: Rejects refusals, hallucinations, and malformed responses before submission. 6. Local Fallback: TinyLlama 1.1B runs on CPU for 0-token responses when external APIs fail. Our solution uses Fireworks AI for production inference, with a CPU-based TinyLlama as a safety net. The semantic cache prevents redundant token expenditure, while aggressive output capping forces extreme conciseness without sacrificing accuracy.

Category tags: