<?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: Todd Smith</title>
    <description>The latest articles on DEV Community by Todd Smith (@toddsmith_mali).</description>
    <link>https://dev.to/toddsmith_mali</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%2F4266318%2Fdfd68726-5aff-4c80-b789-10d5d8ebc939.png</url>
      <title>DEV Community: Todd Smith</title>
      <link>https://dev.to/toddsmith_mali</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/toddsmith_mali"/>
    <language>en</language>
    <item>
      <title>If your app uses an LLM for anything numeric, take the math away from it</title>
      <dc:creator>Todd Smith</dc:creator>
      <pubDate>Thu, 26 Nov 2026 08:06:56 +0000</pubDate>
      <link>https://dev.to/toddsmith_mali/if-your-app-uses-an-llm-for-anything-numeric-take-the-math-away-from-it-15pa</link>
      <guid>https://dev.to/toddsmith_mali/if-your-app-uses-an-llm-for-anything-numeric-take-the-math-away-from-it-15pa</guid>
      <description>&lt;p&gt;I run a personal-finance app where people ask an AI about their money. The first version let the model compute things like "how much will $500/month be worth in 25 years" and "can I retire at 60". It was wrong often enough to be dangerous, and it never sounded unsure.&lt;/p&gt;

&lt;p&gt;What fixed it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Every calculation is a plain function with tests.&lt;/strong&gt; Compound growth, retirement Monte Carlo, Social Security claiming, Roth conversion tax, debt payoff. The model doesn't do arithmetic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The model's job is picking the tool and explaining it.&lt;/strong&gt; Tool schemas list required inputs. If the user didn't give one, the model asks instead of guessing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The tool returns its assumptions,&lt;/strong&gt; and the model has to say them out loud ("assuming 6% returns and 3% inflation"). Users trust a stated assumption more than a confident number.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reuse the engine everywhere.&lt;/strong&gt; The same functions back the chat, the voice mode, 30+ free web calculators, and a public MCP server. One test suite covers all four.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refuse advice outside the tools.&lt;/strong&gt; "Should I buy X stock" gets the math and the tradeoffs, not a pick.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The MCP server is public with no auth at &lt;code&gt;https://malimoney.com/v1/mcp&lt;/code&gt; (streamable HTTP; listed in the official MCP Registry as &lt;code&gt;com.malimoney/calculators&lt;/code&gt;). To add it to Claude Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add --transport http malimoney https://malimoney.com/v1/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or list the tools with curl:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -X POST https://malimoney.com/v1/mcp -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; -H &lt;span class="s1"&gt;'Accept: application/json, text/event-stream'&lt;/span&gt; -d &lt;span class="s1"&gt;'{"jsonrpc":"2.0","id":1,"method":"tools/list"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cost is that every new question type needs a new tool, so we ship slower than "just ask the model". For money, I'd make that trade every time. Has anyone found a good way to tell, in production, when a model skipped the tool and did the math itself?&lt;/p&gt;

&lt;p&gt;I'm building MaliMoney, a voice AI you talk to about your bank accounts. You can try it on sample accounts with no signup at &lt;a href="https://malimoney.com/" rel="noopener noreferrer"&gt;https://malimoney.com/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>fintech</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
