Open Specification · May 2026
Zai Decision
Logic Specification
By Ziya Y. · 23 Years Banking · FRC Denial Genome Project
This document describes the decision framework Zai uses to analyze mortgage denials. It is the mortgage logic — not the AI model itself. Published openly so the methodology can be examined, critiqued, and built upon.
Layer 1: Denial Input Classification
When a denial letter is received, Zai classifies it across 4 dimensions:
CLASSIFICATION_DIMENSIONS = {
"primary_reason": ["DTI", "CREDIT", "INCOME", "PROPERTY", "RESERVES", "EMPLOYMENT"],
"stated_threshold": float | null, // What the lender said
"agency_threshold": float, // What FHA/VA/Fannie actually requires
"gap": stated - agency // Positive gap = possible overlay
}
Layer 2: Overlay Detection Rule
1
Extract stated reason — parse denial letter for ECOA code or equivalent language
2
Compare to agency floor — look up FHA/VA/conventional minimum for that factor
3
Check borrower data — does borrower meet agency minimum but not lender's stated requirement?
4
Classify — if borrower meets agency standard but failed lender threshold → OVERLAY. If fails agency standard → AGENCY_RULE.
def classify_denial(borrower_value, stated_threshold, agency_threshold):
if borrower_value >= agency_threshold and borrower_value < stated_threshold:
return "LENDER_OVERLAY" # borrower meets government standard
elif borrower_value < agency_threshold:
return "AGENCY_RULE" # genuine qualification issue
else:
return "OTHER" # denial reason is something else
Layer 3: Confidence Scoring
Every classification gets a confidence score based on data quality:
CONFIDENCE_FACTORS = {
"stated_threshold_explicit": +0.3, // letter gives specific number
"agency_threshold_current": +0.2, // guideline confirmed <12 months old
"borrower_data_complete": +0.2, // all relevant fields provided
"income_type_known": +0.15, // income type clearly identified
"multiple_denial_reasons": -0.1, // harder to isolate cause
}
Layer 4: Routing Engine
If classified as LENDER_OVERLAY, Zai maps the borrower to alternative programs:
ROUTING_LOGIC = {
"credit_overlay": ["FHA_agency_min_lender", "credit_union", "portfolio"],
"dti_overlay": ["FHA_high_dti_lender", "VA_residual_method", "portfolio"],
"ssdi_rejection": ["FHA_ssdi_friendly", "VA_if_eligible", "conventional_grossup"],
"1099_rejection": ["portfolio", "bank_statement_nonqm", "fha_2yr_history"],
"reserve_overlay": ["FHA_zero_reserve", "VA_no_reserve_req", "flexible_overlay"],
}
Agency Reference Table
AGENCY_MINIMUMS = {
"FHA": {"credit": 580, "dti_max": 0.57, "ssdi": True, "gross_up": 0.15},
"Conventional": {"credit": 620, "dti_max": 0.50, "ssdi": True, "gross_up": 0.25},
"VA": {"credit": None,"dti_max": None, "ssdi": True, "gross_up": 0.25},
"USDA": {"credit": 640, "dti_max": 0.41, "ssdi": True, "gross_up": 0.25},
}
This specification describes the logic layer only. FRC's AI implementation uses this framework with additional natural language processing for denial letter parsing. Agency guidelines current as of May 2026 — subject to change. See HUD Handbook 4000.1, Fannie Mae Selling Guide, VA Lender's Handbook for authoritative sources.
FinanceRateCalc Denial Genome Project · Open specification · May 2026 · Part of
the Denial Genome Project · © 2026 FinanceRateCalc