News Recommendation Based On AWS AI
Users interact with websites or apps they generate a lot of valuable data composed of their interactions with the items on the page, interaction with other users, and demographic data such as age, gender, etc. Interaction data itself can be composed of different actions made by the user such as clicks, likes, ratings, comments, time spent.
AWS AI
Defining the use case
Before the selection of the best-suited recipe, we need to define our use case. For this test, we’re going to create a recommendation system for News with the goal of giving to every user a set of items suited to their latest interactions or, in more practical words, the news more likely to be visited by the user.
Using unstructured data
When using a Machine Learning Recommendation system, we’re often limited by the input data type to 2 main types: Categorical and Numerical, both structured data types. If we want to extract value from unstructured data like text, a lot of extra steps are required, including language techniques.
Creating a dataset schema
For Personalize a schema defines the structure of the data allowing the service to parse the data. The schema is a JSON file in Avro format which includes relevant information such as the dataset name, input type, name of the fields and their respective data type and the version.
Training modes
When training a solution version, AWS Personalize gives us 2 types of training modes: FULL and UPDATE. The full mode is suited when we trained for the first time the model or when we decide to re-train the model with the whole dataset whereas the update mode is when we want to update incrementally the solution but only using the data that has been changed or added.
Creating a campaign
A campaign is a deployed solution version with provisioned dedicated transaction capacity for creating real-time recommendations via API operations.
Query the ML model using gremlin
Once the endpoint is ready, we can use it for graph inference queries. Neptune ML supports graph inference queries in Gremlin or SPARQL. It requires nearly the same syntax to traverse the edge, and it lists the other Users that are connected to Henry through the FRIEND connection.
Conclusion
After testing the service with a real use case and diving into the AWS Personalize service options and solutions available to create recommendation systems, we can conclude that AWS has created a really good service with great out-of-the-box performance for a wide variety of use cases.