Mortgage loan-file QA
Upload a mortgage loan package, ask questions in plain English, and get answers with the exact page they came from.
The pipeline
- Loan PDF
- Native textPyMuPDF
- Scanned pagesPaddleOCR
- Page chunks + embeddings
- Vector indexFAISS
- Answer + page citationteammates
The problem
Loan packages are long, partly scanned PDFs. Finding one fact, like the borrower or the loan amount, means paging through all of it.
What I built
My part was the document pipeline: native text extraction with PyMuPDF, PaddleOCR for scanned pages, a page-level chunker, embeddings, and the FAISS index the question-answering runs on.
The rest of the team
Teammates built the retrieval-augmented answering (a local Llama 3.1 through Ollama, with page citations) and the React interface.
Result
Tested against 30 sample loan-file documents. It runs fully locally, with no external API key.
Trade-offs
Native text first, OCR only for scanned pages: digital pages stay fast and exact, and OCR is spent only where it's needed.