Sieve is a hybrid, token-efficient routing agent for AMD Developer Hackathon Act II Track 1. It reads tasks from /input/tasks.json, classifies each into one of eight capability categories — factual QA, math, logic, summarization, sentiment, NER, code debugging, and code generation — and writes results to /output/results.json. The core principle is zero-token-first: any task solved inside the container costs no Fireworks tokens while still counting toward accuracy, so Sieve maximizes local solve rate before spending anything. Routing runs as a three-layer cascade. Layer one uses deterministic solvers for categories that can be computed rather than guessed: math is parsed and executed, code is run and behaviorally verified, and logic tasks use a structural multiple-choice detector. Layer two hands remaining tasks to a bundled small local model for factual QA and summarization, gated by a confidence check. Layer three escalates only low-confidence tasks to Fireworks AI, selecting the cheapest model that clears the accuracy gate, capping max_tokens per category, and using terse answer-only prompts with reasoning disabled to keep the token bill minimal. Exact and semantic answer caching prevents repeated spend, and a per-task time and token budget keeps every task within the scoring limits. The container is fully self-contained and reproducible, reading Fireworks credentials, base URL, and the allowed model list from the runtime environment rather than hardcoding them.
Category tags: