Each user and item gets a random 6-dimensional embedding vector (normalized to unit length). An edge lights up when the cosine similarity between a user's and an item's embedding clears the threshold — real collaborative-filtering scoring, not decoration.
score(u,i) = (embed_u · embed_i) / (|embed_u| |embed_i|)
recommend if score > threshold
or explore_roll(u,i) < diversity * 0.4
- Users / Items — node counts on each side of the bipartite graph.
- Similarity threshold — minimum cosine score before an edge is a "real" recommendation.
- Diversity injection — probability a below-threshold pair is deliberately surfaced anyway, to fight filter bubbles.
- Regenerate — draws fresh random embeddings for every user and item.