The great mission of Facebook is to keep you stuck to the news feed for as long as possible, increasing your chance to see advertisements.(main source of income for the social network)

The most interesting posts for you are selected automatically through an algorithm. Adam Mosseri, vice president for the news feed, explains in a recent video how this works.

Facebook organizes all posts automatically using a tool called ranking. It’s “a set of algorithms we use to try to gauge users’ interest in every post they can see,” explains Mosseri.

He compares this to a real-life situation. Suppose you are waiting for your wife in the restaurant; she’ll be late and asks you to go pick a plate for both of them.

The first step is called an inventory; that is, what we have on the menu. On Facebook, it’s the stories you have not seen from your friends and pages yet.

The second step is the signs. In his wife’s case, it’s her preferences for food – whether she likes fish, soups, salads, etc. In the social network, there are several signs: how long ago a post was published, and who published it; the speed of your internet connection; and whether the content is violent, spam, clickbait or a false news.

The third step is the predictions. In the case of Facebook, it is likely that you will comment or share a post, and even hide or denounce it.

The social network makes a weighted average of the predictions and arrives at a score of relevance, that is, a number that estimates its interest in a certain history. All posts have a grade, calculated for each user, and Facebook orders all of them according to this criterion (with the advertisements between one and the other).

Related:  Now You Can Block 'Mark Zuckerberg' On Facebook

Sometimes Facebook makes changes in weights to calculate that average. Some time ago, your family’s publications and friends began to weigh more than page updates, for example. Recently, Facebook decided to reduce the relevance of posts that use engagement lures – that is, they try to increase their reach by asking you to enjoy or vote.

Mosseri says in the video: “we know we’re not perfect and we make mistakes,” and so the social network constantly adjusts its algorithms to keep users in the news feed as much as possible.