A working pipeline that watches an intake folder, classifies each incoming mortgage document, pulls the key fields out as structured data, and routes anything it's not confident about to a human instead of guessing. Built and tested end to end against a fully synthetic 20-document set — no real borrower data touched any part of this.
An intake folder is watched for new PDFs. Each one goes to Claude with a single prompt that classifies the document — W-2, paystub, bank statement, or other — and extracts the relevant fields as structured JSON, with a confidence score and any quality flags attached. A router splits on that confidence: high-confidence, correctly-typed documents get logged, renamed, and filed automatically. Everything else — low confidence, or a document type it doesn't recognize — gets logged and routed to a review folder instead of a guess.
Classification landed 20/20 and field extraction 85/85 gradable fields — including three documents built specifically to have unreadable data, where the pipeline correctly returned null instead of inventing a number.
The confidence score didn't reliably track difficulty. Documents with real problems still scored 0.95 in most cases, same as a clean document — meaning it isn't yet a trustworthy signal on its own for "this doc had a problem."
The "degraded" test documents were clean, machine-readable text with scan issues described as literal markers — not the real visual noise of an actual scanner or phone photo. That's the honest next test, not something this run already proved.
Classify, extract, and file is the smallest piece of what actually happens to a document in a mortgage file. But it's the first domino — and the honest miss mattered more here than the perfect score.
← return home