How to implement personalized feed ranking?
Asked Answered
Q

1

7

I have an app that aggregates various sports content (news articles, videos, discussions from users, tweets) and I'm currently working on having it so that it'll display relevant content to the users. Each post has a like button so I'm using that to determine what's popular. I'm using the reddit algorithm to have it sorted on popularity but also factor in time. However, my problem is that I want to make it more personalized for each user. Each user should see more content based on what they like. I have several factors I'm measuring: - How many of each content they watch/click on? Ex: 60% videos and 40% articles - What teams/players they like? If a news is about a team they like, it should be weighed more heavily - What sport they like more? Users can follow several sports

What I'm currently doing: For each of the factors listed above, I'll increase the popularity score by X of an article. Ex: user likes videos 70% than other content. I'll increase the score of videos by 70%.

I'm looking to see if there's better ways to do this? I've been told machine learning would be a good way but I wanted to see if there are any alternatives out there.

Quest answered 3/6, 2018 at 6:7 Comment(0)
H
6

It sounds like what your doing is a great place to start with personalizing your users feeds.

Ranking based on popularity metrics (likes, comments, etc), recency, and in you case content type is the basis of the EdgeRank algorithm that Facebook used to use.

There are a lot of metrics that you can apply to try and boost engagement. Something user liked post from team x, y times, so boost activity in feed by log(x) if post if is from y, boost activity if it’s newer, boost activity if it’s popular, etc… You can start to see that these EdgeRank algorithms can get a bit unwieldy rather quickly the more metrics you track. Also all the hyper-parameters that you set tend to be fixed for each user, which won’t end up with the ideal ranking algorithm for every user. Which is where machine learning techniques can come into play.

The main class of algorithms that deal with this sort of thing are often called Learning to Rank, and can be on a high level generalized into 3 categories. Collaborative filtering techniques, content based techniques, and hybrid techniques (blend of the first two)

In you case with a feed that most likely gets updated fairly frequently with new items, I would take a look at content based methods. Typically these algorithms are optimized around engagement metrics such as likelihood that the user is going to click, view, comment, or like an activity within their feed.

A little bit of self-promotion: I wrote a couple blog posts that cover some of this that you may find interesting.

https://getstream.io/blog/instagram-discovery-engine-tutorial/ https://getstream.io/blog/beyond-edgerank-personalized-news-feeds/

This can be a lot a lot to take on, so you could also take a look at using a 3rd party service like Stream (disclaimer, I do work there) who helps developers build scalable, personalized feeds.

Hangnail answered 4/6, 2018 at 16:15 Comment(2)
Thanks for your answer Balazs. I've looked into using Stream for my feed. Using your open source framework github.com/tschellenbach/Stream-Framework, I was unable to customize my ranking based on my own scoring function. Is this something that's not possible to do using the open source framework?Quest
Hi Adam, unfortunately, I don't believe custom ranking is baked into our open source framework. It could definitely be added by doing something similar to taking a users last 1000 activities and re-ranking them on read time based on your ranking metrics. We do offer custom ranking on our growth plan and up though.Hangnail

© 2022 - 2024 — McMap. All rights reserved.