TechEniac

AI Mortgage Guideline Assistant

90%+ compliance accuracy. Every answer cited to a specific page and paragraph. And when the answer isn't in the documents, the AI says so instead of guessing. TechEniac built a production RAG system that mortgage professionals trust with regulatory decisions.

FinTechUSA
AI Mortgage Guideline Assistant interface

Client Background

With 10 years of mortgage lending experience across origination, underwriting, compliance, and portfolio management, the founder had seen the same challenge firsthand: loan professionals spending 20–30 minutes searching complex guidelines for simple answers.

He wanted to change that with an AI system that delivers accurate, source-backed answers with precise citations without ever guessing.

Pain Points

Mortgage lending runs on thousands of pages of guidelines that are frequently updated, cross-referenced, and complex to navigate. The founder identified three compounding problems making manual compliance checks unsustainable:

The Hidden Cost of Manual Lookups

Answering a single compliance question often requires cross-referencing multiple mortgage guidelines, waiting periods, and investor overlays. Loan officers can spend 20–30 minutes per lookup, creating hundreds of hours of repetitive work at scale.

Frequent Guideline Updates Requiring Constant Retraining

Fannie Mae, FHA, VA, and other agencies regularly update their requirements. Teams must continuously review changes, update internal references, and retrain staff making it difficult to keep everyone aligned.

Unverifiable AI Answers Creating Compliance Risk

Generic AI tools can provide confident but inaccurate answers. In mortgage lending, a wrong answer can create serious compliance and financial risk. The system needed to ground every response in verified source documents with clear citations.

Client Expectations

Every answer must cite its source document name, section number, page, and paragraph enabling instant verification against the original guideline

When the information doesn't exist in the guidelines, the system refuses to answer rather than fabricating a plausible-sounding response

Handle all guideline formats digital PDFs, scanned PDFs, Word documents, HTML, spreadsheets without losing critical structure (tables, nested lists, hierarchical sections)

Process monthly guideline updates automatically, ensuring current guidance takes priority while maintaining audit trail of historical versions

Achieve 90%+ accuracy on real-world mortgage compliance questions verified against certified underwriter answers

Proposed Solution

Multi-Format Document Ingestion Pipeline

Digital and scanned PDFs are processed while preserving tables, headings, lists, section structures, and page-level references. Structured extraction captures the document’s hierarchy and cross-references, while version tracking ensures updates are mapped, affected content is flagged, and the latest guidelines always take priority.

Structure-Aware Semantic Chunking

Content is chunked by document structure rather than token limits, keeping complete rules, tables, and lists intact. Each chunk retains rich metadata including document version, section, page, and hierarchy enabling precise citations and targeted retrieval across specific guidelines or update periods.

Hybrid Retrieval with Reciprocal Rank Fusion

The system combines semantic and keyword-based retrieval to understand both natural-language questions and precise guideline references. Qdrant captures contextual meaning, while BM25 identifies exact terms and sections. Reciprocal Rank Fusion intelligently combines both signals, adapting retrieval based on the type of query for more relevant and reliable results.

Grounded Generation with Mandatory Citation

Gemini generates answers with inline citations for every factual claim, backed by the retrieved source documents. A validation layer verifies each citation before delivery, rejecting and regenerating responses when sources cannot be confirmed. Citations include the document, section, page, and paragraph, making every answer easy to verify.

Confident Refusal on Out-of-Scope Questions

The system is designed to refuse rather than guess when reliable guidance isn’t available. A dual validation layer checks retrieval relevance and topic alignment before generating an answer. Around 8% of queries are intentionally declined, ensuring uncertain or out-of-scope questions never become confident but potentially misleading answers.

How Is This Different from Other Agencies?

Most agencies sell hours. TechEniac partners on outcomes. Here is what that looks like in practice.

Challenges

How We Resolved

Table Extraction Accuracy from Complex PDFs

Implemented Google Document AI's table extraction with post-processing validation layer. Extracted tables validated against expected column counts and data types (percentages, dollar amounts, time periods). Tables failing validation flagged for manual review rather than ingested with incorrect structure.

Cross-Reference Resolution Across Guideline Sections

Built a cross-reference resolution layer that identifies section references within chunks, retrieves the referenced section, and appends it as supplementary context during generation. The AI sees both the original chunk and the referenced section.

Version Management During Monthly Guideline Updates

Implemented version-aware retrieval system. Every chunk carries version timestamp and document revision identifier. Retriever defaults to most current version but supports explicit historical queries ("What was DTI limit before January 2026 update?"). When new version ingested, superseded chunks flagged (not deleted), preserving audit trail while ensuring current guidance takes priority.

Impact Generated

90%+

Compliance Accuracy

Measured against 150 real mortgage compliance questions with verified answers from certified underwriters—system's accuracy validated against human expert baseline.

100%

Citation Rate

Every answer includes document name, section, page, and paragraph architecturally enforced, not optional. Loan officers verify answers in seconds against original guidelines instead of spending 20–30 minutes searching.

~8%

Confident Refusal Rate

Questions not covered in guidelines receive explicit decline, not fabricated answers. This refusal rate builds trust lenders know when the system says yes, it's grounded in actual guidance.

94%

Table Extraction Accuracy

On first pass, with validation layer catching remaining 6% before ingestion critical for complex guideline matrices and rate grids.

23%

Answer Completeness Improvement

From cross-reference resolution multi-section rules answered completely instead of partially. Complex guideline dependencies now handled correctly.

60%

Reduction in Repeat Query Costs

Semantic caching catches equivalent questions asked in different words same query in different phrasing serves cached response instead of regenerating.

Tech Stack & Infrastructure

AI / ML

Gemini (generation + document understanding)LangChain (orchestration)Sentence-BERT (embeddings)

Retrieval

Qdrant (dense vector search)BM25 (sparse keyword search)Reciprocal Rank Fusion (hybrid combination)

Document Processing

Google Document AI (structured PDF extraction)Tesseract OCR (scanned documents)Whisper (audio guideline transcription)

Backend

PythonFastAPIPostgreSQL (metadata + versioning)Redis (caching)

Frontend

React.jsTypeScriptTailwind CSS

Cloud & DevOps

AWS ECS (Fargate)RDS PostgreSQLS3 (document storage)GitHub Actions CI/CD

You might also like some of our recent stories