Logo

Estimation Pipeline

Three-stage flow: LLM estimation, deterministic reconciliation, then customer-facing output

Stage 1
LLM Vision Model

Analyzes all property photos holistically and produces three independent cost estimates:

M1
Top-Down
$/sqft x area by rehab level
M2
System-Level
Per-system cost with completion %
M3
Bottom-Up
Line-item build + 15% buffer
Step 2: Reconciliation
Pure Code (No LLM)

Merges three estimates into one final range using deterministic logic:

Overlap Analysis
Pairwise + 3-way intersection
Spread Compression
Caps range width by scenario
Regional Factor
State-level cost multiplier
Stage 3
LLM Text Model

Converts reconciled data into customer-facing narrative:

Property Assessment
Condition + scope summary
Final Estimate
Range + confidence label
Risk & Action
Critical risk + next step

Stage 1 System Prompt

Controls the three-method estimation logic (top-down, system-level, bottom-up)

Step 2: Reconciliation Logic

Deterministic code that merges three Stage 1 estimates into one final range — no LLM involved

Scenario Resolution

How the three method ranges relate to each other determines the reconciliation path:

All Three Overlap
High confidence

All three methods agree on a shared range. Use the common intersection directly.

Two Overlap
Medium confidence

At least one pair overlaps. Prefer pairs including Method 3 (most granular). Weight toward Method 3 center.

No Overlap
Low confidence

All three methods disagree. Anchor on Method 3, lift floor if Method 1 is significantly higher.

Spread Compression

The final range width is capped based on scenario to keep estimates actionable:

All three overlap
Tightest spread
$10K
Two overlap (conflicted)
Method 3 gap > $20K
$15K
No overlap
Widest allowed
$25K

Compression preserves the range center. If the raw range is within the cap, it passes through unchanged.

Final Output

After scenario resolution and spread compression, these values are produced:

Regional Factor

State-level cost multiplier applied to the base range (e.g., NY = 1.3x, Midwest = 0.85x). Result rounded to nearest $100.

Confidence Level

Derived directly from scenario: all overlap = High, two overlap = Medium, no overlap = Low.

Key Cost Drivers

Top 3 line items by cost from Method 3, giving customers visibility into where the money goes.

Outlier Flags

Warnings like no_overlap or method_1_floor_lift for manual review.

To modify this logic, edit comprehensive_v2.py → reconcile_stage1_output()

Stage 3 System Prompt

Controls the customer-facing narrative generation from reconciled estimates