Estimation Pipeline
Three-stage flow: LLM estimation, deterministic reconciliation, then customer-facing output
Analyzes all property photos holistically and produces three independent cost estimates:
Merges three estimates into one final range using deterministic logic:
Converts reconciled data into customer-facing narrative:
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 methods agree on a shared range. Use the common intersection directly.
At least one pair overlaps. Prefer pairs including Method 3 (most granular). Weight toward Method 3 center.
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:
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:
State-level cost multiplier applied to the base range (e.g., NY = 1.3x, Midwest = 0.85x). Result rounded to nearest $100.
Derived directly from scenario: all overlap = High, two overlap = Medium, no overlap = Low.
Top 3 line items by cost from Method 3, giving customers visibility into where the money goes.
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