Applied AI

Don’t entrust a calculation to a language model: the model reads, the formula calculates, a person validates

A language model can draft a management commentary in seconds, but it does not calculate the way a formula does: it predicts a plausible answer, and a plausible total is not an exact one. Here is why, what tax, pharmaceutical and banking rules expect, and how to divide the work between the model, the formula and the person.

By Kantara Fofana

Published 11 min read

In short

  • A language model does not execute the calculation: it predicts the most likely sequence of words. A total can therefore be plausible without being exact, and change from one run to the next.
  • The rules require figures that can be established and redone, in tax as in clinical trials and financial institutions.
  • For a calculation that comes back every month, re-checking a plausible result on every run costs more than a formula tested once, which gives the same result every time.
  • The right division of labour: the model reads and drafts, the formula or code calculates, a person validates the exceptions, and everything is recorded.

A total that looks right

Monday, 4 p.m. An accounting technician is reconciling a client’s bank statement, 412 lines long. She pastes it into an AI assistant and asks for the total of the deposits missing from the general ledger. The answer comes back at once, neatly presented, to the cent. It looks right. To know whether it is, she has to redo the calculation: the very work she wanted to save.

A language model does not execute the addition: it produces the most plausible answer. Often, that answer is right. Sometimes it is not, and nothing in its form gives that away. This is not a flaw in one product; it is how these models work. Hence a simple rule, which gets the best out of AI instead of distrusting it: the model reads, the formula calculates, a person validates.

What a language model does when you ask it to calculate

A large language model is a program trained on vast amounts of text to predict the next token, meaning the next fragment of a word. It builds its answer token by token, producing what the Treasury Board of Canada Secretariat’s guide on generative AI calls content that is “statistically likely.” Three consequences follow for anyone who works with figures:

  • It does not perform the operation. Faced with an addition, it produces the digits most likely to follow the question. Microsoft lists precise calculations among the limitations of language models.
  • Two runs can differ. The same request can produce two different answers. Even at the most stable setting, small variations can remain; Microsoft advises against designing systems that depend on identical output for identical input.
  • It can be wrong with confidence. NIST, the U.S. government’s standards institute, uses the term confabulation for erroneous or false content stated with confidence, commonly called “hallucination.”

For NIST, this is a natural result of how generative models are designed: statistical prediction can produce an accurate result, or an inaccurate or inconsistent one. The Treasury Board Secretariat also gives this advice to users in federal institutions: don’t use generative AI “when factual accuracy or data integrity is needed.”

Note

Models are improving; the rule still holds

According to Microsoft, so-called reasoning models are significantly better at calculation and logic, but they use more tokens and respond more slowly. A result that is better on average still has to be checked: the question is not whether the model is often right, but when it is wrong.

Where the rules require a figure you can redo

Tax and accounting: books that allow the tax to be determined

The Income Tax Act requires every person carrying on business to keep records and books of account that will enable the taxes payable to be determined (s. 230(1)). They are generally kept for six years from the end of the last taxation year to which they relate (s. 230(4)) and, if kept electronically, in an electronically readable format (s. 230(4.1)). In Quebec, the Tax Administration Act requires registers and supporting documents containing the information needed to establish any amount to be deducted, withheld, collected or paid (s. 34), kept for six years (s. 35.1).

An amount produced by a model, which nobody can reproduce exactly, is hard to justify to an auditor. For what AI changes in a firm, see our article on AI in accounting firms.

Clinical trials: reliable software and validated calculations

ICH, the International Council for Harmonisation of Technical Requirements for Pharmaceuticals for Human Use, is explicit in its E9 guideline on statistical principles for clinical trials, which Health Canada implemented in 2003: the credibility of the numerical results of an analysis depends on the quality and validity of the methods and software used; the guideline calls for reliable software and documented testing procedures (section 5.8).

The ICH E6(R3) guideline on good clinical practice, which ICH adopted on January 6, 2025 and Health Canada implemented on April 1, 2026, asks that calculations in a computerized system be validated (section 4.3.4), and that every statistical output be traceable to the program that produced it, dated and protected against changes (section 3.16.2). A language model’s answer is traceable to no program anyone can read and rerun; we come back to this in our article on AI in clinical trials.

Financial institutions: a model that is inventoried, reviewed and monitored

