it might come as bit of surprisebut single cypher command will suffice from py neo import graphnoderelationship graph_db graph("graph_db cypher execute(match (usr :user{name:'ragnar'})-[ :likes]->(rec :recipe)(rec )-[ :contains]->(ing :ingredientwith ing ,rec match (rec :recipe)-[ :contains]->(ing :ingredientwhere rec rec return rec name,count(ing as ingcount order by ingcount desc limit ;"first all recipes that ragnar likes are collected then their ingredients are used to fetch all the other dishes that share them the ingredients are then counted for each connected dish and ranked from many common ingredients to few only the top dishes are keptthis results in the table of figure figure output of the recipe recommendationtop dishes the user may love from figure we can deduce it' time for ragnar to try spaghetti and meatballsa dish made immortally famous by the disney animation lady and the tramp this does sound like great recommendation for somebody so fond of dishes containing pasta and meatballsbut as we can see by the ingredient countmany more ingredients back up this suggestion to give us small hint of what' behind itwe can show the preferred dishesthe top recommendationsand few of their overlapping ingredients in single summary graph image