Skip to content
LedgerDock

Blog · How it is built

How can you trust numbers pulled from a bank statement PDF?

Use a footing check. A bank statement prints its own balances and totals, so rows pulled from it are trusted only when they add up to those printed numbers, to the cent. If they do not, the statement is marked unverified and waits for a person: it reaches the books only when it ties, or when someone records the difference with a written reason. The proof is arithmetic, not a confidence score.

What is the problem?

Reading a bank statement PDF with a language model is easy to demonstrate and hard to trust. The model returns rows. Most of them are right. In accounting, “most” is a failed job: one wrong amount means the books do not tie, and somebody spends an evening finding it.

What is the rule?

A bank statement prints its own numbers: the opening balance, the closing balance, and usually total deposits and total withdrawals. Those numbers are on the document. They are not our numbers.

So the rows pulled from a statement are trusted only when they agree with the numbers printed on that same document, to the cent:

  • The gate is the balance. Opening balance plus deposits minus withdrawals must equal the printed closing balance, exactly.
  • The printed totals are a second check. The deposit rows should add up to the printed total of deposits, and the withdrawal rows to the printed total of withdrawals. If they disagree, a person looks.

Off by one cent, and the statement is not verified. There is no “close enough”, and there is no confidence score. A confidence score is the model grading itself.

Where is the model, and where is it not?

For most statements the model has a small job. The first time a statement layout is seen, it works out how to read it: which column is the date, where the amount sits, how the sections are split. That reader is saved.

Next month the same statement’s rows are read by plain code replaying the saved reader. When a bank changes its layout and the footing check fails, the model is asked to repair the reader, and the repaired reader has to pass the same check. On this path the row amounts are not taken from a model’s answer. They are pulled from the document by plain code.

There is one exception, and it is better said plainly. For a bank whose layout no reader can be built for, the model reads the rows itself. The same check then runs on what it read. If the rows tie to the document, they are verified. If they do not, they are marked unverified and wait for a person.

Why not ask the model to be careful?

Because you cannot audit care. You can audit arithmetic. When the rows foot to the document’s own numbers, you have a proof that does not depend on which model was used. When they do not foot, you know before the number is in a ledger, which is the only cheap moment to know.

What does it cost?

Statements that print no totals are harder, and some scanned statements never foot. Those are marked unverified, and a person sees why. That makes a worse demonstration and a better month-end.

Where does this run?

This check is part of LedgerDock’s statement import. Reading a statement never posts anything by itself: the lines go to review, and a commit cannot be finalized into the books until its total ties to the statement. The one way past that is a person recording the difference with a written reason, which is sealed with the commit. You can watch it in the Import a statement tutorial, and read what happens next in how a close works.

Questions people also ask

What does footing mean in accounting?

To foot a column is to add it up and compare the total with the total already stated. A footing check on a bank statement adds the extracted transactions and compares them with the balances and totals printed on that statement.

Can an AI model read a bank statement accurately?

A model reads most rows correctly, and in accounting most is not enough. The safer design is to let the model work out how a statement is laid out, pull the amounts with plain code, and trust the result only when it foots to the document. Where a model has to read the rows itself, the same check decides whether its reading is trusted.

What happens when a statement does not foot?

The rows are kept but marked unverified, and a person sees the difference. They cannot be finalized into the books until the total ties to the statement, or a person records the difference with a written reason that is sealed with the entry. Some scanned statements, and statements that print no totals, cannot be proven this way and need a person to review them.

All articles

An accountant's close tool. Month-end, year-end, closed right.