AI-Powered Real Estate Intelligence Platform

BusinessBrain
LLM Model

A full-stack, multi-persona AI decision engine for real estate investment analysis. From intake to auditable report — powered by Claude, built for serious operators.

Acquisition Refinance Disposition Development Multi-Family Commercial Industrial Retail Canada — Multi-Jurisdiction
7
AI Personas
2-Tier
LLM Routing
100pt
DDS Score
23+
API Routes

Full-Stack, Production-Grade

React 19 SPA frontend with a FastAPI async backend, MongoDB persistence, and a 2-tier Claude LLM routing engine — deployed on a containerized cloud environment.

Frontend
React 19 React Router v7 Tailwind CSS shadcn/ui + Radix UI Recharts React Hook Form + Zod CRACO
Backend
FastAPI 0.110 Uvicorn ASGI Pydantic v2 Motor (async Mongo) Python-JOSE (JWT) Bcrypt + Passlib httpx
AI Layer
Claude Sonnet 4.5 (Heavy) Claude Haiku 4.5 (Light) emergentintegrations LLM all-MiniLM-L6-v2 Embeddings LiteLLM Cosine Similarity RAG
Data
MongoDB (Motor) Vector Embeddings Store Knowledge Base Chunks Session Persistence
Testing
pytest 14 test modules E2E eval harness KB eval suite LLM rubric scoring

What Business Brain Does

Submit a property. Get an audit-trail-quality investment decision report — complete with financial projections, risk heatmaps, jurisdiction-aware legal flags, and an aggregated verdict.

🧠
Multi-Persona Analysis Engine
7 specialized AI personas (CFO, CEO, COO, Legal, Entrepreneur, Market, Critic) run in parallel. Each returns structured JSON — no hallucinated prose. Results are orchestrated and aggregated into a single defensible verdict.
📊
Deterministic Financial Engine
NOI, Cap Rate, DSCR, Cash-on-Cash, IRR, NPV, and payback period are computed in pure Python — zero LLM involvement. Newton-Raphson IRR solver, amortizing debt service, and sensitivity tables. Reproducible and auditable.
🛡️
Decision Defensibility Score (DDS)
A 100-point rule-based scoring system across 5 axes: Knowledge Grounding, Assumption Coverage, Financial Completeness, Risk Strength, and Jurisdiction Freshness. Outputs a band from "Not Decision-Ready" to "Strongly Defensible."
⚖️
Jurisdiction-Aware Legal Routing
Separate Legal personas for residential vs. commercial assets. Commercial automatically suppresses residential-only regulations (e.g., the Canadian Prohibition Act, RTA rent controls) and applies NNN lease, SNDA, and environmental ESA logic instead.
🔍
RAG Knowledge Base
Semantic retrieval using local sentence-transformer embeddings (all-MiniLM-L6-v2, 384-dim). Curated knowledge sources go through a 5-gate approval workflow. Retrieval gaps are tracked and surfaced for knowledge ops teams.
🌐
Live Listing Enrichment
Optionally supply a listing URL. The enrichment module fetches the page, LLM-extracts verified address, anchor tenants, capex mitigations (new roof, renovated, etc.), and zoning type — then feeds that structured data into the analysis pipeline.
🔄
Self-Learning Loop
Automated learning cycles analyze session feedback and outcome followups to auto-tune smart defaults, retrieval thresholds, and gap priorities. Human approval gates protect prompt changes and rubric criteria from unsupervised drift.
📋
Outcome Followup Tracking
After analysis, the platform schedules followup prompts to capture actual NOI, cap rate, and IRR post-acquisition. Actual vs. predicted deviations feed the self-learning loop — closing the model accuracy feedback cycle.
📑
Multi-Deal Comparison Engine
Compare multiple analyses side-by-side with a dedicated comparison module. Full-featured export system (PDF, Excel, structured JSON) for client deliverables, audit logs, and downstream workflow integration.

The Board Room, Simulated

Each persona is a precisely prompted, JSON-structured expert. Heavy personas run on Claude Sonnet; light personas on Claude Haiku — tiered for cost and quality.

