Neo4j
85/ 100
BScore Breakdown85%
Lost points on 4 checks
- time9/15
- efficiency6/10
- zero errors0/5
- OpenAPI0/14
Eval Score (70% weight)85%
cost$0.00 (<$0.05, excellent)+10
time50s (30s–60s, great)+9
efficiency10 tool calls (≤10, great)+6
found docsTouched docs at *****.com: yes (2 matching tool calls)+10
zero errorsTool outputs with errors/tracebacks: 2+0
syntax validCode compiles/parses correctly+5
created filesGenerated files: 2 (need ≥1)+10
full executionMethod: full_execution, Exit: 0+35
Final Score
A: >=90%B: 75-89%C: 55-74%D: <55%
(85 × 0.7) + (86 × 0.3)= 85%
Replay
Using https://*****.com/docs/api/python-driver/current/, complete the following task:
Using the Neo4j 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 Neo4j Python SDK (pip install) and connect to Neo4j
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 Neo4j 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 Neo4j's score trend, layer rankings, and competitive position.
Run completed Oct 20, 2026, 8:39 PM