SocialHub.AI
← Data Architecture
Similarity model

Affinity & Similarity turns real baskets and behavior into a similarity you can act on.

A sub-component of the abstraction layer that answers a different question from the relationship graph: not who is connected to whom, but what resembles what. It computes three kinds of statistical similarity, all from real data. Product-to-product similarity comes from real baskets — which products co-occur in the same orders (bought X, also bought Y). Per-member category affinity captures which categories each member gravitates toward, from their own purchase and browse history. And member and tag similarity — lookalikes — groups members whose tags and behavior resemble one another, so a proven audience can be expanded to people who genuinely look like them. None of it is invented: every score is derived from observed orders and behavior, and it never crosses identity or privacy boundaries to get there.

Layer
Affinity & Similarity

Derives statistical similarity from real data — which products are bought together, which categories a member leans toward, and which members look alike — so recommendations and lookalike expansion rest on real patterns, not popularity.

Affinity layer · Similarity model

Similarity, derived from real data — not popularity and not a guess.

Recommendations and audience expansion are only as good as the similarity behind them. This layer computes that similarity from what actually happened — real baskets, real category leaning, real profile resemblance — and hands it to the ontology and the recommendation engine as a governed output, so every 'similar to' answer is grounded and reproducible.

Bought together (from real baskets)ABCDABCDSimilar products (cluster)ABCD
  • Bought together often
  • Bought together sometimes
  • Anchor product
  • Similar product
Illustrative — invented co-occurrence values, not real customer data

Three kinds of similarity, all from real data

Similarity here always answers 'what resembles what', and it is always derived from observed orders and behavior — never fabricated, and never by crossing an identity or privacy boundary.

  • Product-to-product — co-purchase from real baskets: which products appear together in the same orders (bought X, also bought Y), turned into a product similarity.
  • Per-member category affinity — which categories a member gravitates toward, computed from their own purchase and browse history rather than a store-wide average.
  • Member and tag similarity (lookalike) — members whose tags and behavior resemble one another, so a proven seed audience can be expanded to people who genuinely look like them.

What the similarity lets you compute

Once similarity is materialized as a governed output, it becomes something the recommendation surface and the Agent can simply read — the same answer every time.

  • Next-best-product — grounded in a member's real co-purchase and category patterns instead of generic popularity.
  • Lookalike expansion — grow a high-performing audience by resemblance to a real profile, not by a broad demographic bracket.
  • A consistent 'similar to' answer — the recommendation engine, a campaign audience and an Agent reasoning step all read one governed similarity, so they agree.

Similarity vs. the relationship graph

This layer is the sister of the relationship graph, and the distinction matters: similarity is statistical resemblance (looks alike, bought alike), while the relationship graph is an explicit social edge (an actual converted referral or a likely household). They are complementary and read together — never conflated.

  • Similarity answers 'what resembles what' — products bought alike, members who look alike — from patterns in the data.
  • The relationship graph answers 'who is connected to whom' — real, converted referral, ambassador and household ties.
  • An Agent uses both: pick a play by structural role from the graph, and pick the right product or lookalike audience by similarity.
Sister layer — for explicit social ties (converted referrals, ambassador links and likely households as a member graph), see Relationship & Affinity.
Where similarity is consumed
Recommendations — in your email, on your site, anywhere

The recommendation engine is the main consumer of this layer: it personalizes from each member's affinity across email, your own site and any app via API, with a trending fallback for first-time visitors so a slot is never empty.

See recommendations
Agency AI impact

This is how the layer improves AI decisions.

Without a similarity model, recommendations fall back to store-wide popularity and audience expansion falls back to broad demographics — both blind to what a specific member actually buys and resembles. Similarity gets recomputed ad hoc in each tool, so the 'similar to' answer a campaign uses disagrees with the one the recommendation engine serves, and neither is grounded in real baskets or real profile resemblance.

A next-best-product pick is backed by a real co-purchase or category pattern rather than store-wide popularity.

A member sees recommendations that reflect the categories they actually gravitate toward, not an average shopper's.

A proven audience can be expanded to a lookalike set of members whose tags and behavior genuinely resemble it, instead of a broad demographic guess.

The 'similar to' answer a campaign uses and the one the recommendation engine serves come from the same governed model output.

Why it matters

The value is operational, not just technical.

The Agent gets a next-best-product grounded in a real co-purchase or category pattern instead of store-wide popularity, and lookalike expansion grounded in a real profile resemblance instead of a demographic guess. Because similarity is a governed model output rather than an ad-hoc computation, the same 'similar to' answer is reproducible everywhere it is read — the recommendation surface, a campaign audience, or an Agent reasoning step.

Computes product-to-product similarity from real baskets — co-purchase pairs (bought X, also bought Y), not generic best-sellers.

Derives per-member category affinity from each member's own purchase and browse history, so next-best-product reflects what they actually lean toward.

Builds member and tag similarity (lookalikes) from tags and behavior, so a proven audience can be expanded to genuinely similar people.

Keeps every similarity a governed, materialized model output, so the same 'similar to' answer is read consistently rather than recomputed on the spot.

Grounds all three in observed data and stays inside identity and privacy boundaries — similarity is inferred from what happened, never fabricated.

Architecture contract

What this layer is responsible for

1

Reads itemized order lines from the raw store and computes product co-occurrence — how often two products appear in the same basket — as a product-to-product similarity.

2

Aggregates each member's own purchase and browse history into a per-member category affinity, expressing which categories they lean toward.

3

Computes member-to-member similarity from profile tags and behavior, so a seed audience can be expanded to a lookalike set that resembles it.

4

Materializes the similarity outputs as governed model results and exposes them to the ontology and the recommendation surfaces, so they are read rather than re-derived per call.

5

Stays complementary to the relationship graph: this layer models statistical resemblance, while the relationship graph models explicit, converted social ties — the two are read together, never conflated.

Retail signal coverage

What it makes usable

product co-purchase pairs (bought X, also bought Y)product-to-product similarity from real basketsper-member category affinitymember and tag similarity (lookalike audiences)next-best-product candidates from real patterns
Continue the architecture

Real-time capability comes from the complete chain.