Design Zillow’s “Homes for You” personalized real estate search system that ranks listings by each user’s preferences and browsing behavior. When a user searches for homes in a city, the system must go beyond simple price and size filters to personalize the ranking: a user who repeatedly views Craftsman-style houses with large yards in quiet neighborhoods should see similar listings first, while a first-time searcher gets a diverse, high-quality mix.
The system must handle cold start for new users, respect hard constraints (price range, location, beds/baths), avoid showing the same listings repeatedly, and balance relevance against inventory freshness, because a listing that went live an hour ago matters more than one that has been sitting for 90 days.
How would you design this system? Cover the candidate generation and ranking funnel, the user preference signal extraction from browsing behavior, how you handle cold start for new users, the feature set (listing attributes, user history, contextual signals), and the online and offline metrics.

The Problem: two million active listings, one ranked list, and a shopper whose real preferences (Craftsman, big yard, quiet street) exist only inside their click history. Everyone with the same filters currently sees the same order.
Answer
The design is a four-stage funnel: strict hard-constraint filtering, multi-source candidate generation, a learned personalized ranker, and a slate re-ranker that enforces diversity, freshness, and seen-listing decay. Personalization never widens or narrows the legal candidate set. Filters behave like a contract, and learning only reorders what already matches. Two decisions carry the design. First, preferences are extracted as a weighted implicit-feedback profile over listing attributes plus a short in-session view sequence, where a contact-agent event counts far more than a click. Second, cold start is a ramp, not a switch: market-quality priors give way to session signals and then to the full profile as events accumulate. A compliance guardrail sits above everything, because housing personalization is regulated and protected-class proxies cannot be features.
(1) Hard Filters First: price, beds, baths, geo polygon, and listing status are strict boolean predicates in the search index, so a personalized model can never hide a listing the user explicitly asked for.
(2) Multi-Source Candidate Generation: union of filter recall (recency-ordered), two-tower ANN retrieval on the user embedding, and co-view/co-save item-item lookups seeded by the session, giving roughly 500 candidates.
(3) Preference Signal Extraction: event weights (contact 10, save 5, long dwell 2, click 1, hide -3) roll up into a decayed attribute-affinity vector plus the last 20 viewed listing embeddings.
(4) Learned Ranker: gradient-boosted trees over ~200 listing, user, context, and cross features, trained on a multi-objective label dominated by save and contact events rather than raw clicks.
(5) Slate Re-Rank: diversity caps per style and block, a bounded new-listing boost, and a seen-decay penalty turn point-wise scores into a slate a human enjoys scrolling.
(6) Cold Start Ladder and Guardrails: market-quality priors and explore slots for new users, and a feature allow-list plus a neutral-ranker kill switch for Fair Housing compliance.

Figure 1: The funnel: strict filters define what is legal to show, three retrieval sources decide what is worth scoring, the ranker orders it, and the re-ranker shapes the slate. Behavior events flow back through the feature store into both retrieval and ranking.
Clarify Before Designing:
(1) Surface and Scale: is this the in-session search results page, the logged-in “Homes for You” home feed, or the daily email? Each has a different latency budget and a different amount of user history available.
(2) Filter Semantics: are price and beds hard constraints or soft preferences? If a $520k home may appear for a $500k filter, the whole candidate layer changes.
(3) Objective: do we optimize saves and agent contacts (monetizable intent) or dwell time? The label choice dictates which behavior the model amplifies.
(4) Freshness Requirement: what fraction of new listings must receive impressions within 24 hours? This is a marketplace supply guarantee, not a modeling detail.
(5) Compliance Constraints: which features are off-limits under Fair Housing rules, and does the audit require identical candidate sets for identical filters?
(6) Data Availability: how much logged-in traffic exists versus anonymous traffic, and can we key profiles on device for anonymous users?
Leave a Reply