Why are LLMs bad at arithmetic and character-level tasks, and what do you do about it?
Quick-fire answer from the Awesome Generative AI Guide (MIT)
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Two reasons compound: tokenization splits numbers and words into fragments that do not align with digits or letters, and the model predicts likely text rather than executing an algorithm, so multi-digit math and letter-counting have no reliable internal procedure. The fix is not a better prompt but the right tool: give the model a calculator, code execution, or a database and have it call that instead of computing in its head. For structured math or data work, generate code and run it, then feed the result back. This is a core lesson: when a task needs guarantees, offload it to a deterministic tool rather than trusting the model's token prediction.
Full worked answer
Two reasons compound: tokenization splits numbers and words into fragments that do not align with digits or letters, and the model predicts likely text rather than executing an algorithm, so multi-digit math and letter-counting have no reliable internal procedure. The fix is not a better prompt but the right tool: give the model a calculator, code execution, or a database and have it call that instead of computing in its head. For structured math or data work, generate code and run it, then feed the result back. This is a core lesson: when a task needs guarantees, offload it to a deterministic tool rather than trusting the model's token prediction.
Learn more: Tools in AI (Agentic AI Crash Course)
What a good answer covers
- Two reasons compound: tokenization splits numbers and words into fragments that do not align with digits…
- The fix is not a better prompt but the right tool
- For structured math or data work, generate code and run it, then feed the result back
- This is a core lesson: when a task needs guarantees, offload it to a deterministic tool rather than…
Key terms: Learn more
Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep