Skip to main content

Classic design · Mid

Similar listings on vacation rental platforms

Classic interview design. Key points: session-based item2vec, negative sampling, ANN, and real-time personalization.

14 min read · Content reviewed on October 23, 2026

Short answer

Classic interview design. Key points: session-based item2vec, negative sampling, ANN, and real-time personalization. According to the source, search ranking and the similar-listings carousel together account for 99% of booking conversions.

01 · CONTEXT

The problem: similar listings and personalized search

According to the source, search ranking and the similar-listings carousel together account for 99% of booking conversions.

The core idea is to treat a person's sequence of actions as context, the same way word embeddings are trained from sentences. The result is listing vectors learned from search sessions, which make it possible to measure similarity between listings.

The case brings together machine learning systems e busca, and is divided into: training vectors from sessions, adapting the training to the marketplace, serving similar listings and personalizing search in real time.

02 · SESSIONS AND TRAINING

From clicks to vectors

The training data is click sessions. Each session is an unbroken sequence of listing ids clicked by the same person, and a new session starts whenever there is a pause of more than 30 minutes between two consecutive clicks.

Training uses negative sampling: the vector of the central listing is pulled closer to the vectors of the listings clicked before and after it, within a window, and pushed away from randomly drawn listings.

Each listing becomes a vector of 32 real numbers, which encode location, price, type, architecture and style. The source justifies the size as a balance between offline performance and the memory needed to store the vectors in the RAM of the search machines, for real-time similarity computations.

The reported scale is vectors for 4.5 million active listings, trained on more than 800 million click sessions.

03 · ADJUSTMENTS AND EVALUATION

Adapting the training to the marketplace

First adjustment: in sessions that end with the listing being booked, the booked listing is added as global context, so that at each step the training predicts not only the clicked neighbors but also the listing that ended up being booked.

Second adjustment: searchers tend to stay within a single market. As a result, the positive contexts are mostly from the same market, while the randomly drawn negatives are mostly from other markets. This imbalance led to suboptimal within-market similarities, and the fix was to add negatives drawn from the central listing's market.

VarianteHow it was trained
RegularNo modifications to the original embedding algorithm.
Booking as global contextWith bookings as global context.
Global booking and market negativesWith bookings as global context and explicit negatives from the same market.

New listings have no vector because they were not in the training data. The source creates the vector as the average of the 3 closest geographic neighbors that already have an embedding, of the same type and in the same price range as the new listing.

In the offline evaluation, cosine similarities are computed between the vectors of the clicked listing and the candidate listings, the candidates are ranked, and the position of the booked listing is observed. The variant with booking as global context and market negatives had a lower average position and outperformed the other two.

  1. The diagram starts with the click and booking log.

    Architecture diagram: Listing embeddings training
    DBClick and booking log
    CPSession assembly
    CPEmbeddings training
    DBListing vector store
    CPNew-listing vector
    CPOffline evaluation
  2. Sessions are assembled from clicks; a new session starts when there is a pause of more than 30 minutes between two consecutive clicks.

    Architecture diagram: Listing embeddings training
    DBClick and booking log
    CPSession assemblygroups by pause
    CPEmbeddings training
    DBListing vector store
    CPNew-listing vector
    CPOffline evaluation
  3. Training pulls the central listing's vector closer to the surrounding clicked listings and pushes it away from randomly drawn listings.

    Architecture diagram: Listing embeddings training
    DBClick and booking log
    CPSession assembly
    CPEmbeddings trainingrandom negatives
    DBListing vector store
    CPNew-listing vector
    CPOffline evaluation
  4. In sessions that end in a booking, the booked listing is added as global context, and training gains negatives drawn from the central listing's market.

    Architecture diagram: Listing embeddings training
    DBClick and booking log
    CPSession assembly
    CPEmbeddings trainingbooking and market negatives
    DBListing vector store
    CPNew-listing vector
    CPOffline evaluation
  5. A new listing gets the average vector of nearby geographic neighbors that already have a vector, of the same type and in the same price range.

    Architecture diagram: Listing embeddings training
    DBClick and booking log
    CPSession assembly
    CPEmbeddings training
    DBListing vector store
    CPNew-listing vectorneighbor average
    CPOffline evaluation
  6. The offline evaluation ranks the candidates by cosine similarity to the clicked listing and observes the position of the booked listing.

    Architecture diagram: Listing embeddings training
    DBClick and booking log
    CPSession assembly
    CPEmbeddings training
    DBListing vector store
    CPNew-listing vector
    CPOffline evaluationbooked listing's position

04 · SIMILAR LISTINGS ON THE PAGE

Serving the similar-listings carousel

Each listing page has a carousel of similar listings that recommends comparable listings available for the same dates. At the time of the embeddings test, the existing algorithm called the main search ranking model for the same location and filtered by price range and type.

With the vectors, a listing's similar listings come from the cosine similarity between its vector and the vectors of all listings in the same market available for the same dates, when check-in and check-out are set. The 12 with the highest similarity appear in the carousel.

