<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: durlabh kumar</title>
    <description>The latest articles on DEV Community by durlabh kumar (@durlabh_kumar_a839a974273).</description>
    <link>https://dev.to/durlabh_kumar_a839a974273</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4083871%2F8e1f8729-a6b2-4df9-adb0-9c1e22ca85cd.png</url>
      <title>DEV Community: durlabh kumar</title>
      <link>https://dev.to/durlabh_kumar_a839a974273</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/durlabh_kumar_a839a974273"/>
    <language>en</language>
    <item>
      <title>An AI gave me a confidently wrong spreadsheet total — so I built one where AI writes code, not guesses, and gets verified.</title>
      <dc:creator>durlabh kumar</dc:creator>
      <pubDate>Tue, 18 Aug 2026 20:50:06 +0000</pubDate>
      <link>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</link>
      <guid>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</guid>
      <description>&lt;h1&gt;
  
  
  How I Stopped an AI From Lying to Me About Spreadsheet Totals
&lt;/h1&gt;

&lt;p&gt;A few months ago I asked an AI tool to total up a sales spreadsheet.&lt;br&gt;
It gave me a clean, confident number.&lt;/p&gt;

&lt;p&gt;It was wrong. Not "rounding error" wrong — it had quietly skipped&lt;br&gt;
rows and produced a total that just &lt;em&gt;looked&lt;/em&gt; plausible. Nothing&lt;br&gt;
flagged it. Nothing hedged. It just said the number, like it was fact.&lt;/p&gt;

&lt;p&gt;That's the actual problem with LLMs on tabular data: &lt;strong&gt;they don't&lt;br&gt;
calculate, they estimate.&lt;/strong&gt; Ask a model to sum a column and, under&lt;br&gt;
the hood, it's doing next-token prediction over a serialized chunk&lt;br&gt;
of your spreadsheet — not arithmetic. Sometimes it's right.&lt;br&gt;
Sometimes it silently isn't. And it never tells you which.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://github.com/Durlabhkumarjha/sheet-analysis-ai" rel="noopener noreferrer"&gt;Sheet Analysis AI&lt;/a&gt;&lt;br&gt;
specifically so it &lt;em&gt;can't&lt;/em&gt; do that. Here's the actual mechanism —&lt;br&gt;
not the marketing version.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 1: the AI is never allowed to do arithmetic
&lt;/h2&gt;

&lt;p&gt;When you ask a question like "which region grew fastest?", the&lt;br&gt;
model doesn't see your data. It sees:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;your column names (&lt;code&gt;region&lt;/code&gt;, &lt;code&gt;revenue&lt;/code&gt;, &lt;code&gt;date&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;their inferred types&lt;/li&gt;
&lt;li&gt;maybe 3-5 sample rows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From that, it writes a small piece of JavaScript — actual code, not&lt;br&gt;
a natural-language answer. That code is then executed &lt;strong&gt;locally, in&lt;br&gt;
your browser&lt;/strong&gt;, against your &lt;em&gt;full&lt;/em&gt; dataset (tested up to 100k rows).&lt;/p&gt;

&lt;p&gt;The model decides the &lt;em&gt;approach&lt;/em&gt; (group by region, sum revenue,&lt;br&gt;
sort descending). Your machine does the &lt;em&gt;calculating&lt;/em&gt;. This alone&lt;br&gt;
kills the "confidently estimated" failure mode, because there's no&lt;br&gt;
estimation step left — it's just code execution.&lt;/p&gt;

&lt;p&gt;The deterministic dashboard (KPIs, Mann-Kendall trend detection,&lt;br&gt;
ANOVA seasonality, Pareto/RFM segmentation, forecasting) doesn't&lt;br&gt;
even involve the AI — it's plain statistical code that runs the&lt;br&gt;
instant you upload a file, no API key required at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 2: nothing gets displayed until it's re-verified
&lt;/h2&gt;

&lt;p&gt;Even code-generated numbers can be wrong — bad logic, an edge case,&lt;br&gt;
a misread column. So before anything renders, a separate&lt;br&gt;
deterministic auditor — no AI involved — re-checks every figure&lt;br&gt;
against the source rows. A concrete example:&lt;/p&gt;

