Most teams building PDF-to-CSV bank statement converters throw the raw PDF into a frontier LLM and ask for JSON. It looks great in a 30-second demo—until an accountant runs a real monthly reconciliation and finds a $0.01–$0.03 rounding drift across 400 rows.
In real bookkeeping, "99.8% accurate" is 100% unusable. If Opening Balance + Credits - Debits != Closing Balance, the entire batch fails audit.
The Architecture Fix in statementflow-ai
Instead of letting an LLM touch arithmetic, statementflow-ai splits parsing into two strict boundaries:
- Zero-Key Heuristic + Semantic Extraction: Normalize multi-line wrapped merchant descriptions, merged PDF table cells, and multi-currency symbols without forcing paid API keys on basic layouts.
-
Deterministic Integer-Cents Ledger: Every amount is converted to integer cents (
int) at the parser boundary—neverfloat. - Double-Entry Reconciliation Gate: Every extracted statement must pass the exact invariant:
opening_balance_cents + sum(credits_cents) - sum(debits_cents) == closing_balance_cents
If a single penny is off due to an OCR misread (8 vs 3), the engine flags the exact offending row rather than silently exporting corrupt CSV/QuickBooks data.
- Live App: https://statementflow.win
- Open-Source Repo (MIT): https://github.com/wangguode/statementflow-ai
- Related Deep Dive: Why Production Coding Agents Die on 60s Gateway Timeouts


Top comments (0)