[object Object]

← back to Govarbitrage

agents: drop CRE-adjacent service/trade firms from CRE finder

0de26917ad2ff374ea29161bf6759519fc6ae9ed · 2026-07-28 06:49:48 -0700 · Steve Abrams

Distinct precision unit after type-gate (93bf1bd), relevance-ranking
(c53b1f2), finance-FP (2d44193): a name-signal false-positive class for
CRE-ADJACENT SERVICE firms. A Places 'commercial real estate broker'
text search surfaces appraisal/title/escrow/construction/mortgage-lending/
inspection/property-management firms whose 'commercial'/'property' tokens
satisfy COMMERCIAL_RE, so they were wrongly kept as buyer/leasing brokers.

isCommercial() now drops a CRE_SERVICE_RE name UNLESS it carries a
BROKER_ANCHOR_RE (broker/brokerage/realty/real estate/leasing/tenant rep/
investment sales/net lease) or an allowlisted brand — a full-service
brokerage's valuation/PM arm survives. Runs before the positive keep
(same reason as the finance gate). 9/9 service FPs drop, 7/7 legit
brokers + brand arms preserved. +20 tests, 151/151, tsc+eslint clean.

Files touched

Diff

commit 0de26917ad2ff374ea29161bf6759519fc6ae9ed
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Jul 28 06:49:48 2026 -0700

    agents: drop CRE-adjacent service/trade firms from CRE finder
    
    Distinct precision unit after type-gate (93bf1bd), relevance-ranking
    (c53b1f2), finance-FP (2d44193): a name-signal false-positive class for
    CRE-ADJACENT SERVICE firms. A Places 'commercial real estate broker'
    text search surfaces appraisal/title/escrow/construction/mortgage-lending/
    inspection/property-management firms whose 'commercial'/'property' tokens
    satisfy COMMERCIAL_RE, so they were wrongly kept as buyer/leasing brokers.
    
    isCommercial() now drops a CRE_SERVICE_RE name UNLESS it carries a
    BROKER_ANCHOR_RE (broker/brokerage/realty/real estate/leasing/tenant rep/
    investment sales/net lease) or an allowlisted brand — a full-service
    brokerage's valuation/PM arm survives. Runs before the positive keep
    (same reason as the finance gate). 9/9 service FPs drop, 7/7 legit
    brokers + brand arms preserved. +20 tests, 151/151, tsc+eslint clean.
---
 src/lib/places.test.ts | 53 +++++++++++++++++++++++++++++++++++++
 src/lib/places.ts      | 72 +++++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 116 insertions(+), 9 deletions(-)

diff --git a/src/lib/places.test.ts b/src/lib/places.test.ts
index b6daebc..d3544cb 100644
--- a/src/lib/places.test.ts
+++ b/src/lib/places.test.ts
@@ -201,6 +201,59 @@ describe("isCommercial — DROP on financial-advisory / wealth firms with no RE
   });
 });
 
