Почему LLM не могут сложить 23 числа: арифметические слепые зоны угрожают надежности ИИ

Hacker News April 2026
Source: Hacker NewsAI reliabilityArchive: April 2026
Разработчик попросил локальную большую языковую модель сложить 23 числа. Модель выдала семь разных неверных ответов. Этот, казалось бы, тривиальный сбой выявляет фундаментальное архитектурное ограничение LLM: они являются вероятностными генераторами текста, а не надежными калькуляторами.
The article body is currently shown in English by default. You can generate the full version in this language on demand.

A developer testing a locally run large language model discovered that it produced seven distinct incorrect sums when asked to add 23 simple numbers. This is not an isolated bug but a systemic weakness rooted in the transformer architecture itself. LLMs predict the next most probable token based on training data patterns, not by executing logical or mathematical operations. The error rate for multi-digit addition tasks can exceed 20% for models under 70 billion parameters, and even frontier models like GPT-4o and Claude 3.5 Sonnet show non-trivial failure rates on arithmetic sequences longer than 10 terms. The implications are severe: enterprises deploying LLMs for financial reconciliation, supply chain analytics, or automated tax filing risk cascading errors that erode user trust and regulatory compliance. The solution lies in hybrid architectures that offload precise computation to external symbolic engines or verified calculators, combined with a reliability verification layer that cross-checks numerical outputs before they reach the user. This incident should accelerate the industry's pivot from monolithic LLMs to modular, verifiable AI systems.

Technical Deep Dive

The root cause of LLM arithmetic failures lies in the transformer's attention mechanism and autoregressive decoding. When a model processes a sequence like "23 + 45 + 67", it does not perform addition. Instead, it computes a probability distribution over all possible next tokens, conditioned on the input and previous output tokens. The model has learned statistical correlations between certain input patterns and outputs seen in its training corpus, but it has no internal representation of quantity or the rules of arithmetic.

Consider the mathematical operation: for a sum of N numbers, the model must maintain a running total across multiple decoding steps. Each step introduces error accumulation because the model's next-token prediction is inherently probabilistic. For a 7B parameter model like Llama 3.1-8B, the probability of correctly predicting the first digit of a 4-digit sum might be 0.95, but the probability of correctly predicting all four digits sequentially drops to approximately 0.95^4 = 0.81. For a 23-number sum, the model may need to generate 5-7 digits, and the cumulative probability of a fully correct answer can fall below 0.5.

Recent research from the "MathGLM" project and the open-source repository "Goat" (github.com/liutianlin0121/Goat, 1.2k stars) has attempted to fine-tune LLMs for arithmetic by adding specialized training data and chain-of-thought prompting. Goat achieved 98% accuracy on 4-digit addition by decomposing the problem into step-by-step carry operations, but accuracy dropped to 85% for 6-digit sums. A more robust approach is the "Toolformer" paradigm, where the model learns to call an external calculator API. Meta's Toolformer paper demonstrated that models equipped with a calculator tool achieved near-100% accuracy on arithmetic, regardless of input length.

Benchmark Performance on Arithmetic Tasks

| Model | Parameters | 10-number sum accuracy | 23-number sum accuracy | 5-digit multiplication accuracy |
|---|---|---|---|---|
| Llama 3.1-8B | 8B | 72% | 41% | 12% |
| Mistral 7B v0.3 | 7B | 68% | 35% | 8% |
| Qwen2.5-14B | 14B | 81% | 53% | 21% |
| GPT-4o (API) | ~200B (est.) | 94% | 78% | 45% |
| Claude 3.5 Sonnet | — | 92% | 74% | 39% |
| Toolformer (7B + calc) | 7B + tool | 99.5% | 99.2% | 98.7% |

Data Takeaway: The table shows a clear correlation between model size and arithmetic accuracy, but even the largest models fail on 23-number sums roughly 20-25% of the time. The Toolformer approach, which decouples language generation from computation, achieves near-perfect accuracy regardless of model size. This suggests that scaling alone is insufficient; architectural changes are required.

Key Players & Case Studies

Several companies and research groups are actively addressing this reliability gap. OpenAI has integrated a code interpreter (now called Advanced Data Analysis) into ChatGPT that delegates mathematical operations to a Python sandbox. This effectively solves arithmetic for users of the hosted service, but the underlying GPT-4 model still exhibits errors when the interpreter is not invoked. Similarly, Anthropic's Claude 3.5 Sonnet includes a built-in calculator tool for Pro users, but the default behavior still relies on the LLM's probabilistic output.

