The SL O-Horizon Recommendation Engine was developed as part of the project titled "SL O-Horizon: Enhancing Discovery On Beckn Enabled Open Networks Through Recommendations Using Neo4j & GDS". It was created during Skill-A-Thon 1.0, which was a hackathon organized by the EkStep Foundation and the DSEP (Decentralized Skilling and Education Protocol) community.
SL O-Horizon project emerged as the winner in the challenge 4 category of Skill-A-Thon, which focused on "Unlock opportunities for the next billion by building intelligent technology solutions to find and deliver services". Subsequently, the project and the engine was featured in Episode 2 of Neo4j's hour-long live-stream series called Graphversation.
Neo4j Graphversation Ep. 2 (Recommendation Engine in Ed-tech Using Neo4j & GDS): Watch here (Youtube)
This repository serves as the reference for the SL O-Horizon Recommendation Engine, aligning with the contents discussed in the Graphversation episode.
-
Collaborative filtering based recommendations i.e., recommendations based on user to user similarity.
Scenario Supported: Item recommendations for a user based on how similar they are to other users and their preferred items. (Input: UserId)
GDS Algorithms used: Fast Random Projection Embedding (FRP) & K-Nearest Neighbors (KNN)
-
Content based filtering recommendations i.e., recommendations based on similarities between the contents of the items.
Scenarios Supported:
- Item details page recommendations: Recommend items which are similar to the selected item. (Input: ItemId)
- Profile page recommendations: Recommend items which are similar to the items previously rated by the user. (Input: UserId)
GDS Algorithms used: Node Similarity
-
Smart Auto-search: Using this workflow, the recommendation engine identifies the relevant topics in the graph database. And it will make search queries to an external service (SL O-Horizon BAP) on those topics. Which will result in recommendation engine getting enriched with newer items as time passes, thus self-improving the recommendations for the users.
GDS Algorithms used: PageRank & Node Similarity
Note: Since "Smart Auto-Search" wasn't mentioned during the Graphversation Episode, use this article as the reference for the working, architecture & feature walkthrough: Leveraging “Smart Auto-Search” On O-Horizon Recommendation Engine
- Synthetic data generation scripts: The dataset demonstrated during Graphversation can be generated with a single command.
- Swagger Api-doc: This repository comes with a fully fledged swagger api-doc which can be accessed from the web-browser.
- Postman collection: Postman collection with all APIs are included with this repository.
- Node.js 18
- Docker Compose
- Neo4j GraphDB & GDS (Included in docker-compose file)
-
Install Node.js & Docker Compose.
-
Clone the repo and run "npm i" command from within the src directory.
o-horizon-recommendation/src$ npm i
-
Now run the 'docker-compose up' command from the root directory.
o-horizon-recommendation$ docker-compose up
-
Set unique constraints for the graph database (graphDB) by running the following command from the src directory:
o-horizon-recommendation/src$ npm run set-unique-constraints
-
[Optional] To replicate the same dataset used during Graphversation, run:
o-horizon-recommendation/src$ npm run graph-seeder
-
[Optional] To access swagger api-docs, visit the following url from the web-browser.
-
[Optional] Import api collection from src/apidocs into postman.
o-horizon-recommendation/src/apidocs/O-Horizon.postman_collection.json
-
[Optional] To access Neo4j browser, visit the following url from the web-browser. (Login without username & password)
- Beckn Protocol: https://becknprotocol.io
- DSEP Specification: https://becknprotocol.io/dsep-specification
- Neo4j Cypher Query Language: https://neo4j.com/developer/cypher