AIFinanceReconciliationControls

Don't Ask the Language Model to Do the Math

Dejan Simic

5 min read
Model interpretation, deterministic calculation, and human sign-off in a financial reconciliation workflow

Imagine trying to automate a reconciliation workflow with AI. You give a model a data spreadsheet and a management PowerPoint deck. You ask ChatGPT or Copilot to find any discrepancies between the two files. A few moments later, it returns a neat summary of matches and exceptions.

For a quick demo this looks complete. Problems emerge when you try to use it as a production workflow. The AI model needs to read the documents, interpret the data, perform the calculation and explain the result. Each subtask has a different failure mode (e.g., extract the wrong KPI, compare figures from different periods, ...), so combining them in one prompt makes it much harder to trace errors.

A better division of work might look like this:

  • Let models handle work that requires flexibility and interpretation
  • Let code perform deterministic calculations and enforce rules
  • Keep judgment and sign-off with the finance professionals who are accountable for the figures

Deterministic calculations belong in code

Consider a simplified reconciliation:

  • Source-of-truth income statement records Profit Before Tax of USD 107.9 million
  • A management report shows USD 111.9 million
  • Materiality threshold is USD 0.1 million
  • Since the difference is USD 4.0 million, the recon should raise an exception

Given the same inputs, a language model may produce the right answer. But its answers are not guaranteed to be consistent or correct. Code written in Python or TypeScript applies a calculation the same way on every run. So letting an AI model do the math is questionable.

Here "math" describes any deterministic calculation and in finance & accounting there are plenty of those. You can certainly use AI to help write the code. But there are other use cases for AI within workflows as well.

Use AI models where interpretation is required

The reality of financial datasets is that they are rarely as consistent as they should be. For instance, a metric may appear as "Profit Before Tax" in the source system, "PBT" in a slide headline and "Result before tax" in a PDF table. Expenses may be negative in the pivot table and positive in a presentation.

Extracting data from messy documents is where language models can be very useful. Models like ChatGPT or Claude are quite good at turning documents into structured records. Traditional code works well when documents follow a fixed structure. Even then it takes time to write the code and it would often break when documents change.

Find the best tool for the job

So instead of just dumping the entire task into an AI model, we need to separate document interpretation from rule enforcement:

Workflow illustration

Let's get back to the Profit Before Tax example:

  1. Documents: A model extracts USD 111.9 million from page 2 of the board report. It proposes that "PBT" maps to the KPI ID for Profit Before Tax
  2. Structured data: Code retrieves USD 107.9 million from the database or csv
  3. Comparison: Code calculates the USD 4.0 million difference and assigns the status exception because the difference exceeds USD 0.1 million
  4. Summary: Given the calculated result, the model can draft a report

This separation makes failures easier to diagnose because you can trace every step. For instance, if the wrong number was selected, inspect the extraction and its evidence.

In a single-prompt workflow it's much harder to identify the cause beyond "The model got it wrong". That does not tell the team what to fix or how to prevent the error next quarter. At worst, the trust in models is completely gone and you are back to doing everything manually!

Once differences are calculated by code, the model becomes useful again. Given the structured result plus a template it can draft a short explanation and suggest a next action. For example, it might propose checking whether the board report contains a stale draft value or whether somebody selected the wrong reporting period.

Keep human sign-off, remove repeat work

In all this, the model is only making suggestions and Finance still has to confirm the final reconciliation. Keeping a qualified reviewer in the workflow does not mean accepting the old manual process though.

In a traditional reconciliation, a reviewer needs to repeat majority of the work. On the other hand, An AI-assisted workflow can assemble the parts before the review starts. The reviewer receives all inputs and intermediate steps. The task then changes from rebuilding the reconciliation to challenging a drafted result. That is a meaningful reduction in work, even if it does not completely eliminate human review entirely.

Manual recalculation vs reviewing AI-assistent workflow

Divide and conquer

The principle of breaking down monolithic prompts into smaller steps applies to many workflows. Take a finance task and label each step:

  1. Interpretation: Where are the inputs unstructured? Which steps are difficult to express in code?
  2. Rule enforcement: Which steps should produce a consistent, testable result?
  3. Accountability: Where must a person own the decision?

This makes it much easier to build safe automations. And in some cases you might realize that AI is not even needed.