Models work numbers out in their heads and get multi-digit products and powers wrong (qwen3:8b: 3847 x 2963 as 11,378,261; in the reply loop it searched the web for it and gave no answer). The calculator evaluates a whitelisted ast (numbers, operators, a few math functions, pi/e), never code, with a 200 character cap and a power size limit so nothing hangs. Idea from OpenJarvis's calculator tool (Apache 2.0). Eval (qwen3:8b, v2 setup): 0/2 before, 12/12 over four runs after; the unrelated question never calls it. Router evals unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.6 KiB
2.6 KiB