In a blog post, Facebook said the ranking system isn’t comprised of a single algorithm. Instead, it uses multiple layers of machine learning models to predict what a user wants to see. Facebook explained how this would work for a fictional user called Juan: Machine learning models then predict the probability that Juan will engage will all this content. [Read: How this company leveraged AI to become the Netflix of Finland] The ranking system first collects candidate posts for each user, including those shared by their friends, Groups, or Pages since their last login. It then gives each post a score based on a variety of factors, such as who shared the content and how it matches with what the user generally interacts with.
Next, a lightweight model narrows the pool of candidates down to a shortlist. This allows more powerful neural networks to give each remaining post a score that determines the order in which they’re placed. Finally, the system adds contextual features like diversity rules to ensure that the News Feed has a variety of content. The entire process is complete in the time it takes to open the Facebook app. If you want more details on how the ranking system works, you can check out a more technical explainer on Facebook’s Engineering blog.