Our submission for the AMD Developer Hackathon is a highly optimized, hybrid AI agent designed to maximize token efficiency while maintaining rigorous accuracy standards across complex evaluation tasks. To achieve this, we engineered a local-first cascade system. The agent runs entirely within the strict grading constraints (CPU-only, 4GB RAM) by bundling a highly quantized `gemma:2b` model running locally via an embedded Ollama server. This local instance acts as our zero-cost primary solver, immediately handling simpler queries in categories like factual Q&A and sentiment analysis without consuming any external API tokens. When the local model detects low confidence or encounters complex reasoning, math, or coding tasks, the agent dynamically escalates the prompt to the cloud-based Fireworks AI API. We strictly constrain this fallback tier to utilize only the allowed Gemma 4 models (such as `gemma-4-31b-it`). By intelligently routing queries—using local compute for the easy tasks and reserving the cloud API solely for the difficult ones—our agent achieves an exceptional balance of high accuracy (easily passing the 84.2% gate) and minimal token expenditure. The entire system is packaged in a lean, self-contained Docker image well under the 10GB limit.
Category tags: