FAANG | Ads (Top K relevant) Design Interview Question
Anonymous User
985

Problem: Showing top K ads to the user.

How does the system decide which ads to show:

  • User context (location, recent searches, user preference etc..)
  • Ads context (Ads popularity, ads budget/fees, ads age etc)
  • Ads relevance = Match score between ads context & user context.

Assume you already have a Relevance system that provides ads relevance score (1(lowest match)-10(highest match)). You get following top K+Y (say 100) records from Relevance system and you need to decide which Top K (say 10) to display to the users.

Example: Relevance system output (5 records
Ad1: Relevance score=10/10 and Fee=1
Ad3: Relevance score= 9/10 and Fee=3
Ad2: Relevence score=7/10 and Fee=100$

You job is to find out Top 2 ads to display to the user. What algorithm do you use here ?

Notes:

  1. If you give weightage to Relevance score, then you loose your profit as a company.
  2. If you give weightage to Fee, then you may loose your customers because you show lower relevant content.
  3. Problem is to balance between this ? What potential algo can be used here ?
Comments (3)