&lt;p&gt;Say your data is:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Region&lt;/th&gt;
&lt;th&gt;Product&lt;/th&gt;
&lt;th&gt;Revenue&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;North&lt;/td&gt;
&lt;td&gt;Phone&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;North&lt;/td&gt;
&lt;td&gt;Laptop&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;South&lt;/td&gt;
&lt;td&gt;Phone&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;South&lt;/td&gt;
&lt;td&gt;Laptop&lt;/td&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Total revenue is $1,000. The auditor checks this a few different ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Traceability&lt;/strong&gt; — does "$1,000" actually equal the sum of real
rows in your file, or did something get invented?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Percent math&lt;/strong&gt; — if a report says "North is 40% of revenue,"
is that literally &lt;code&gt;400 / 1000&lt;/code&gt;, or a plausible-sounding guess?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-foot&lt;/strong&gt; — the same total sliced two different ways must
agree. By region: &lt;code&gt;400 + 600 = 1000&lt;/code&gt;. By product:
&lt;code&gt;300 + 700 = 1000&lt;/code&gt;. If those don't match, something's broken
upstream and the number is blocked, not shown.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claim binding&lt;/strong&gt; — if the summary says "Laptop is the top
product," that claim is checked against the actually-computed
numbers before it's allowed to print.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any single failed check blocks that figure. It doesn't get&lt;br&gt;
downgraded to "approximately" — it just doesn't render.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's deterministic vs. what needs a key
&lt;/h2&gt;

&lt;p&gt;To be upfront about scope:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free, no key, instant:&lt;/strong&gt; dashboard, KPIs, trend stats, forecast,
and a rule-based version of "talk to your data."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Needs your own AI key&lt;/strong&gt; (OpenAI / Gemini / DeepSeek / etc.,
bring-your-own-key): the conversational Q&amp;amp;A gets smarter, and
"Deep Analysis" (full AI report + hidden-pattern detection) becomes
available. Nothing routes through my infrastructure or gets billed
to me — your key talks directly to your provider from your browser.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;p&gt;React 19 + TypeScript + Vite. No backend in this build — parsing,&lt;br&gt;
analysis, and the reconciliation gate all run client-side.&lt;br&gt;
Licensed AGPL-3.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why open source it
&lt;/h2&gt;

&lt;p&gt;I don't think this needs to be a product. I think the &lt;em&gt;pattern&lt;/em&gt; —&lt;br&gt;
AI proposes the method, deterministic code executes it, a separate&lt;br&gt;
auditor verifies it before display — is generally useful for anyone&lt;br&gt;
building "AI + your data" tools, and it's more useful to more people&lt;br&gt;
as a reference than as a SaaS with a handful of users.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/Durlabhkumarjha/sheet-analysis-ai" rel="noopener noreferrer"&gt;https://github.com/Durlabhkumarjha/sheet-analysis-ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Genuinely curious if anyone's solved this "AI + real numbers" trust&lt;br&gt;
problem differently — would love to compare notes in the comments.&lt;/p&gt;

</description>
      <category>saas</category>
      <category>ai</category>
      <category>dataanalytics</category>
      <category>programming</category>
    </item>
    <item>
      <title>I asked an AI to total a spreadsheet. It quietly skipped rows and gave me a confident, wrong number. So I built the opposite: an open-source tool where AI writes code instead of guessing, and a deterministic auditor blocks any number it can't verify.</title>
      <dc:creator>durlabh kumar</dc:creator>
      <pubDate>Tue, 18 Aug 2026 20:31:56 +0000</pubDate>
      <link>https://dev.to/durlabh_kumar_a839a974273/i-asked-an-ai-to-total-a-spreadsheet-it-quietly-skipped-rows-and-gave-me-a-confident-wrong-42fg</link>
      <guid>https://dev.to/durlabh_kumar_a839a974273/i-asked-an-ai-to-total-a-spreadsheet-it-quietly-skipped-rows-and-gave-me-a-confident-wrong-42fg</guid>
      <description></description>
    </item>
  </channel>
</rss>