+// CRE-adjacent SERVICE / trade false-positive gate. A Places "commercial real
+// estate broker" text search surfaces firms that WORK on commercial property but
+// are NOT buyer/leasing brokers — appraisers, title/escrow, construction, mortgage
+// lenders, inspectors, property/facilities managers. Their names carry the same
+// "commercial"/"property" tokens that satisfy COMMERCIAL_RE, so before the fix
+// "Commercial Property Appraisers" and "Sunbelt Commercial Construction" were
+// WRONGLY kept as brokers. Now a CRE-service name with NO explicit broker anchor
+// is dropped, while a real brokerage (broker anchor or allowlisted brand) — even
+// one with a valuation / property-management arm — is preserved.
+describe("isCommercial — DROP on CRE-adjacent service/trade firms with no broker anchor", () => {
+  it.each([
+    "Commercial Property Appraisers Inc",
+    "Titan Commercial Title & Escrow",
+    "Sunbelt Commercial Construction",
+    "Meridian Commercial Property Management",
+    "Apex Commercial Mortgage Capital",
+    "National Commercial Property Inspections",
+    "Green Commercial Environmental Services",
+    "Premier Commercial Interior Design Group",
+    "Statewide Commercial Escrow Services",
+    "Metro Commercial Facilities Management",
+    "Cornerstone Commercial Appraisal & Valuation",
+    "Summit Commercial General Contractors",
+  ])("drops CRE-service firm %s (no broker anchor)", (name) => {
+    expect(isCommercial(place(name))).toBe(false);
+  });
+
+  it.each([
+    // A broker anchor rescues a name that also mentions a service word.
+    "Titan Commercial Real Estate Brokerage", // "brokerage" + "real estate"
+    "Landmark Commercial Realty & Property Management", // "commercial realty" broker + PM arm
+    "Apex Commercial Real Estate & Construction Advisors", // "real estate" anchor
+    "Downtown Commercial Leasing", // "leasing" anchor, no service word
+    "Net Lease Advisors", // pure broker, unaffected
+    "Harbor Investment Sales", // "investment sales" anchor
+  ])("keeps CRE broker %s despite (or without) a service word", (name) => {
+    expect(isCommercial(place(name))).toBe(true);
+  });
+
+  it("keeps an allowlisted brand's valuation / management arm", () => {
+    // Brand allowlist overrides the CRE-service drop.
+    expect(isCommercial(place("Cushman & Wakefield Valuation Services"))).toBe(true);
+    expect(isCommercial(place("CBRE Property Management"))).toBe(true);
+    expect(isCommercial(place("Colliers Appraisal Group"))).toBe(true);
+  });
+
+  it("still keeps a plainly-commercial broker with no service word at all", () => {
+    // Guard against the service gate over-reaching into ordinary CRE names.
+    expect(isCommercial(place("Commercial Realty Advisors"))).toBe(true);
+    expect(isCommercial(place("Downtown Commercial Real Estate Brokers"))).toBe(true);
+  });
+});
+
 describe("isCommercial — DROP on residential-flavored place types", () => {
   it.each(["apartment_complex", "home_goods_store"])("drops type %s with no commercial name", (type) => {
     expect(isCommercial(place("Parkview", [type]))).toBe(false);
diff --git a/src/lib/places.ts b/src/lib/places.ts
index 7c4b9bf..c6fa7fc 100644
--- a/src/lib/places.ts
+++ b/src/lib/places.ts
@@ -187,11 +187,51 @@ const FINANCIAL_ADVISORY_RE =
 const RE_ANCHOR_RE =
   /\b(real\s+estate|realty|CRE|propert(?:y|ies)|leasing|net\s+lease|tenant\s+rep(?:resentation)?|multifamily|land\s+brokerage|investment\s+sales|commercial)\b/i;
 
+// CRE-ADJACENT SERVICE / TRADE name signals — firms that WORK on commercial
+// property but are NOT buyer/leasing brokers: appraisal/valuation, title &
+// escrow, construction & general contracting, mortgage lending / loan servicing,
+// property inspection, environmental, interior design, architecture/engineering,
+// surveying, facilities & property management, and the trades (roofing/HVAC/…).
+// A Places "commercial real estate broker" text search surfaces these because
+// their names carry the same "commercial"/"property" asset-class tokens that
+// satisfy COMMERCIAL_RE (e.g. "Commercial Property Appraisers", "Sunbelt
+// Commercial Construction", "Apex Commercial Mortgage Capital"), so they'd
+// otherwise be kept as brokers and pollute the "brokers near this property"
+// answer. This is distinct from the FINANCIAL_ADVISORY drop (wealth/securities
+// firms) and from the off-topic Google-`types` drop (retail/mall mis-tags): here
+// the NAME itself reads commercial-RE, but the firm is a CRE trade/service, not a
+// brokerage. Dropped UNLESS the name ALSO carries an explicit broker anchor
+// (BROKER_ANCHOR_RE) or an allowlisted brokerage brand — a full-service
+// brokerage that happens to run a valuation / property-management arm survives.
+const CRE_SERVICE_RE =
+  /\b(appraisals?|appraisers?|valuations?|title(?:\s+(?:company|services|insurance|&\s+escrow))?|escrow|construction|general\s+contract(?:or|ing)|contractors?|mortgage(?!\s+broker)|lending|lenders?|loan\s+servicing|inspections?|inspectors?|environmental|interior\s+design|architects?|architecture|engineering|surveyors?|surveying|janitorial|cleaning|landscaping|roofing|hvac|plumbing|restoration|property\s+tax|facilit(?:y|ies)\s+m(?:anage|gmt)ment|property\s+m(?:anage|gmt)ment)\b/i;
+
+// Explicit BROKER anchor — proves the firm actually does brokerage even if its
+// name also mentions a service word (e.g. a "Realty & Property Management" firm
+// or a "Real Estate & Construction Advisors" brokerage). Presence of one of
+// these overrides the CRE-service drop and keeps the listing.
+const BROKER_ANCHOR_RE =
+  /\b(brokers?|brokerage|realty|real\s+estate|leasing|tenant\s+rep(?:resentation)?|investment\s+sales|net\s+lease|realtors?)\b/i;
+
 function hasCommercialBrand(name: string): boolean {
   const n = name.toLowerCase();
   return COMMERCIAL_BRANDS.some((b) => n.includes(b));
 }
 
+// True when the name reads as a CRE-adjacent SERVICE / trade firm (appraisal,
+// title/escrow, construction, mortgage lending, inspection, property/facilities
+// management, …) that carries NO explicit broker anchor — i.e. a service
+// false-positive we must drop even though its "commercial"/"property" tokens
+// would otherwise satisfy COMMERCIAL_RE. An allowlisted brokerage brand always
+// overrides (a real brokerage's valuation / PM arm stays).
+function isCreServiceNoBroker(name: string): boolean {
+  return (
+    CRE_SERVICE_RE.test(name) &&
+    !BROKER_ANCHOR_RE.test(name) &&
+    !hasCommercialBrand(name)
+  );
+}
+
 // True when the name reads as a financial-advisory / wealth firm that lacks a
 // real-estate anchor — i.e. a finance false-positive we must drop even though a
 // bare finance-ambiguous token (investments/advisors/capital markets) would
@@ -354,12 +394,18 @@ function locationString(city?: string, state?: string, zip?: string): string {
 //      "investments"/"advisors"/"capital markets" tokens that would otherwise
 //      satisfy COMMERCIAL_RE — e.g. "Sterling Financial Advisors" is a wealth
 //      firm, not a CRE broker. An allowlisted CRE brand overrides this.)
-//   3. Strong commercial name signal OR allowlisted brand → KEEP (wins over
+//   3. CRE-adjacent SERVICE / trade firm WITHOUT an explicit broker anchor →
+//      DROP. (Also runs before the commercial keep: appraisal/title/escrow/
+//      construction/mortgage-lending/property-management names carry
+//      "commercial"/"property" tokens that satisfy COMMERCIAL_RE but are NOT
+//      brokers — e.g. "Sunbelt Commercial Construction". Broker anchor or brand
+//      overrides.)
+//   4. Strong commercial name signal OR allowlisted brand → KEEP (wins over
 //      any residential signal, e.g. "Commercial Realty Advisors").
-//   4. Residential / irrelevant name signal → DROP.
-//   5. Residential-flavored place type → DROP.
-//   6. Generic real-estate result with no commercial evidence → DROP.
-//   7. Non-real-estate result with no signal either way → DROP (nothing kept it).
+//   5. Residential / irrelevant name signal → DROP.
+//   6. Residential-flavored place type → DROP.
+//   7. Generic real-estate result with no commercial evidence → DROP.
+//   8. Non-real-estate result with no signal either way → DROP (nothing kept it).
 export function isCommercial(p: RawPlace): boolean {
   const name = p.displayName?.text ?? "";
   const types = [p.primaryType ?? "", ...(p.types ?? [])];
@@ -375,16 +421,24 @@ export function isCommercial(p: RawPlace): boolean {
   //    wealth firms on a "commercial real estate broker" text search.
   if (isFinancialAdvisoryNoRE(name)) return false;
 
-  // 3. Positive commercial evidence wins over everything below.
+  // 3. CRE-adjacent SERVICE / trade firm with no explicit broker anchor → drop.
+  //    Catches appraisal/title/escrow/construction/mortgage-lending/inspection/
+  //    property-management firms whose "commercial"/"property" tokens satisfy
+  //    COMMERCIAL_RE but which are NOT buyer/leasing brokers. Runs before the
+  //    positive keep for the same reason as the finance gate. An allowlisted
+  //    brand or a broker anchor in the name overrides (handled inside).
+  if (isCreServiceNoBroker(name)) return false;
+
+  // 4. Positive commercial evidence wins over everything below.
   if (COMMERCIAL_RE.test(name) || hasCommercialBrand(name)) return true;
 
-  // 3. Explicit residential / irrelevant name → drop.
+  // 5. Explicit residential / irrelevant name → drop.
   if (RESIDENTIAL_RE.test(name)) return false;
 
-  // 4. Residential-flavored place type with no commercial evidence → drop.
+  // 6. Residential-flavored place type with no commercial evidence → drop.
   if (hasResidentialType) return false;
 
-  // 6 & 7. No commercial evidence at all — whether or not it's a generic
+  // 7 & 8. No commercial evidence at all — whether or not it's a generic
   // real_estate_agency, we can't confirm it's commercial, so drop it.
   // (Precision > recall: the page promises commercial-only.)
   return false;

← a2ed0e6 auto-save: 2026-07-27T21:24:43 (1 files) — tsconfig.tsbuildi  ·  back to Govarbitrage  ·  auto-save: 2026-07-28T06:58:06 (1 files) — tsconfig.tsbuildi eb7e313 →