Tool Use Motivation: Why LLMs Need External Tools for Accuracy › Worked Example: The Compound Interest Problem
Language AI HandbookAll chapters Tool Use Motivation: Why LLMs Need External Tools for Accuracy › Worked Example: The Compound Interest ProblemOne section · Sections in this chapter6 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
We examine a concrete scenario that illustrates why tool use is necessary for accuracy and currency. Consider the query:
"If I invest $5,000 in an account with 4.5% annual interest compounded monthly, how much will I have after 3 years and 7 months? Additionally, compare this to the current inflation rate to determine if I'm gaining real purchasing power."
This query combines computational precision requirements with temporal constraints, which makes it impossible for a standalone LLM to answer accurately. The arithmetic requires exact floating-point computation across 43 compounding periods, and the inflation comparison requires current economic data that may have changed materially since the model's training cutoff.
Without Tool Use
An LLM without tool access must rely solely on its parametric knowledge of the compound interest formula, which computes the future value of an investment with periodic compounding:
where:
- : the future value of the investment (the accumulated amount after time )
- : the principal amount (the initial investment)
- : the annual interest rate (in decimal form)
- : the number of compounding periods per year
- : the time the money is invested for, in years
The formula works by dividing the annual rate by the number of periods to get the periodic interest rate. The term is the growth factor for a single period. Raising this to the power compounds this growth across all periods, and multiplying by the principal scales this to the initial investment amount.
For this specific calculation:
- (principal)
- (annual rate)
- (monthly compounding)
- (3 years and 7 months)
The model must compute:
Computing through token prediction is error-prone because it requires precise exponentiation. The model might estimate this as approximately , yielding $5,885 or it might make arithmetic errors in the exponent or multiplication, perhaps calculating $5,892 or $5,879 due to approximation errors in neural computation. None of these results are completely unreasonable, which makes it hard for you to know whether to trust the answer without running your own calculation.
For the inflation comparison, the model faces the temporal constraint directly. Without access to current economic data, it can only give historical averages based on its training data: "Inflation has recently been around 3-4%," which may be outdated by months or years and prevents a specific, actionable comparison to current economic conditions.

With Tool Use
A tool-augmented system handles this differently, delegating precision and currency to specialized tools. The interaction proceeds in well-defined steps.
First, the model generates a call to a calculator or Python interpreter with the exact formula. The code is unambiguous and deterministic:
P = 5000
r = 0.045
n = 12
t = 3 + 7 / 12
A = P * (1 + r / n) ** (n * t)Second, the system executes this code and returns the precise value: $5,885.28, calculated with full floating-point precision rather than neural approximation. There is no variance, no bias, no rounding error introduced by the model's generation process.
Third, the model calls an economic data API for the current inflation rate, receiving a structured response such as: {"inflation_rate_annual": 0.032, "as_of": "2024-03-01", "source": "CPI"}.
Fourth, the model uses the calculator again to determine the real return:
The final answer gives exact figures and current context: "After 3 years and 7 months, you will have exactly $5,885.28. With current inflation at 3.2%, your real annual return is approximately 1.5%, meaning you are gaining purchasing power, though modestly."
This is categorically more useful than what the model could give without tools. The answer is exact where exactness matters, current where currency matters, and specific where specificity lets decision-making. The model has not become smarter by having access to tools. It has become more reliable by delegating the parts of the problem where neural computation is weak to systems that are strong at those parts.