
Our agent treats token spend as the enemy: every task is answered without paying a single Fireworks token, while deterministic safeguards keep accuracy well above the qualification gate. Three layers. First, exact solvers handle anything provable in Python (arithmetic, percentages, averages, single-variable linear equations, temperature conversions, ratio and rate word problems): guaranteed-correct answers at zero cost. Second, everything else runs on a quantized Qwen2.5-1.5B GGUF bundled in the image via llama.cpp. Third, every local answer must pass a deterministic validation layer before shipping: NER answers are checked for entity completeness and hallucination against the source text, code must parse via AST with the required function names, debugging fixes must differ from the buggy input and state a cause, summaries must obey requested sentence and bullet counts, and sentiment must be exactly one valid label. A rejected answer gets one free local retry at higher temperature; the best local answer ships. Fireworks AI (via FIREWORKS_BASE_URL, validated against ALLOWED_MODELS) remains available strictly as a disaster fallback if local inference itself fails, so the expected API token count of a full run is zero. Reliability: results.json is written atomically after every task, an internal 540-second deadline guarantees completion before the 10-minute limit, and the container exits 0 with valid JSON in every failure mode. A 215-case eval harness plus the official sample tasks back every routing and validation decision with measured data.
13 Jul 2026