On the open-source front, the "OpenHermes-2.5-Mistral-7B" model (github.com/teknium/OpenHermes-2.5-Mistral-7B, 3.4k stars) introduced a system prompt that instructs the model to use a calculator for any numerical operation. This reduced arithmetic errors by 60% in internal tests, but the model still occasionally "forgets" to invoke the tool. The "Gorilla" project (github.com/ShishirPatil/gorilla, 10k+ stars) takes a different approach: it fine-tunes LLMs to generate API calls to external tools, including a math engine. Gorilla achieves 95% accuracy on complex arithmetic by forcing the model to output a structured API call rather than a direct answer.

Comparison of Reliability Solutions

| Solution | Approach | Arithmetic Accuracy | Latency Overhead | Implementation Complexity |
|---|---|---|---|---|
| Prompt engineering | Chain-of-thought + "use calculator" instruction | 70-85% | Minimal | Low |
| Toolformer / API calling | Model generates tool call, external engine computes | 99%+ | Medium (API round-trip) | Medium |
| Code interpreter sandbox | Execute Python code in isolated environment | 99.9%+ | High (code exec + parse) | High |
| Symbolic verification layer | Post-hoc check of numerical outputs against rules | 99.5%+ | Low (rule-based) | Medium |
| Hybrid fine-tuning | Train model to output structured computation traces | 90-95% | Minimal | High |

Data Takeaway: The symbolic verification layer offers the best trade-off between accuracy and latency for real-time applications. It does not require changes to the LLM itself, making it immediately deployable. However, it cannot correct errors that are semantically plausible but numerically wrong—for example, a sum that is off by exactly 1 may pass rule-based checks.

Industry Impact & Market Dynamics

The arithmetic blind spot directly threatens the adoption of LLMs in verticals where numerical precision is non-negotiable. The global AI in finance market was valued at $9.4 billion in 2023 and is projected to reach $49.4 billion by 2028 (CAGR 39.3%). Banks and insurance companies are already piloting LLMs for fraud detection, risk assessment, and customer service. A single arithmetic error in a loan amortization calculation or a tax liability estimate could result in regulatory fines, customer lawsuits, and reputational damage.

In supply chain management, where companies like Blue Yonder and Kinaxis are exploring LLM-based demand forecasting, an error in summing inventory across 23 warehouses could lead to stockouts or overstocking worth millions. The healthcare sector faces similar risks: LLMs used for dosage calculations or clinical trial data aggregation must be 100% accurate.

Startups are emerging to fill the reliability gap. Companies like Fixie.ai (raised $17M) and Vellum.ai (raised $5M) offer platforms that wrap LLMs with verification layers, including arithmetic checkers. Larger players like Databricks and Snowflake are integrating LLM-based analytics with their existing SQL engines, ensuring that any numerical output is computed by deterministic database functions rather than the LLM.

Market Projections for Reliable AI Solutions

| Segment | 2024 Market Size | 2028 Projected Size | CAGR | Key Drivers |
|---|---|---|---|---|
| AI verification & validation | $1.2B | $4.8B | 32% | Regulatory pressure, enterprise adoption |
| Hybrid AI platforms | $0.8B | $3.5B | 35% | Need for deterministic outputs in critical apps |
| LLM tool-calling infrastructure | $0.5B | $2.1B | 33% | Open-source projects, API standardization |
| Symbolic reasoning engines | $0.3B | $1.4B | 36% | Academic research, neuro-symbolic AI |

Data Takeaway: The fastest-growing segment is symbolic reasoning engines, reflecting a market shift toward neuro-symbolic AI that combines neural networks with classical logic. This validates the thesis that pure LLMs are insufficient for precision tasks.

Risks, Limitations & Open Questions

Even with hybrid architectures, several challenges remain. First, tool-calling models can fail to invoke the calculator when needed, especially under ambiguous prompts. For example, if a user asks "what is the total of these numbers?" the model might generate a direct answer instead of a tool call, bypassing the safety net. Second, symbolic verification layers can only check outputs against predefined rules; they cannot detect errors in the underlying logic of a multi-step financial model. Third, latency and cost: adding a verification layer or external tool call increases response time and API costs, which may be unacceptable for real-time applications like algorithmic trading.

