AutoRecon Agentic™ — Financial Reconciliation & Audit
Autonomous financial reconciliation engine with agentic dispute generation, fuzzy invoice matching & conversational copilot
Slide the classification cut-off threshold to evaluate precision vs recall trade-offs and net ROI.
Empirical benchmark comparing INT8 Post-Training Quantized ONNX against vanilla TorchScript C++ tracing.
01 // SYSTEM OVERVIEW
AutoRecon Agentic™ is an autonomous financial reconciliation, invoice discrepancy resolution, and conversational audit copilot. Built with Python 3.11, Streamlit, and Pydantic v2, it bridges bank settlement statements with vendor accounts payable ledgers, performs deterministic and fuzzy token-sort matching, and generates ready-to-send dispute letters while offering an interactive English query copilot.
02 // THE PROBLEM & ENGINEERING SIGNIFICANCE
Accounting and finance teams spend tens of hours every week manually cross-referencing thousands of vendor invoice numbers, dates, and amounts against messy bank statement lines.
Typographical discrepancies, missing reference codes, and billing overcharges slip through manual audits, leading to vendor overpayments and delayed month-end closes.
- •Extracting structured transaction tables from varied layout PDF invoices and multi-tab Excel files.
- •Matching line items when vendor names or invoice numbers contain typographical errors, acronyms, or alternate formatting.
- •Drafting professional, legally defensible discrepancy dispute notices without requiring manual paralegal review.
03 // DATA PIPELINE & PREPROCESSING
- PyPDF text extraction and table boundary segmentation
- Synonym column alias mapping (e.g. 'Inv_No', 'Bill #', 'Reference' -> standard 'invoice_id')
- Pydantic v2 type coercion and ISO date standardization
04 // SYSTEM ARCHITECTURE & DATA FLOW
Document Upload -> Ingestion & Synonym Normalizer -> Deterministic + Fuzzy Matcher -> Discrepancy Classifier -> Agentic Dispute Generator -> Audit Copilot UI.
Parses PDF, Excel, and CSV inputs with automated schema synonym alignment.
Executes exact reference matching followed by Levenshtein token-sort ratio comparison.
Categorizes reconciliation states: Perfect Match, Amount Mismatch, Date Discrepancy, Orphan Invoice.
Autonomously drafts structured dispute letters with formal legal references across 3 selectable tones.
Monolithic CLI Python script with static exact string matching; failed on transposed vendor names or slight invoice number padding.
Refactored into modular Pydantic v2 data models with Levenshtein token-sort fuzzy logic and automated discrepancy categorization.
Production Streamlit web platform with automated dispute letter generation across 3 tones, interactive conversational copilot, and multi-format parser pipelines.
05 // MODEL ENGINEERING & HYPERPARAMETERS
Benchmarked against historical accounts payable reconciliation logs with intentional typos.
- • Fuzzy Threshold: 85%
- • Token Ratio Mode: Token_Sort
- • Amount Tolerance: $0.05
- • Date Window: +/- 5 Days
06 // FAILURE ANALYSIS & ZERO-TRUST SAFEGUARDS
- • Scanned image-only PDFs without embedded text layers.
- • Split payments where a single invoice is paid across multiple bank statement entries.
Parsing corrupted bank PDF statements without OCR latency breaking the interactive UI.
Pure OCR pipelines took 8+ seconds per page and failed on table column boundaries.
Implemented a hybrid text-layer extraction fallback with PyPDF + bounding coordinate table heuristic prior to OCR.
Parsing speed increased by 5.3x with 0% data drop on digital PDFs and clean error quarantine for scanned sheets.
07 // PRODUCTION DEPLOYMENT SPECS
08 // ARCHITECTURAL DECISIONS & TRADE-OFFS
09 // PLANNED IMPROVEMENTS & NEXT REVISIONS
- →Add automated two-way ERP integration (NetSuite / QuickBooks API) for one-click invoice adjustments.
- →Integrate vision-LLM document parsing for heavily degraded physical paper receipts.
pytest tests/ -v --durations=5100% pass across 5 test suites validating deterministic matcher, fuzzy tolerance, and dispute generation.
- Q1:"Why use Levenshtein token-sort ratio instead of simple Levenshtein distance for vendor matching?"
- Q2:"How do you handle currency conversion differences and penny rounding discrepancies across accounting ledgers?"
- Q3:"How did you structure the 3-tone dispute engine to ensure contractual compliance without alienating vendors?"