{
  "id": 1803459,
  "title": "An AI gave me a confidently wrong spreadsheet total — so I built one where AI writes code, not guesses, and gets verified.",
  "url": "https://urgent.news/2026/08/18/an-ai-gave-me-a-confidently-wrong-spreadsheet-total-so-i-built-one",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-18T20:50:06.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/durlabh_kumar_a839a974273/an-ai-gave-me-a-confidently-wrong-spreadsheet-total-so-i-built-one-where-ai-writes-code-not-1nf3"
  },
  "original_language": "en",
  "account": "In a recent incident, I asked an AI tool to calculate the total of a sales spreadsheet. Surprisingly, the AI confidently provided a number, but it was incorrect. The AI had failed to account for missing rows, resulting in a misleading total. This highlighted a fundamental issue with large language models (LLMs) when dealing with tabular data: they don't perform calculations, but rather make educated guesses based on the information provided. When asked to sum a column, the model essentially engages in next-token prediction over a chunk of the spreadsheet, rather than executing actual arithmetic. Unfortunately, the AI doesn't communicate whether its answer is accurate or not. To address this problem, I developed Sheet Analysis AI. The primary rule of this tool is that the AI is strictly prohibited from performing any arithmetic operations. When a question is posed, such as identifying which region experienced the fastest growth, the model doesn't directly interact with the data. Instead, it receives the column names (region, revenue, date) and their inferred data types, along with a few sample rows. Based on this information, the AI generates a small piece of JavaScript code, which is then executed locally in the user's browser against the complete dataset. This ensures that all calculations are performed directly by the user's machine, eliminating any estimation errors. Additionally, Sheet Analysis AI incorporates a verification process for all displayed figures. Before any data is rendered, a separate deterministic auditor, free of AI involvement, meticulously re-checks each number against the original source data. Various verification methods are employed, including traceability, percentage math, cross-footing, and claim binding. If any discrepancy is detected during this verification process, the specific figure will not be displayed. The tool supports both free and advanced versions. The free version, which requires no API key and operates instantly, includes features such as dashboards, KPIs, trend analysis, forecasting, and a rule-based approach to interact with the data. Advanced functionalities, such as conversational Q&A and deep analysis, require the user to provide their own AI key (e.g., OpenAI, Gemini, DeepSeek). This key is used directly in the user's browser to access the more sophisticated features, with no additional costs incurred. The software is built using React 19, TypeScript, and Vite, and it operates entirely client-side, with no backend required. The code is released under the AGPL-3.0 license, making it open-source and accessible to the wider community.",
  "summary": "How I Stopped an AI From Lying to Me About Spreadsheet Totals A few months ago I asked an AI tool to total up a sales spreadsheet. It gave me a clean, confident number. It was wrong. Not \"rounding error\" wrong — it had quietly skipped rows and produced a total that just looked plausible. Nothing flagged it. Nothing hedged. It just said the number, like it was fact. That's the actual problem with…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}