So lets understand the intent of Facebook Newsfeed. The newsfeed is the first page that user see after loging in into the account that shows a collection of posts that may interest the user. From the users perspective, she will want to know
1. activity on the posts she created
2. interesting updates from her friends - ranked in order of user proximity, trending posts, current affairs in social circles
3. Updates from grps\websites that she may follow
4. Potential contacts - ppl you know
From: business standpoint: ads provides monetization, ppl you knw - helps activation and engagement
Given facebooks mission to build authentic communities the ppl you knw brings a better value than ads also provides for a better landscape for monetization, engadement, etc.
Some of the other considerations to factor in the algorith for page creation should be
1. User usage patterns: If the user doesnt logon freq and hasnt developed the stickiness, we should prioritize UUMK instead of Ads since that provides more value for the user to revisit the page
2 History ad freq: If a user logs in multiple times a day and have a pretty dense friends graph, we should prioritize ads
3. CTR and impressions: user personalized ads and events on these ads. Based on past behaviours, followed posts, demographics we can use AI to understand if the specific ad content is useful and relevant
4. Real time - Another dynamic variable is time of day and current events. For example, it might make sense to render ads for Personalized gifts around Mothers day or Valentines day, Ads during night time/liesure time browsing.
Given there are multiple variables that need to be considered by the algorithm to determine the content, I would design this to be a dynamic AI based rule engine optimized by different ranking and relevance engines. Also, the success of these decisions should be monitored by metrics. Another key metric we need to be mindful of, while rendering ads is cannibalization. We dont want to adversely impact the users experience and move away from the core value proposition