What a site key mismatch is (and why it breaks your annual refresh)

Aerial view of a warehouse complex, access roads and a roundabout in an industrial area.

A site key mismatch is what happens when the identifier on your embedding file doesn't line up, row for row, with the identifier on your site list. You run the join, and instead of 40,000 matched rows you get 38,612, or worse, you get 40,000 rows that matched on string but not on substance, because two different sites in two different years both happened to get coded "WH-0412."

It sounds like a small data-hygiene problem. On an annual refresh, across a book that size, it's the difference between a feature that actually feeds your model and a feature that feeds it garbage for twelve months without anyone catching it.

Where the mismatch comes from

Most portfolio risk teams don't have one site ID. They have several, inherited from different acquisitions, different MGAs, different legacy policy admin systems, and reconciled by hand at some point by someone who's since moved on. A site that was LOC-10452 in the 2024 book might show up as 10452-LOC in 2025 after a data migration, or merged with an adjacent parcel under a new composite ID entirely.

Address-based keys have their own version of the same problem. "1402 Harbor Rd" and "1402 Harbor Road, Suite A" are the same site to an underwriter and two different strings to a join. Lat/long keys drift too, usually because someone re-geocoded a batch of addresses with a different provider and rounded to a different number of decimal places than last year's file.

A left join on a mismatched key returns a null in the embedding column for every row it fails to match, with no error raised anywhere in the pipeline. Depending on how nulls get handled downstream, that null drops the site from the model entirely or gets mean-imputed into a value that reads like a real feature.

What a broken join costs you downstream

The expensive version of this failure isn't the obvious one. If 5% of your book fails to match and you notice because the row count looks wrong, you fix it in an afternoon. The expensive version is when 5% matches to the wrong site. A coastal facility in a wind-exposed corridor gets scored with the embedding from an inland site that happens to share an old truncated ID. Your scoring model treats that vector as ground truth and produces a risk score that's confidently wrong for that location, for a year, until the next refresh.

And because an annual refresh only happens once a year, this isn't a bug you catch in a daily data check. It sits in production through a renewal cycle before anyone cross-references it against something else and notices the numbers don't make sense for that site.

Keying it so it doesn't happen again

The fix is less about the join logic and more about deciding, once, which identifier is canonical for your book and holding every refresh to it. A few things that help:

  • Pick one key field and freeze its format. If it's a policy system ID, decide now whether it's zero-padded, whether it includes a prefix, and write that down somewhere a new analyst will actually find it.
  • Keep a crosswalk table for legacy IDs rather than trying to re-derive them from addresses every year. Address matching is fine as a fallback, not as the primary key.
  • Validate row counts and null rates on every refresh before the file goes anywhere near the model, not after a renewal underwriter flags a weird score.
  • Treat unmatched rows as a list to investigate, not a number to accept. A site that drops out of the join one year and reappears the next usually means the ID changed format, and the site itself never left the book.

This is the exact problem we built the delivery format around. The embedding file from Imagery Embeddings is keyed to the site list you give us, so the join uses your identifier from day one instead of asking you to reconcile ours against yours every refresh cycle.

If you're scoping an annual refresh and want to see how the keying works against your own site list, that's a conversation worth having before the next renewal cycle, not after.