jgvilchezc.dev
← Back to work
/bank-document-aiActive devConfidential

Bank Document AI

AI document management for a national bank, built end to end. Client confidential.

Role
Lead engineer · Architecture to app
Year
2026
Status
Active dev
View live ↗
N/A
Client confidential · no screenshots16:9
José Gabriel Vilchez CarrasqueroJosé Gabriel Vilchez Carrasquero
At a glance
Bank branches
250+
Archive to index
12 TB
Recall@3 after rerank
0.94
Cost per document
~$0.0003

Overview

A national bank runs its credit and trade-finance operations on paper trails: contracts, guarantees, invoices and letters spread over file servers across the country. Finding the one clause that decides an operation meant opening PDFs by hand. This platform files those documents by operation, reads them, and lets staff ask questions and get answers that point at the exact page.

I designed and built it end to end, from the cloud architecture to the app the bank's staff use. It is sized for 2,500 users and is in acceptance testing ahead of its first production flow. The client and its screens stay confidential, so this page shows the engineering and none of the product.

“An answer without a citation is treated as a failure, and the user is told so.”

Architecture

A connector inside the bank reaches a Python backend on AWS Fargate over VPN, so the originals never leave the bank's storage. Mendix 11 is the system of record, with React widgets, Java services and its own PostgreSQL. The AI backend holds no business data: it runs OCR, extraction and embeddings, and the vectors are designed to live in Aurora pgvector.

ingest · background jobs
01 · intakeStaff upload, a CRM pushes over REST, or the on-prem connector syncs the archive
02 · ocrTextract reads scans, with mixed-page detection for multi-document PDFs
03 · extractType, parties, dates and amounts, each with a confidence score
04 · indexContext-aware chunks, Titan embeddings on Bedrock, stored as vectors
permission check per document
ask · per question
05 · routeRules plus an LLM that fills a closed-value slot, validated before use
06 · retrieveBM25 and vectors fused with RRF, then reranked
07 · answerCitations are validated; an uncited answer is flagged as not backed
08 · reviewFour-eyes approval on the server, with every denial audited

A connector inside the bank reaches a Python backend on AWS Fargate over VPN, so the originals never leave the bank's storage. Mendix 11 is the system of record, with React widgets, Java services and its own PostgreSQL. The AI backend holds no business data: it runs OCR, extraction and embeddings, and the vectors are designed to live in Aurora pgvector.

Key features

  • /01

    Answers that cite the page

    AI search works over one operation, a group or the whole archive. Each answer carries citations that are checked against the source, and when the model cites nothing the interface says the answer is not backed.

  • /02

    Originals stay in the bank

    The connector runs inside the bank's network and talks to the cloud over VPN. The platform keeps metadata and vectors and hands back a link to the original file.

  • /03

    Extraction with a confidence score

    Every extracted field has a score. Fields under 0.80, low-quality scans, duplicates and expired documents go to a human review queue.

  • /04

    Permission-aware retrieval

    Search re-checks each retrieved document against the permissions of the person asking, so an answer never quotes a file that person could not open.

  • /05

    Ingestion that survives failures

    Background work runs from a job table with retries, idempotency and claim and reclaim, so a crashed worker does not lose or duplicate a document.

  • /06

    Four-eyes approval

    Approvals need a second person and are enforced on the server. Denied attempts are written to the audit log.

Technical decisions

  • Mendix is the system of record and owns every business rule. The Python backend only makes the paid OCR and model calls and stores no business data, so it can scale, fail or be replaced without touching the bank's records.

What I'd do differently

  • /01

    The golden set should have existed from week one. A first run of 25 real questions passed 10, and that number told me more about the product than any demo had.

  • /02

    Local OCR read only about half of the low-quality scans, so a managed OCR service became a requirement and the architecture had to account for where it runs.

  • /03

    The slowest parts were never code: network contracts and access to test files set the pace. I designed a direct-integration path so the work could continue while the VPN was pending.

Client name, screens and internal data withheld under confidentiality.