name: pdf-to-spreadsheet-review description: Use when an AI agent must convert bank statements, scanned PDFs, OCR-heavy financial documents, or mixed PDF exports into clean spreadsheet outputs with normalized transactions, metadata, and review flags.
PDF To Spreadsheet Review
Goal
Convert heterogeneous financial PDFs into a spreadsheet that can be audited by a human. Prefer correctness and traceability over aggressive automation.
Inputs
- PDF files: digital, scanned, or mixed OCR quality
- optional account metadata supplied by the user
- optional expected date range or opening and closing balances
Workflow
- Inspect the PDF before extraction.
- Confirm page count, scan quality, table layout, and language.
- If visual layout matters, render sample pages before trusting extracted text.
- Extract text and tables with structured tools where possible.
- Prefer PDF table parsers for digital PDFs.
- Use OCR only when embedded text is missing or clearly corrupted.
- Normalize transactions.
- Keep dates, descriptions, debit, credit, amount, currency, balance, and source page.
- Preserve original text in a raw column when the parser made a judgment call.
- Reconcile.
- Check opening balance, closing balance, transaction count, and total movements.
- Add review flags instead of silently fixing ambiguous rows.
- Export.
- Produce one workbook with normalized transactions, summary metadata, and review notes.
Review Flags
Flag rows when:
- a date is inferred from surrounding rows
- debit and credit columns are ambiguous
- OCR confidence is low
- the running balance does not match parsed movements
- a row may be a continuation line rather than a transaction
Output Contract
The spreadsheet must include:
transactionssheetsummarysheetreview_flagssheet- source filename and source page for every parsed transaction
Validation
Before delivery:
- compare transaction totals against statement totals
- spot-check the first and last transaction on every page
- verify that review flags explain uncertainty clearly
- never claim a perfect parse when OCR or layout is ambiguous