•almost 4 years ago
In this blogpost I will describe how to implement a feature-rich activity feed that will make relevant and accurate personalization algorithms easier to implement. As we have already explored in previous blog posts, app personalization is linking activity feeds and user engagement data. In most cases, a well thought out feed structure provides valuable information that can be used to generate good personalized content.
Before outlining a recommendation strategy, ask yourself the following questions:
- What types of objects do users interact with?
- Which events can be interpreted as a positive (or negative) feedback?
- Are there any item features that are shared among items that would be useful to make generalized predictions?
- Which features are shared among users that could be useful for predicting positive engagement?
- If you have more than one feed or view, should the personalization algorithms be context-aware?
This is a good place to start, but of course only rigorous statistical analysis can prove or disprove whether your intuition matches reality.
Step 1: Track interactions
At Stream we often encounter apps that use actions like Share, Comment or Upvote. If your app already tracks these interactions you are already on the right path. You also want to make sure that you are tracking implicit interactions, these are also very important to assess user engagement: Click, Impression, Dwell Time, Logging Time, Session ID.
For apps where rating aggregation is important you will probably already have item ratings, it is a no-brainer to use this information as part of your personalization strategy. Collaborative filtering models are ubiquitous in recommender systems and a great place to start is to build a Netflix-style recommendation engine.
Step 2: Store meaningful information about objects and users
The activity stream specification is pretty flexible in terms what types of activity metadata you can store, the more meaningful data you store in your system the more predictive power you can give to your personalization algorithms. One of the most talked about features of Netflix recommender is the fact that they can create very specific sub-genres (i.e. Cerebral Foreign Movies From the 70’s or Gritty Independent Movies), this isn’t magic: you just need to use the right data to generate meaningful latent features.
User and object metadata is also very useful when you encounter one-of-a-kind objects, in that case, the usual Collaborative Filtering approach breaks down and you’re better off recommending items that share similar features which is a type of content recommendation Etsy uses.
Step 3: Outline a recommendation strategy
Personalization comes in many flavors, and you ultimately want to have a strategy that works for your app. Here are some useful things to remember: Determine how often you need to serve recommended content: Real-time recommendations are really nice to have but there are trade-offs between making accurate predictions and computing them on the go. Real-Time Trade-Offs:
- Disadvantage: Tends to be more difficult to build and maintain, and can't usually run as complex models as your trying to get a response from input to output within a matter of seconds->minutes.
- Advantages: Models get updated in real time. Which depending on your use case can be important such as Point of sale products, financial trading, etc....
Bath Processing Trade-Offs:
- Disadvantages: Models are not always up to date and may not reflect most recent changes in data.
- Advantages: Simpler to maintain and more resilient, and can run more complex models.
Ask yourself if the recency of activities should have a big impact on activity ranking: Don’t forget to take into account how an activity’s age might affect if it’s relevant or not.
Come up with creative ways to learn more about your users: For new apps, it is always very important to have an onboarding process where we can learn more about new users without adding too much friction to the on-boarding process.
How should you handle the cold-start problem?: For brand new users showing popular content is usually a good place to start, but you could also use a strictly chronological view.
Do you want to add some a human touch or boost editorial content?:
Adding curated lists makes sense for newer apps that can’t fully take advantage of ML models because of very sparse interaction data.
Do you want to spread out engagement amongst activities or enhance feed diversity: Maybe your user engages with a lot of drama content but you still want to show other types of content in his feed. Then you should limit the number of recommendations per genre or add a randomization layer to your personalization algorithm.
Feel free to reach out to us if you want to set up a trial for Personalization, we can help you design the perfect algorithm, especially if you want to go beyond the usual Netflix-style star rating and add a more comprehensive recommendation algorithm to your app.