The Office of the Superintendent of Financial Institutions (OSFI) published Guideline E-23 on model risk management on September 11, 2025; it takes effect on May 1, 2027 for all federally regulated financial institutions. Its definition of a model expressly includes artificial intelligence and machine learning methods. It expects an inventory of models, including third-party ones, a model review independent from development, and monitoring with defined thresholds. A language model that calculates interest or a provision most likely falls within that definition: OSFI says it deliberately kept the definition broad, and its principles do not vary with the modelling approach. Because the guideline applies in proportion to risk, such a model would be identified, then inventoried and reviewed if its risk is non-negligible; a documented, tested formula, by contrast, is simple to check.

“Plausible” is not “exact”: an illustration

The example below is an illustration built for this article, not a measurement. The calculation: interest for a 31-day month on a balance of 1,284,592.37 dollars, at an annual rate of 5.25%, on a 365-day basis. The exact result is 5,727.87 dollars.

Illustration · same calculation, three runs, two tools (model answers fictitious)
RunFormulaLanguage model alone
Monday5,727.875,727.87
Tuesday5,727.87≈ 5,728
Wednesday5,727.875,772.87
What you know without recalculatingThat the result is right, if the formula has been testedNothing: you have to redo the calculation

All three of the model’s answers are plausible: the right order of magnitude, a tidy presentation. The first is right, the second rounded; the third swaps two digits and is off by 45 dollars, with nothing to flag it. A formula can be wrong too (the wrong cell, the wrong rate), but always in the same way: a test catches it once, and the fix holds for every run that follows.

The cost of a result you have to check again

A language model is generally billed per token, for input and output alike: every run has a cost, and a longer request costs more. A formula, once written and tested, costs next to nothing to run again. But the real cost lies elsewhere. A plausible result has to be checked again on every run, since nothing shows which run is wrong. If checking means redoing the calculation, you have paid for the model, then for the calculation, then for the time of the person comparing the two. And that happens every month, while a formula is tested once, then again at each change.

Key point

The right test

Comparing the cost of a model call with that of a formula is not enough. The useful test is the lowest total cost for compliant work, at the expected quality: running, checking, correcting errors and justifying the result to an auditor included.

The model reads, the formula calculates, a person validates

The rule is not to do without AI, but to give each tool the work it does best, in four steps.

  1. The model reads

    A document-reading model or a language model extracts the values from a document. In Microsoft’s document-reading service, a value read carries a confidence score: 0.95 means it is likely correct 19 times out of 20; depending on the threshold you choose, it is accepted or sent to a person.

  2. The formula calculates

    Same inputs, same result: the calculation runs in a formula or in code, tested against a set of test cases, and every version is kept.

  3. A person validates the exceptions

    Low confidence, a gap beyond tolerance, a case the rule does not foresee: a person decides. They only re-check what the process flags.

  4. Everything is recorded

    The source of each value, the version of the formula, the result, the author of every correction and every approval: enough to redo the calculation for an auditor, an inspector or a client.

Four calculations, one division of labour
TaskThe model readsThe formula or code calculatesA person validates
Bank reconciliationThe lines of a statement received as a PDFThe matching with the general ledger, and the gapsThe gaps the rule does not explain
Tax calculationThe amounts on slips and supporting documentsThe tax, under the year’s rules, in the firm’s tax softwareUncertain amounts, then the file
Trial statisticFree-text comments, to suggest a classificationThe analysis, by a validated statistical program, following the analysis planThe suggested classifications and departures from the plan
Interest calculationThe rate, basis and dates of a loan agreementThe interest, day by day, under the agreement’s conventionAgreements whose reading is uncertain

And when an AI assistant gets a calculation right? Often, it has written and run a small program. Microsoft, for example, describes a tool that lets an agent write and run code, in an isolated environment, for calculation and data-analysis tasks: the model writes the code and the isolated environment runs it (a language model, Microsoft notes elsewhere, never executes anything itself). In that case, the code is doing the calculating, which confirms the rule. You still need to keep that code, its inputs and its result, or the calculation cannot be redone.

What language models do very well in finance

Language models keep a large role. They excel at work that requires understanding or producing language: Microsoft cites summarization, translation, text classification and extracting data from free text. In finance, that means:

  • Explaining a variance in words: from the calculated figures, writing up why the margin fell this quarter.
  • Drafting commentary: the monthly management note, the letter that accompanies financial statements, the summary for a committee.
  • Classifying free text: the nature of an expense described in words, the reason for a request, the subject of a complaint.
  • Extracting fields: the amounts, dates and parties of a contract or an invoice, cross-checked by a calculation or reviewed by a person before use.

One rule keeps these uses sound: the figures in a text drafted by a model come from the calculation, and code compares each figure in the text with its source before a person approves it. To choose the right technique for the problem, see our article on AI beyond large language models.