In the A/B test, the solution based on nearest neighbors in the embedding space increased the carousel CTR by 21% and led 4.9% more guests to discover, in the carousel, the listing they ended up booking.

  1. The diagram starts with the listing page.

    Architecture diagram: Similar-listings carousel
    CLListing page
    CPSimilar-listings service
    CPCosine neighbor search
    CHIn-memory vectors
    DBMarket and availability
    CPMain ranking (previous approach)
  2. Each listing page has a carousel that recommends comparable listings available for the same dates.

    Architecture diagram: Similar-listings carousel
    CLListing page
    CPSimilar-listings serviceasks for similar listings
    CPCosine neighbor search
    CHIn-memory vectors
    DBMarket and availability
    CPMain ranking (previous approach)
  3. The similar listings come from the cosine similarity between the listing's vector and the vectors of all listings in the same market available on the same dates.

    Architecture diagram: Similar-listings carousel
    CLListing page
    CPSimilar-listings service
    CPCosine neighbor searchcosseno
    CHIn-memory vectors
    DBMarket and availabilitysame market and dates
    CPMain ranking (previous approach)
  4. The vectors are kept in the memory of the search machines, for real-time similarity computations.

    Architecture diagram: Similar-listings carousel
    CLListing page
    CPSimilar-listings service
    CPCosine neighbor search
    CHIn-memory vectorsvectors in RAM
    DBMarket and availability
    CPMain ranking (previous approach)
  5. The 12 listings with the highest similarity appear in the carousel; in the A/B test, the carousel CTR rose 21%.

    Architecture diagram: Similar-listings carousel
    CLListing page
    CPSimilar-listings service
    CPCosine neighbor searchhighest similarities
    CHIn-memory vectors
    DBMarket and availability
    CPMain ranking (previous approach)
  6. The algorithm that existed at the time of the test called the main search ranking for the same location and filtered by price range and type.

    Architecture diagram: Similar-listings carousel
    CLListing page
    CPSimilar-listings service
    CPCosine neighbor search
    CHIn-memory vectors
    DBMarket and availability
    CPMain ranking (previous approach)compared algorithm

05 · REAL-TIME PERSONALIZATION

Using the vectors inside search ranking

For each user, the source maintains in real time, with Kafka, two sets of recent events. One holds the listings clicked in the last 2 weeks. The other holds the skipped ones, defined as highly ranked listings that the person skipped in favor of a click at a lower position.

On each search, 2 similarity measures are computed for each candidate. EmbClickSim uses per-market centroids of the clicked listings and takes the maximum similarity; EmbSkipSim measures the similarity to the skipped listings.

Both measures enter as additional signals in the search ranking model. In the partial dependence plots, higher EmbClickSim leads to a higher model score and higher EmbSkipSim leads to a lower score.

In this architecture, it is worth thinking about message queues for the user events and about cache for the recent history.

  1. The diagram starts with the search client.

    Architecture diagram: Real-time personalization in search
    CLSearch client
    QUser event stream
    CHRecent user history
    CPSearch service
    CPSimilarity computation
    CHListing vectors
    CPSearch ranking model
  2. For each user, the source maintains in real time, with Kafka, two sets of recent events.

    Architecture diagram: Real-time personalization in search
    CLSearch client
    QUser event streamKafka
    CHRecent user historytwo sets
    CPSearch service
    CPSimilarity computation
    CHListing vectors
    CPSearch ranking model
  3. One set holds the listings clicked in the last 2 weeks; the other holds the skipped ones, that is, highly ranked but skipped in favor of a click at a lower position.

    Architecture diagram: Real-time personalization in search
    CLSearch client
    QUser event stream
    CHRecent user historyclicked and skipped
    CPSearch service
    CPSimilarity computation
    CHListing vectors
    CPSearch ranking model
  4. On each search, 2 similarity measures are computed for each candidate: with the clicked ones, using per-market centroids and the maximum similarity, and with the skipped ones.

    Architecture diagram: Real-time personalization in search
    CLSearch client
    QUser event stream
    CHRecent user history
    CPSearch service
    CPSimilarity computationEmbClickSim and EmbSkipSim
    CHListing vectors
    CPSearch ranking model
  5. Both similarities enter as additional signals in the search ranking model.

    Architecture diagram: Real-time personalization in search
    CLSearch client
    QUser event stream
    CHRecent user history
    CPSearch service
    CPSimilarity computation
    CHListing vectors
    CPSearch ranking modelnew signals
  6. The partial dependence plots showed that higher EmbClickSim raises the score and higher EmbSkipSim lowers it.

    Architecture diagram: Real-time personalization in search
    CLSearch client
    QUser event stream
    CHRecent user history
    CPSearch service
    CPSimilarity computation
    CHListing vectors
    CPSearch ranking modelexpected behavior

After a successful online experiment, the feature was launched to production in the summer of 2017, according to the source.

Frequently asked questions

What is Similar listings on vacation rental platforms?

Classic interview design. Key points: session-based item2vec, negative sampling, ANN, and real-time personalization.

What does the Similar listings on vacation rental platforms design cover?

It is organized in these sections: The problem: similar listings and personalized search, From clicks to vectors, Adapting the training to the marketplace, Serving the similar-listings carousel, and Using the vectors inside search ranking.

How long is Similar listings on vacation rental platforms and what level is it?

It takes about 14 minutes to read and is rated Mid level.

Now design it yourself

Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.