Product Recommendation Queries

Hi Team,

I have a product catalog with a sample created as shown below. Each product is recommended for usage for a specific age group, location, and gender.

Could you please let me know if we can use Neo4J Data science library queries to recommend Product A for User A and Product B for User B based on the similarity of properties? Please note that not all properties are matching with the user and the product recommendation.

MERGE (A:AgeRange{Name:"5-10"})
MERGE (A1:AgeRange{Name:"25-30"})
MERGE (L:Location{Name:"USA"})
MERGE (L1:Location{Name:"Japan"})
MERGE (G:Gender{Name:"Male"})
MERGE (G1:Gender{Name:"Female"})

MERGE (P:Product{Name:"Product A"})
MERGE (P)-[:RECOMMEND_FOR_AGE]-(A)
MERGE (P)-[:RECOMMEND_FOR_LOCATION]-(L)
MERGE (P)-[:RECOMMENDED_FOR_GENDER]-(G)


MERGE (P1:Product{Name:"Product B"})
MERGE (P1)-[:RECOMMEND_FOR_AGE]-(A1)
MERGE (P1)-[:RECOMMEND_FOR_LOCATION]-(L1)
MERGE (P1)-[:RECOMMENDED_FOR_GENDER]-(G1)

MERGE (U:User {Name:"User A", Age:"5-10", Location: "USA", Gender: "Female"})
MERGE (U1:User {Name:"User B", Age:"35-50", Location: "Japan", Gender: "Female"})

image

image

Have you seen this blog? Exploring Practical Recommendation Systems In Neo4j | by Zach Blumenfeld | Towards Data Science

We also provide the source code, here: demo-news-recommendation/mind-large-collab-filtering at main · zach-blumenfeld/demo-news-recommendation · GitHub