Katkat

Design personalized discovery recommendations

PerplexitySoftware Engineer · Onsite

Last updated

This problem evaluates your ability to design a scalable, real-time recommendation system that balances personalization with content discovery in an information-seeking environment.

Design a Personalized Discovery Feed for Perplexity

Perplexity seeks to implement a 'Discovery' feature—a personalized feed of suggested topics, trending questions, and deep-dive articles tailored to each user. Unlike a static news feed, this system must integrate with the existing search infrastructure and adapt to evolving user interests.

Functional Requirements:

  1. Provide a personalized feed of items to users on the home screen.
  2. Incorporate both global trends (what everyone is reading) and individual interests (past search history).
  3. Support low-latency retrieval (sub-100ms) to ensure a seamless experience.

Non-Functional Requirements:

  1. Scalability: Handle millions of daily active users.
  2. Freshness: The system should reflect breaking news or trending topics within minutes.
  3. Diversity: Avoid 'filter bubbles' by introducing serendipitous or discovery-oriented content.

Your Design Should Address:

  • Data pipeline: How do you collect and process user signals (clicks, dwell time, follow-ups) at scale?
  • System Architecture: Define the Candidate Generation, Scoring/Ranking, and Re-ranking stages.
  • Cold-start: How do you serve a new user with zero history?
  • Evaluation: What metrics would you track to measure the success of the discovery feed?

Hints

Hint 1

Consider a two-stage approach: a broad retrieval phase to narrow millions of items to hundreds, followed by a computationally expensive ranking phase.

Hint 2

Think about how to balance 'exploitation' (showing what the user likes) with 'exploration' (showing new categories to prevent tunnel vision).

Hint 3

Address the feedback loop by explaining how real-time interaction logs are fed back into the training data pipeline.

Follow-up questions

  • How would you modify your ranking model if the discovery feed needs to prioritize high-authority sources over clickbait?
  • If the system suddenly experiences a massive spike in traffic due to a major global event, how would you prevent the ranking model from overloading?
  • How would you design an A/B testing framework specifically for a discovery system where the primary goal is user engagement vs. search precision?