Dev.to
7/20/2026

Are deterministic tasks eating your tokens?
Short summary
The post argues that many AI systems waste tokens by sending deterministic tasks (math, sorting, regex matching) to LLMs instead of plain code. The fix is tool use: let the model call a calculator, database, or script for deterministic work, reserving its reasoning for genuinely fuzzy tasks. A priority checklist helps decide what to delegate—try plain math first, then existing tools, then fixed rules, and only use AI for tasks requiring judgment.
- •Deterministic tasks waste tokens and reduce reliability when sent to LLMs
- •Delegate deterministic work to tools (calculators, scripts, APIs) via function calling
- •Priority checklist: math → tools → fixed rules → AI, cheapest and most reliable first
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