📈
CFO HEAVY · Sonnet
Runs rigorous financial structuring — NOI, Cap Rate, Cash-on-Cash, DSCR, IRR, sensitivity tables. Returns structured metrics JSON. The financial backbone of every report.
🏆
CEO HEAVY · Sonnet
Issues the primary verdict (proceed / caution / decline) with confidence score. Generates action items and owner assignments. Final aggregation weighs CEO primary + Critic adjustment.
⚠️
Critic HEAVY · Sonnet
Red-team persona. Can upgrade or downgrade the CEO verdict by one step if the deal has unusual upside or hidden landmines. Outputs structured findings array.
⚖️
Legal LIGHT · Haiku
Dual-mode: residential applies tenancy acts & non-Canadian restrictions; commercial applies NNN lease, SNDA, ESA Phase I/II, commercial zoning & covenant logic. Not legal advice — structured considerations only.
🔧
COO LIGHT · Haiku
Surfaces operational risks with severity 1–5. Applies capex mitigation downgrade logic — if listing confirms new roof or renovations, deferred-maintenance severity auto-decreases.
🚀
Entrepreneur LIGHT · Haiku
Evaluates strategic narrative, upside vision, and market opportunity. Returns 2–3 sentence thesis, upside drivers, and downside drivers in structured JSON.
🌍
Market Analyst LIGHT · Haiku
Assesses macro/micro market conditions, comparable transactions, absorption rates, and demand-supply dynamics for the specific asset class and jurisdiction.

From Intake to Report

A 5-stage async pipeline processes each deal. Personas run in parallel after enrichment; synthesis and scoring happen before the final report is persisted.

01
Intake
Tier 1 (property) + Tier 2 (financials) captured and validated via Pydantic v2 models
02
Enrichment
Optional listing URL fetch, LLM extraction of verified facts, capex mitigations, zoning
03
Persona Runs
7 personas execute in parallel async tasks with RAG KB context injected into each
04
Synthesis
Verdict aggregation, cashflow projection, DDS scoring, risk coercion, assumption assembly
05
Report
Structured report persisted to MongoDB; exportable as PDF / Excel / JSON with audit trail

Beyond a Simple API Wrapper

Business Brain implements production-grade AI engineering patterns — not a thin LLM wrapper.

Reliability & Resilience
Tiered retry with exponential backoff — 502/503/504 transient errors auto-retry up to 3× with 1.5s → 3s → 6s intervals. Chat session rebuilt on each retry to avoid stale state.
Malformed JSON self-repair — if the LLM returns non-JSON, the system appends a corrective instruction and re-queries automatically.
Embedding fallback chain — local sentence-transformer → deterministic hash pseudo-embedding. System never fails on missing ML model.
Smart defaults engine — missing financial inputs are filled from jurisdiction + asset class normative data, with source attribution and confidence scores.
Output Quality Controls
LLM rubric self-scoring — each persona scores its own output (0–1). Orchestrator logs rubric scores per call for quality tracking and drift detection.
Asset-class gating — strict residential/commercial classifier prevents residential-law contamination in commercial analyses (e.g., no rent-control flags on office buildings).
Capex severity auto-correction — if listing text confirms recent renovations or system replacements, operational risk severity automatically downgraded with audit note.
KB coverage matrix + contradiction detection — knowledge base tracks per-jurisdiction, per-asset-class coverage and flags conflicting source content for review.

Measurable Report Quality

Every report gets a 100-point DDS — a deterministic, rule-based score that measures completeness and auditability, not deal quality.

25
Knowledge Grounding
20
Assumption Coverage
20
Financial Completeness
20
Risk & Critic Strength
15
Jurisdiction & Freshness
85+ — Strongly Defensible 70+ — Defensible with Conditions 55+ — Limited Defensibility <55 — Not Decision-Ready

Built with Production Tools

Every dependency selected for async performance, type safety, and production reliability.

Backend — Python
FastAPI Pydantic v2 Motor (async MongoDB) Uvicorn Python-JOSE bcrypt httpx LiteLLM sentence-transformers reportlab openpyxl pandas boto3 / S3 stripe mypy + black pytest
Frontend — JavaScript
React 19 React Router v7 Tailwind CSS v3 shadcn/ui Radix UI (full suite) Recharts React Hook Form Zod axios Lucide React sonner (toasts) date-fns CRACO
AI & LLM
Claude Sonnet 4.5 Claude Haiku 4.5 emergentintegrations all-MiniLM-L6-v2 OpenAI SDK (optional) Google GenAI (optional) Cosine Similarity RAG Vector KB Store
Infrastructure & Dev
MongoDB (Motor) FastAPI ARM container AWS S3 / boto3 JWT Auth python-dotenv Role-based access Audit logging Stripe payments

Four-Role Permission Model

JWT-secured RBAC with route-level protection on both frontend and backend. Admin role manages users, knowledge, and audit logs.

Role Access Scope
admin Full platform access — user management, audit log, all knowledge ops, all analyses, learning loop controls
knowledge_ops Knowledge sources, gaps, contradictions, coverage radar, KB eval harness, learning loop, analysis eval
domain_reviewer Knowledge sources review, gap flagging, contradiction resolution, coverage monitoring
end_user Dashboard, new analyses, reports, comparisons, followups, settings