Hybrid Token - Efficient Routing Agent #nexus-26

Created by team nexus-026 on July 06, 2026
Hybrid Token-Efficient Routing Agent

The Hybrid Token-Efficient Routing Agent is a Dockerized submission for the AMD Developer Hackathon's general-purpose agent track. Instead of sending every task to a paid Fireworks-hosted LLM, it first classifies each incoming prompt into one of eight capability categories using a three-layer pipeline: a cheap regex/keyword matcher, a semantic nearest-centroid check backed by MiniLM embeddings, and a local LLM tie-break consulted only on genuinely ambiguous cases. Four categories that are cheap to verify locally (factual knowledge, sentiment classification, summarization, and named entity recognition) are answered by a bundled local Qwen2.5-3B-Instruct model at zero token cost, escalating to a Fireworks Gemma model only if the local answer looks degenerate (empty, a refusal, or missing a required label). The four hardest categories (math reasoning, logical reasoning, code generation, and code debugging) route directly to specific Fireworks models chosen after measuring empty-answer rates on a practice set, since a small model's wrong answer in these categories is fluent but not detectably broken. This routing strategy was tuned end-to-end against a 101-task practice set to clear the accuracy gate while minimizing the Fireworks token count the submission is scored on.

Category tags: