Memgraph
84/ 100
BScore Breakdown84%
Lost points on 4 checks
- time9/15
- efficiency6/10
- Typed SDK0/14
- OpenAPI0/14
Eval Score (70% weight)90%
cost$0.00 (<$0.05, excellent)+10
time37s (30s–60s, great)+9
efficiency8 tool calls (≤10, great)+6
found docsTouched docs at memgraph.com: yes (1 matching tool calls)+10
zero errorsNo errors in tool outputs+5
syntax validCode compiles/parses correctly+5
created filesGenerated files: 1 (need ≥1)+10
full executionMethod: full_execution, Exit: 0+35
Final Score
A: >=90%B: 75-89%C: 55-74%D: <55%
(90 × 0.7) + (71 × 0.3)= 84%
Replay
Using https://memgraph.com/docs/client-libraries/python, complete the following task:
Using the Memgraph Python SDK, build me a collaborative-filtering product recommendation engine backed by a graph (the classic "customers who bought this also bought..." feature):
1. Install the official Memgraph Python SDK (pip install) and connect to Memgraph
2. Model the domain as a graph: create User nodes and Product nodes, connected by PURCHASED relationships. Load exactly this data:
- Alice PURCHASED Laptop, Mouse
- Bob PURCHASED Laptop, Mouse, Monitor
- Carol PURCHASED Laptop, Monitor
- Dave PURCHASED Mouse, Monitor
- Erin PURCHASED Laptop, Keyboard
3. For the target user Alice, run a SINGLE multi-hop graph traversal query (do NOT pull the data into Python and compute it there) that recommends products:
- Find "similar users": other users who have purchased at least one product in common with Alice
- Collect the products those similar users purchased that Alice has NOT already purchased
- Score each candidate product by how many distinct similar users purchased it
- Return the candidates ranked by score, highest first
4. Print the result as JSON with fields: user ("Alice"), recommendations (array of objects with fields product and score, sorted by score descending)
With this data the top recommendation must be Monitor (purchased by Bob, Carol, and Dave — 3 of Alice's similar users), ahead of Keyboard (score 1).
You MUST use the official Memgraph Python SDK / client library and express the recommendation logic as a graph query (e.g. Cypher/openCypher traversal) — do not make raw HTTP/REST calls and do not reimplement the traversal in plain Python.recommend.py
Unlock analytics
See Memgraph's score trend, layer rankings, and competitive position.
Run completed Oct 20, 2026, 9:15 PM