SPB Git forge

spb/wp20_uqo

Public
1commits 1branches 0releases
2.8 MBsize
maindefault branch
yesterdaylast push
TeX 59% Python 40.8%
11.8 KB

# Implementation audit — what Vrai Prix actually does vs. what WP20 proposes (Gate 1)

Date: 2026-10-20. Author of the audit: research team (Claude Code session), on behalf of Simon-Pierre Boucher. Scope: every claim below is tied to a local path inspected in this session. Items marked not inspectable this session could not be opened because the laptop was off the cluster LAN (IP 192.0.0.2, Tailscale logged out); they are described only from the author's own internal notes and must not be cited in the manuscript as verified implementation facts.

# 1. Access situation (recorded, not assumed)

Resource Status 2026-10-20 Evidence
Vrai Prix production repository gitsrv:srv/git/vrai-prix.git (node M3U96a ~/apps/vrai-prix) unreachable (SSH to M1M32/m4mn fails; laptop not on LAN) ssh -vv M1M32 → connect to host m4mn.maclustr.io port 22: Undefined error: 0
Copy of the Vrai Prix estimation engine inspected ~/Desktop/Cluster/apps-laptop/toveli/src/lib/engine.ts (header: "Copié du dépôt Vrai-Prix … src/lib/engine.ts, HEAD e4a1c0c, le 2026-10-17")
Vrai Prix assessment-roll + transaction database inspected (read-only copy) ~/Desktop/Cluster/apps-laptop/toveli/data/src/vraiprix.db (830 MB, copied 2026-10-17 from M3U96a:~/apps/vrai-prix/data/vraiprix.db)
Immo-Ka listings + Vrai Prix per-listing evaluations (vp_eval) inspected (read-only copy) ~/Desktop/Cluster/apps-laptop/toveli/data/src/immoka.db (487 MB, same copy date)
Vrai Prix cost-method module (/cout, data/cost.db, src/lib/cost/*) not inspectable this session lives only on M3U96a; Toveli's audit confirms its existence and scope: toveli/docs/source-audit/integration-matrix.md line "Méthode du coût (/cout, cost.db) | Vrai-Prix | Exclure en v1 | Base distincte, admin"
Vrai Prix multimodal listing analysis (Claude Sonnet extractor behind /a-vendre/[uid]/analyse-cout) not inspectable this session same; author's internal notes only (see §4)
UQO WP14 listing crawl (Realtor.ca + DuProprio, 2026-07-03) with text and façade extractions inspected ~/Desktop/Recherche-UQO/immobilier/hedonic-llm-vision-features/data/{raw,processed}/
UQO WP16 (sales-comparison validation on Vrai Prix) inspected ~/Desktop/Recherche-UQO/immobilier/sales-comparison-validation/paper/sections/data.tex
UQO WP1–WP18 LaTeX sources inspected (style audit reused from WP18, research/wp_style_audit.md, same day) ~/Desktop/Recherche-UQO/{immobilier,finance}/*/paper/main.tex
Anthropic / OpenAI API keys valid (models endpoint answered); stored in the sibling project's untracked .env, never copied into this repository GET /v1/models returned the model list (keys not logged)

# 2. What exists in Vrai Prix (verified locally)

# 2.1 Data layer (vraiprix.db, schema read with PRAGMA table_info)

  • units (3,747,008 rows): one row per assessment-roll unit — id_provinc (provincial roll identifier), civic address, municipality and code, latitude/longitude, CUBF land-use code and label, type_prop (unifamilial 2,637,740 / autre 487,333 / terrain 439,099 / chalet 130,664 / plex 44,892 / maison_mobile 5,428 / condo_ou_multi 1,852), annee_construction, aire_etages_m2 (sum of floor areas), superficie_terrain_m2, nb_etages, nb_logements, valeur_terrain, valeur_batiment, valeur_role (assessed land, building and total values), dat_cond_marche (roll market-condition reference date: 2023-07-01 for 1.81 M units, 2024-07-01 for 1.26 M, 2022-07-01 for 0.66 M, older for a residual), and the pre-computed hedonic estimate est_2026 with p10/p90. 1,132 municipality codes.
  • transactions (769,333 rows, 2021-01 → 2026-09): date, amount, street, city, coordinates, property type, year built, floor area, building type, link to id_provinc (≥ 98.7 % linked each year), assessed value, land area.
  • market_index (268 rows): monthly price-per-m² index by type_prop.
  • Licence note recorded in toveli/docs/source-audit/integration-matrix.md: roll data = "Licence ouverte Données Québec (attribution)"; transactions "non republiées en masse". See docs/data_rights.md for the verification of the licence text.

# 2.2 Listing layer (immoka.db)

  • listings (77,511 live for-sale listings, 67 source connectors, first seen 2026-08-12 → last seen 2026-10-17): uid, source, url, title, address, city, region, property_type (Maison 39,593; Condo 13,969; Terrain 11,943; …), price, bedrooms, bathrooms, area_sqft, lot_sqft, year_built, MLS, description, features (JSON list), details (JSON object of broker-entered structured fields), images (JSON list of URLs), lat/lng, quality_score.
  • details keys observed (300-row samples per source): Centris-fed brokers (RE/MAX Québec, Via Capitale, Sutton, Proprio Direct, Century 21, …) carry Année de construction, Revêtement (siding), Revêtement de la toiture / Toiture, Fondation, Fenestration / Fenêtres, Sous-sol, Garage, Stationnement, Cuisine (counters/cabinets), Évaluation municipale (terrain / bâtiment / année), Taxes, Batisse dim., room list with floor coverings; DuProprio carries Dimensions du bâtiment, Année de construction, Style, Évaluation municipale, owner remarks; Kijiji and Facebook Marketplace carry almost no structured building fields.
  • Image counts per house listing (medians by source): RE/MAX 20, Via Capitale 25, Sutton 31, Proprio Direct 28, DuProprio 25, Facebook Marketplace 10, Kijiji 6. Image URLs tested on 2026-10-20 return HTTP 200 for every major source (RE/MAX, Sutton, Via Capitale, Proprio Direct, DuProprio, Royal LePage, Century 21/Centris blob).
  • vp_eval (72,337 rows, all evaluated 2026-10-17): the per-listing Vrai Prix evaluation — unit_id (matched roll unit) and match_m (distance of the match in metres; 36,398 ≤ 15 m), listing price, est/low/high, confidence_pct/confidence (A–D), model_est, comps_est, model_weight, n_comps, cost_est (populated for 54,364 listings), role_est, ens_est, valeur_role, type_prop, municipalite, ratio, diff.
  • Join feasibility measured: 33,237 house listings (property_type ∈ {Maison, Détachée, Jumelé, Maison de ville}) are evaluated as unifamilial; 20,601 are matched within 15 m, 20,123 of them with complete roll fields (year built, floor area, land value) and 20,250 with images. Where both the listing and the roll report a construction year, they agree within one year in 16,294 of 17,098 cases (95.3 %), which validates the spatial match.

# 2.3 Estimation engine (toveli/src/lib/engine.ts, verbatim copy of Vrai Prix src/lib/engine.ts @ e4a1c0c)

Pure functions, 282 lines. Documented behaviour (header comment and code):

  1. Hedonic model: "LightGBM, entraîné sur ~690 k ventes QC 2021-2026, pré-calculé pour chaque unité d'évaluation" → columns est_2026, p10, p90 of units. The training code is not in the copy.
  2. Comparables: candidates filtered by type (TYPE_MATCH), floor-area tolerance ±20 % then ±40 % (relaxed below 6 candidates); adjustments = market-index time factor, 50 % of the comparable's marginal $/m² for area (capped ±25 %), 0.5 %/year of age (capped ±10 %); Gaussian weights in distance (1,500 m), recency (24 months) and area difference (25 %); top-12 comparables; weighted median.
  3. Reconciliation: 0.65 × model + 0.35 × comps when both exist; interval = model P10/P90 rescaled, otherwise comparables' median absolute dispersion; confidence score 5–97 → letters A–D.
  4. No cost-approach code in this file. The cost_est column of vp_eval is produced elsewhere ("Vrai-Prix build-marche-stats.mjs" per the Toveli integration matrix), whose source was not inspectable this session. WP20 therefore treats cost_est as an observed production output whose formula is unknown to us; it can be described statistically but not mechanistically.

# 2.4 Prior UQO work reused as data (verified)

  • WP14 (hedonic-llm-vision-features): 19,273 house listings (Realtor.ca 15,470; DuProprio 3,803; crawled 2026-07-03 with Apify actors), descriptions parsed by GPT-4o-mini under a strict JSON schema (scripts/01_extract_specs_llm.py, MODEL = "gpt-4o-mini", temperature 0) and one façade photo per listing parsed by Claude Haiku 4.5 (scripts/02_facade_vision.py, MODEL = "claude-haiku-4-5", 12-field schema: building type, condition 1–10, curb appeal 1–10, renovation level, exterior materials, landscaping, garage visible, storeys, setting, photo quality, luxury flag). Images were passed by URL. These extractions were used as hedonic regressors, not as cost-approach inputs.
  • WP16 (sales-comparison-validation): describes the Vrai Prix transaction database and the roll link; its data.tex is the reference wording for the institutional description (Registre foncier → roll link, three-year roll cycles, MEFQ harmonisation).

# 3. What WP20 adds (proposed, to be implemented in this repository)

Component Status in Vrai Prix (verified) WP20
Multi-image, per-room multimodal extraction with an explicit evidence ontology (observable / inferred / text-claimed / administrative / latent) Not in the inspected code; a Sonnet-based listing analysis exists in production but was not inspectable New: src/extraction/, schema in src/feature_schema/, prompts and model versions stored in configs/
Cross-image aggregation and text–image reconciliation with verified/unknown/contradictory states Not in inspected code New
Transparent cost schedule (RCN per m² by quality grade and storey count, regional index, soft costs) built from public, citable sources A cost.db with retail/APCHQ/StatCan connectors exists in production (not inspectable) New, independent: src/cost_model/ with every parameter and its source in configs/cost_schedule.yaml
Depreciation model (age–life with condition-adjusted effective age; functional/external components as explicit, separately reported assumptions) Unknown New
Land value from the assessment roll (valeur_terrain) as independent evidence Roll data present Reused
Baselines B0–B4 and evaluation against roll building values, listing structured fields, and asking prices None New
Monte Carlo propagation of attribute uncertainty into the cost indication None New

# 4. Author's internal notes (NOT verified this session — do not cite as fact in the paper)

From the author's project notes dated 2026-09-07/08 (summarised, no source lines available offline): the production cost module (/cout) uses a deterministic engine with a seed catalogue of ~184 priced items and ~99 assemblies, 16 location factors, APCHQ labour-rate grids, Statistics Canada construction price indices, retail price observations from Québec hardware chains, an age–life depreciation capped at 90 %, and a Claude Sonnet multimodal extractor with a ~150-field schema. If the manuscript mentions this module it must say "according to the author's internal documentation; the code was not re-inspected for this paper".

# 5. Gate 1 verdict

  • Vrai Prix provides, verifiably, the data substrate (roll units with land/building values, listing images and broker fields, per-listing production estimates) and a documented market-value engine (hedonic + comparables).
  • The cost approach from images is not an implemented, inspectable Vrai Prix component; WP20 builds it here from scratch and evaluates it on Vrai Prix data. The paper's framing must be "a framework developed on the Vrai Prix data infrastructure", not "a validation of the Vrai Prix cost module".
  • Human expert annotations do not exist locally; the manuscript must report AI–record agreement and AI–AI agreement only, and propose (not report) the expert protocol.