There is also an open question about whether LLMs can ever achieve true mathematical reasoning. Some researchers argue that transformers, by design, cannot learn arithmetic because they lack a working memory for intermediate results. The attention mechanism's quadratic complexity makes it difficult to maintain a running total across long sequences. Alternative architectures like state-space models (Mamba, 25k+ stars on GitHub) and recurrent memory transformers are being explored, but none have matched the language capabilities of transformers while also providing reliable arithmetic.

Finally, the ethical dimension: as enterprises deploy LLMs in high-stakes domains, who is liable when an error occurs? The developer who wrote the prompt? The company that fine-tuned the model? The cloud provider hosting the inference? Current legal frameworks are ill-equipped to assign responsibility for probabilistic system failures.

AINews Verdict & Predictions

The arithmetic blind spot is not a bug to be fixed but a fundamental property of current LLM architecture. Expect the industry to converge on a three-layer reliability stack by 2026: (1) a base LLM for semantic understanding and natural language generation, (2) a deterministic symbolic engine (calculator, database, or theorem prover) for all numerical and logical operations, and (3) a verification layer that cross-checks outputs against domain-specific rules before delivery.

We predict that within 18 months, no major enterprise AI platform will offer a general-purpose LLM without an integrated tool-calling framework for arithmetic. Companies that fail to implement such safeguards will face significant customer churn in precision-sensitive verticals. The open-source community will lead the way: projects like ToolLLM (github.com/OpenBMB/ToolLLM, 4.5k stars) and the upcoming release of Llama 4 with native tool-use capabilities will set the standard.

Watch for the emergence of "arithmetic benchmarks" as a standard evaluation metric for enterprise LLMs, similar to MMLU for general knowledge. Models that score below 99% on these benchmarks will be deemed unfit for financial, healthcare, and logistics applications. The developer who tested 23 numbers has done the industry a service by exposing a weakness that, if left unaddressed, could have caused far more damage than a few wrong sums.

More from Hacker News

Парадокс песочницы: почему изоляция AI-агентов терпит неудачу и что дальшеThe long-held belief that sandboxing provides a complete security solution for AI agents is crumbling under the weight oКогда ИИ пишет новости: Super PAC OpenAI финансирует полностью автоматизированную пропагандистскую машинуAn investigation has revealed that a political news website, bankrolled by a Super Political Action Committee (Super PACAriprompt превращает ваш телефон в AI-терминал для Mac – Будущее мобильных агентовAirprompt is an open-source project that bridges the gap between mobile convenience and local AI compute power. Instead Open source hub2491 indexed articles from Hacker News

Related topics

AI reliability35 related articles

Archive

April 20262517 published articles

Further Reading

Призрак 200K Токенов: Как Модели ИИ с Длинным Контекстом Не Запоминают ИнструкцииСкрытый недостаток подрывает обещание моделей ИИ с длинным контекстом. Наше расследование показывает, что модели с окнамThe $47K Daylight Saving Time Bug: How AI Agents Fail at Real-World State AwarenessA $47,000 loss caused by a 47-minute timezone confusion exposes a critical blind spot in autonomous AI agents: state awaПамять — новый ров: почему AI-агенты забывают и почему это важноОдержимость AI-индустрии количеством параметров ослепляет её перед более глубоким кризисом: потерей памяти. Без постояннИИ-агенты проваливают тест бизнес-аналитика: почему «чтение людей» остается самой сложной задачейОпытный бизнес-аналитик подверг современных ИИ-агентов строгой полевой проверке. Вердикт: они отлично справляются с извл

常见问题

这次模型发布“Why LLMs Can't Add 23 Numbers: Arithmetic Blind Spots Threaten AI Reliability”的核心内容是什么?

A developer testing a locally run large language model discovered that it produced seven distinct incorrect sums when asked to add 23 simple numbers. This is not an isolated bug bu…

从“local LLM arithmetic errors fix”看,这个模型发布为什么重要?

The root cause of LLM arithmetic failures lies in the transformer's attention mechanism and autoregressive decoding. When a model processes a sequence like "23 + 45 + 67", it does not perform addition. Instead, it comput…

围绕“LLM calculator integration tutorial”,这次模型更新对开发者和企业有什么影响?

开发者通常会重点关注能力提升、API 兼容性、成本变化和新场景机会,企业则会更关心可替代性、接入门槛和商业化落地空间。