Checking a calculation, whatever the tool

Formula, code or a model on trial: a calculation is checked the same way. NIST suggests comparing generative AI outputs with a set of known ground-truth data, and setting minimum performance thresholds before deciding on deployment. Four controls, in this order:

  • Reproducibility: the same input, run several times, should give the same result. A formula passes this test by design; a language model does not necessarily.
  • A reference dataset: files whose correct result is known and verified, against which the calculation is rerun at every change.
  • Tolerance: the accepted gap, decided in advance and written down. None for a general ledger, one cent for a documented rounding, a range for an estimate; beyond it, a person decides.
  • Sampling: a person regularly reviews a random sample of the results accepted automatically, to check that the thresholds hold.
Watch out

The self-check trap

Asking the model to check its own calculation does not replace a control: its check is produced the same way as its answer. NIST makes the point: a model can lay out the steps of its reasoning even when its answer is wrong.

Where to start on Monday morning

  • List the calculations that matter (taxes, reconciliations, interest, provisions, statistics) and the tool used for each.
  • Ask your teams which ones already go through an AI assistant, without looking for someone to blame.
  • For each one, move the calculation into a formula or code, and leave the reading or drafting to the model.
  • Build a reference set: a few dozen files whose correct result is known.
  • Write down the tolerance for each calculation, and the confidence threshold below which a value read goes to a person.
  • Check that every result keeps its trail: the source, the version of the formula, who validated it.
  • Federally regulated financial institution: identify your uses of AI, calculations included, ahead of May 1, 2027; those whose risk is non-negligible belong in your model inventory.

Frequently asked questions

Can an AI assistant do exact calculations?
It can give a correct result, especially if it writes and runs code to produce it. On its own, a language model predicts a plausible answer, which can vary from one run to the next and be wrong without any warning.
Does setting the temperature to zero make the answers identical?
Not quite. Temperature is the setting that controls how much chance goes into choosing each token. Set low, it makes answers more stable, but Microsoft notes that small variations can remain, and advises against any system that depends on identical output for identical input.
Can I use AI to read the amounts on an invoice?
Yes, provided you handle the confidence score: fields read below the threshold you choose go to a person. The total is then recalculated from the lines read; a gap with the printed total flags a reading to review.
What does OSFI expect when a financial institution uses AI in its models?
Guideline E-23, which takes effect on May 1, 2027, treats artificial intelligence and machine learning methods as models: identification and a risk rating, then, for those whose risk is non-negligible, inventory, review independent from development and monitoring with thresholds, including for third-party models.
Can a language model produce the statistical results of a clinical trial?
Not the results themselves: ICH calls for reliable software, validated calculations and outputs traceable to the program that produced them. A model can help draft or review the report, as long as every figure comes from the validated program.

Sources

Every fact in this article links to its official source, consulted on October 29, 2026.

  1. National Institute of Standards and Technology (NIST)Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile (NIST AI 600-1), July 2024 (opens in a new tab)
  2. Treasury Board of Canada SecretariatGuide on the use of generative artificial intelligence (opens in a new tab)
  3. Microsoft LearnLLM Fundamentals (opens in a new tab)
  4. Microsoft LearnInterpret and improve model accuracy and confidence scores (opens in a new tab)
  5. Microsoft LearnUse Code Interpreter with Microsoft Foundry agents (opens in a new tab)
  6. Department of Justice Canada (Justice Laws Website)Income Tax Act (R.S.C. 1985, c. 1 (5th Supp.)), section 230 (opens in a new tab)
  7. LégisQuébecTax Administration Act (CQLR, c. A-6.002) (opens in a new tab)
  8. International Council for Harmonisation (ICH)Statistical Principles for Clinical Trials (E9), February 5, 1998 (opens in a new tab)
  9. International Council for Harmonisation (ICH)Guideline for Good Clinical Practice (E6(R3)), January 6, 2025 (opens in a new tab)
  10. Health CanadaInternational Council for Harmonisation (ICH) - Guidelines (opens in a new tab)
  11. Office of the Superintendent of Financial Institutions (OSFI)Guideline E-23 – Model Risk Management (2027) (opens in a new tab)
  12. Office of the Superintendent of Financial Institutions (OSFI)Guideline E-23 – Model Risk Management (2027) - Letter, September 11, 2025 (opens in a new tab)

This article provides general information. It is not legal, tax or accounting advice for your situation.

All articles

Keep reading

Your case deserves thirty minutes.

A free consultation to understand your context and tell you, frankly, whether we are the right choice, and where to start.

Book a call