Welcome to the Product Recommender System Kickstart! Use this to quickly get a recommendation engine with user-item relationships up and running in your environment.
To see how it's done, jump straight to installation.
The Product Recommender System Kickstart enables the rapid establishment of a scalable and personalized product recommendation service.
The system recommends items to users based on their previous interactions with products and the behavior of similar users.
It supports recommendations for both existing and new users. New users are prompted to select their preferences to personalize their experience.
Users can interact with the user interface to view items, add items to their cart, make purchases, or submit reviews.
To find products in the application you can do a:
- Scroll recommended items.
- Search items by text (semantic search).
- Search items by Image (find similar items in the store).
- rec-sys-app
- Main project repository for data scientists/ engineers.
- Contains data-generation flow & train-workflow reserach notebooks
- Containes Feast feature store.
- rec-sys-workflow
- This repo containes the training workflow for the recommendation system.
- It loads data from the feast feature store.
- Trains the 2-tower model.
- Generates reccomedations.
- Current repo
- Deploys the app end-to-end with including the data generation and training pipeline using helm.
- Has a frontend and backend functionality.
Components of Recommender System
-
Filtering Removes invalid candidates based on user demographics (e.g., age, item availability in the region) and previously viewed items.
-
Ranking Identifies the most relevant top-k items based on previuos intercations between users and items (trained with two-tower algorithm).
-
Business Ordering Reorders candidates according to business logic and priorities.
- Feast takes the Raw data (item table, user table, interaction table) and stores the items, users, and interactions as Feature Views.
- Using the Two-Tower architecture technique, we train the item and user encoders based on the existing user-item interactions.
- After completing the training of the Encoders, embed all items and users, then push them in the PGVector database as embedding.
- Because we use batch scoring, we calculates for each user the top k recommended items using the item embeddings
- Pushes this top k items for each user to the online store Feature Store.
- Sending a get request from the EDB vectorDB to get the embedding of the existing user.
- Perform a similarity search on the item vectorDB to get the top k similar items.
- The new users will be embedded into a vector representation.
- The user vector will do a similarity search from the EDB PGVector to get the top k suggested items
- Embed the user query into embeddings.
- Search the top-k clostest items that where generated with the same model at batch infernece time.
- Return to user the recommended items
Depend on the scale and speed required, for small amount of users have minimus of:
- No GPU required; for larger scale and faster preformance, use GPUs.
- 4 CPU cores.
- 16 Gi of RAM.
- Storage: 8 Gi (depend on the input dataset).
occommand installedhelmcommand installed- Red Hat OpenShift.
- Red Hat OpenShift AI version 2.2 and above.
- Red Hat Authorino Operator (stable update channel, version 1.2.1 or later)
- Red Hat OpenShift Serverless Operator
- Red Hat OpenShift Service Mesh Operator
Under openshiftAI DataScienceCluster CR change modelregistry, and feastoperator to Managed state which by default are on Removed:
apiVersion: datasciencecluster.opendatahub.io/v1
kind: DataScienceCluster
metadata:
name: default-dsc
...
spec:
components:
codeflare:
managementState: Managed
kserve:
managementState: Managed
nim:
managementState: Managed
rawDeploymentServiceConfig: Headless
serving:
ingressGateway:
certificate:
secretName: rhoai-letscrypt-cert
type: Provided
managementState: Managed
name: knative-serving
modelregistry:
managementState: Managed
registriesNamespace: rhoai-model-registries
feastoperator:
managementState: Managed
trustyai:
managementState: Managed
kueue:
managementState: Managed
workbenches:
managementState: Managed
workbenchNamespace: rhods-notebooks
dashboard:
managementState: Managed
modelmeshserving:
managementState: Managed
datasciencepipelines:
managementState: Managed
- Standard user. No elevated cluster permissions required
-
Fork and clone the repository:
# Fork via GitHub UI, then: git clone https://github.com/<your-username>/product-recommender-system.git cd product-recommender-system
-
Navigate to the helm directory:
cd helm/ -
Set the namespace environment variable to define on which namepsace the kickstart will be install:
# Replace <namespace> with your desired namespace export NAMESPACE=<namespace>
-
Install using make (this should take 8~ minutes with the default data, and with custom data maybe me less or more):
# This will create the namespace and deploy all components make install
- Or installing and defining a namespace together:
# Replace <namespace> with your desired namespace and install in one command make install NAMESPACE=<namespace>
By default, a dataset is automatically generated when the application is installed on the cluster.
To use a custom dataset instead, provide a URL by setting the DATASET_URL property during installation:
# Replace <custom_dataset_url> with the desired dataset URL
make install DATASET_URL=<custom_dataset_url>To uninstall the recommender system and clean up resources:
-
Navigate to the helm directory:
cd helm/ -
Uninstalling with namespace specified:
# Replace <namespace> with your namespace make uninstall NAMESPACE=<namespace>



