Search Ranking
the platform's search ranking is a two-sided marketplace problem, which fundamentally changes the design compared to traditional search: you're not just optimizing for the guest, you're simultaneously optimizing for host satisfaction, marketplace liquidity, and long-term platform health, and these objectives regularly conflict. I'll work through business and ML objectives, system architecture, data and features, modeling, infrastructure, evaluation, and robustness.
Solution Walkthrough
Business Objective
The core business objective is to maximize the number of successful bookings (meaning completed stays where both guest and host are satisfied) subject to marketplace health constraints. A naive formulation would be "rank listings to maximize booking conversion rate," but that's dangerously incomplete. If we rank purely for conversion, bookings concentrate on a small set of high-quality, well-reviewed listings while the long tail of newer or niche listings starves. This creates a death spiral: new hosts can't get bookings, they leave the platform, supply shrinks, prices rise, guests leave too. The ranking system is the single highest-leverage point in the marketplace because it directly controls which hosts get business and which guests find what they're looking for.
So the real business objective is three-dimensional. First, guest satisfaction: help guests find listings that match their needs quickly, reducing the number of search sessions before booking and minimizing post-booking cancellations and complaints. Second, host fairness: ensure that similarly qualified listings receive proportional exposure, that new hosts get enough visibility to bootstrap their business, and that the system doesn't systematically favor certain host demographics or listing styles over others. Third, platform revenue: maximize total booking value and long-term marketplace growth, not just short-term conversion. These objectives tension against each other constantly, and the ranking system must navigate that tension explicitly rather than pretending it doesn't exist.
One more critical constraint worth calling out: trust and safety. The ranking system has to integrate signals about listing quality, accuracy, and safety. A listing with gorgeous photos but consistently poor reviews about cleanliness, or a listing whose description doesn't match reality, should be demoted regardless of how well it converts. Booking a listing that disappoints the guest is worse than not booking at all, because it damages long-term trust in the platform.
ML Objective
At its core, this is a learning-to-rank problem. Given a search query (defined by location, dates, number of guests, and any filters the user has applied) and a set of candidate listings, produce an ordering that maximizes the probability of a successful booking. The primary label is whether the guest actually booked a given listing from the search results, but this label is extremely sparse. Roughly one to three percent of search sessions result in a booking, and even within those sessions, the guest typically viewed dozens of listings before choosing one. This sparsity is the fundamental challenge.
To handle it, we frame the problem as multi-task learning with a hierarchy of engagement signals. The densest signal is impressions (which listings the guest scrolled past. Next is clicks) which listings caught their attention enough to open. Then contact events, where the guest messaged the host. Then booking requests. And finally, completed stays with positive reviews. Each level provides progressively stronger signal about listing quality but with progressively fewer examples. Our model needs to learn from all of these simultaneously, with booking as the primary objective and engagement signals as auxiliary tasks that provide gradient signal even in the vast majority of sessions where no booking occurs.
The model must also handle position bias, the fact that listings shown at the top of results receive more clicks simply because they're more visible, not because they're better. If we train on raw click data without correcting for position, the model learns a self-reinforcing loop: top-ranked listings get clicked more, which makes the model rank them higher, which makes them get clicked even more. We need to either model position as a confounding variable and remove its effect, or train on data where position has been randomized. I'll detail our debiasing approach in the modeling section.
Key Concepts
Unlock Full Solution
Get access to the complete walkthrough, key concepts, summary, and follow-up questions.