Auditing Bank Statement PDFs: A Multi-Tier Parser and Design Choices for the NL-to-SQL Query Layer Above It

Anamul Hoque Emtiaj, Anindya Iqbal


Abstract
Bank statements are the primary evidentiary record in financial auditing, yet they reach auditors as heterogeneous PDFs—some digitally typeset, others scanned—transcribed by hand into spreadsheets and interrogated with brittle macros. We describe a system, built with and deployed for an industry partner, that replaces this workflow with (i) a multi-tier parser—a relational data conversion pipeline that routes digital pages to a deterministic table extractor (PyMuPDF) and scanned pages to an OCR/layout service (LlamaParse), standardizes column headers to a canonical schema, and repairs extraction errors with a balance-equation reconciliation engine; and (ii) a natural-language-to-SQL query layer over the resulting database, whose design choices we evaluate by varying context injection. On 23 real statements (20 banks, 1,672 transactions) the pipeline attains 0.9952 transaction-level accuracy. We compare five context-injection strategies across two model generations on 150 auditing queries with hand-authored gold SQL, scored by execution accuracy. Grounding the model on our parser’s structured context consistently helps, whereas raw-text context can degrade accuracy below the Zero-Context baseline; the benefit of self-correcting scaffolding and retrieval, while real, shrinks as the base model improves, so model choice often dominates agent complexity on simple schemas. We release code, two privacy-preserving sample statements, and a sample query set.
Anthology ID:
2026.finnlp-1.13
Volume:
Proceedings of the 11th Workshop on Financial Technology and Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Jimin Huang, Yongjae Lee, Sophia Ananiadou, Hsin-Hsi Chen, Hiroya Takamura, Chung-Chi Chen
Venues:
FinNLP | WS
SIG:
SIGFinTech
Publisher:
Association for Computational Linguistics
Note:
Pages:
142–152
Language:
URL:
https://aclanthology.org/2026.finnlp-1.13/
DOI:
Bibkey:
Cite (ACL):
Anamul Hoque Emtiaj and Anindya Iqbal. 2026. Auditing Bank Statement PDFs: A Multi-Tier Parser and Design Choices for the NL-to-SQL Query Layer Above It. In Proceedings of the 11th Workshop on Financial Technology and Natural Language Processing, pages 142–152, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Auditing Bank Statement PDFs: A Multi-Tier Parser and Design Choices for the NL-to-SQL Query Layer Above It (Emtiaj & Iqbal, FinNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.finnlp-1.13.pdf