12/36
Part 2 of 5 · Stages and retrievalLearn and do

Two towers learn from whole trips

Airbnb's embedding-based retrieval learns two models: one for the query and one for the listing.

Query towerListing tower
inputlocation, guests, length of staypast engagement, amenities, guest capacity
outputa query vector, every searcha listing vector, once a day, stored

The score is how close the two vectors are.

Airbnb's 2025 retrieval model is a standard two-tower network (1 source). The listing tower reads features of the home, such as past engagement, amenities and guest capacity. The query tower reads the location, the number of guests and the length of stay.

The training pairs come from user trips (1 source). A trip groups the searches of a guest who booked, by location, number of guests and length of stay. The booked home is the positive. Each pair puts it against another home the guest saw on that trip and didn't book.

The negatives matter more than the architecture. Random homes made the task too easy and the model worse (1 source). A random home is usually in the wrong city at the wrong price, and the location filter already handles that. The homes this guest considered for this trip and passed on teach the model what set the booked one apart.

The system led to a statistically significant gain in overall bookings in an A/B test (1 source).

In the editor, write trip_pairs(trip, booked): the booked home paired with every other home the guest saw on the trip. A trip is a list of pages, one per search, so a home can show up on more than one page, and it still pairs only once.