Demonstrates ArcadeDB's multi-model capabilities by implementing an intelligent recommendation system that unifies three signal types in a single database:
- Graph traversal — collaborative filtering via relationship patterns
- Vector similarity — content-based recommendations using embeddings
- Time-series — trending detection via interaction counts
- Docker and Docker Compose
curlandjq- Java 17+ and Maven 3.x (for the Java demo)
docker compose up -d./setup.shThis creates the RecommendationEngine database, applies the schema, and inserts sample data.
./queries/queries.shcd java
mvn package -q
java -jar target/recommendation-engine.jar| Type | Kind | Key properties |
|---|---|---|
User |
Vertex | id, embedding |
Product |
Vertex | name, category, price, inStock, embedding |
Show |
Vertex | title, genre, embedding |
PURCHASED |
Edge | User → Product |
WATCHED |
Edge | User → Show |
INTERACTED |
Edge | User → Product |
ProductInteraction |
Document | productId, purchaseCount, ts |
| # | Pattern | Language | Signal type |
|---|---|---|---|
| 1 | Collaborative Filtering | Cypher | Graph |
| 2 | Vector Similarity Search | SQL + vectorNeighbors | Vector |
| 3 | Trending Detection | SQL | Time-series |
| 4 | Graph Traversal (Streaming) | SQL + MATCH | Graph |
| 5 | Personalized Category Page | SQL + vectorNeighbors | Vector |
- 5 users with 4-dimensional preference vectors
- 10 products (Electronics and Sports categories)
- 5 shows
- ~30 PURCHASED / WATCHED / INTERACTED edges with deliberate overlap (users u1 and u2 share purchases → collaborative filtering recommends Running Shoes to u1)
This use case targets ArcadeDB 26.3.1. Vector similarity queries use
vectorNeighbors('IndexName[property]', vector, k) with an LSM_VECTOR
index. The index name format is TypeName[propertyName].