🧮 Machines That Talk · Day 18

Why Bots Are Bad at Math

A chatbot doesn't calculate — it predicts likely text. So when you ask it big arithmetic, it often blurts out a number that looks right but is wrong. The fix is wild: let it call a real calculator and read back the exact answer. Let's watch both brains go head-to-head.

↓ pick two numbers
🧮 Lab · Guess vs Tool

Same math. Two very different brains.

Type two numbers (try 3–4 digits each). The 🧠 left brain just guesses like a chatbot doing mental math. The 🛠️ right brain notices it's math and calls a calculator tool. Hit Run and compare!

×

Change the numbers and run again — try many! Big numbers make the guesser fail hardest.

🧠 LLM guess (no tool)

"I'll just predict the answer…"

🛠️ With calculator tool

Watch for it: the guessing brain often gets the right number of digits and even the last digit right — so it looks correct at a glance. But the middle is made up. That's the trap.
🐞 Break-It Challenge

Make the guess wildly wrong

Tap a monster problem. It loads into the two brains above and runs. Watch how far off the guessing brain is — the bigger the math, the bigger the miss.

The lesson: never trust a chatbot's mental math. On huge multiplication its guess can be off by thousands or millions — while looking totally confident. Always make it use a tool (a calculator or code) or check the answer yourself.
🏷️ The pro wordLetting a model run outside code — like our calculator — is called tool use or function calling. The model doesn't do the math; it decides to call a tool, the tool returns an exact answer, and the model reports it. A model that decides when to call tools and keeps going in a loop until the job's done is an agent.
🎯 Boss Build · Tool or No Tool?

Be the model's brain

For each job, decide: can the LLM just do it alone, or does it need a tool? Language and creativity = alone. Exact math = tool. Get 3 of 4 right to earn the final badge!

Correct: 0 / 4
🚀 Beyond the Basics

How the pros really do it

Our two-brain toy is the tiny version. Here's how "let the model use tools" grew from a hack into whole agent systems:

🤞

Just hope it memorized (what you'd try first)

Ask and pray the answer was in its training. ✅ Fast, no setup. ⚠️ Big or fresh math is guessed — confidently wrong, no way to check.

🛠️

Give it one tool (what you built)

The model calls a calculator and reads back the exact result. ✅ Perfect math. ✅ You can see the call. ⚠️ Someone has to wire up each tool.

🕸️

A whole tool ecosystem (the real deal)

Calculator, code runner, web search, databases — an agent chains many tools in a loop to finish a job. ✅ Super capable. ⚠️ More tools = more ways to go wrong.

🏷️ Pro names to look upThe idea is function calling / tool use. Running code to compute is a code interpreter. The "think → act → observe → repeat" loop is called ReAct, and a model that runs that loop with many tools is an agent.

🎉 Day 18 Complete!

You learned the big secret: a chatbot predicts text, it doesn't calculate — so big math fools it. The fix is tool use: let the model call a real calculator (or code, or search) and read back the exact answer. That's the leap from "chatbot" to agent.

Day 19: The Privacy Shredder →
Tomorrow: tools are powerful — but what happens to the secrets you type in? We meet the Privacy Shredder. 🛡️
AI Adventure · Machines That Talk · Day 18 — made for young inventors 🚀