Fellow Data Tinkerers!
You’re looking for a place in San Francisco on Airbnb. Over a few evenings, you open dozens of listings and keep narrowing the options. Those clicks tell Airbnb what’s caught your eye for this trip. The places you’ve booked over the years show which options you went ahead with.
Airbnb’s old search model had summaries such as how many trips you’d booked and the average price of listings. Those figures could describe your history in a few numbers. The team wanted the model to learn from the order of the events themselves. But the question was
How could Airbnb use years of bookings and days of browsing to rank a search while you’re waiting for the results?
If you’re new here, Data Tinkerer breaks down how teams build and use data systems. Refer 1 person to the newsletter and you’ll unlock a library of 100+ resources for learning data science, engineering and analysis.
The library has videos, courses and projects. You can filter by tool (Python, SQL, Spark and more), skill level, provider and whether the resource is free or paid.
Back to San Francisco. A single search may draw on years of guest history, and the guest might run several searches while planning one trip. Let’s get to how Airbnb worked out how much of that history to keep and where in the system to do the work of reading it.
TL;DR
Situation
Airbnb’s search ranker relied on hundreds of hand-built features to summarise guest behaviour. The underlying history contained years of bookings and reviews, along with a much larger volume of listing views.
Task
Use long-term preferences and recent browsing to improve the order of search results while keeping training and live search practical.
Action
Airbnb used a Transformer to encode two event windows into a guest profile. It reused the encoder’s work across several searches during training and gave the live ranker a profile prepared in a daily batch job.
Result
In Airbnb’s live search tests, the model using both windows delivered 0.82% more uncancelled nights booked and 0.55% more guests with an uncancelled booking. Airbnb reported both gains as statistically significant.
Use Cases
Personalised search ranking, personalised email recommendations
Tech Stack/Framework
Transformer, TensorFlow, unified embedding
Explained further
Give a booking and a listing view different shelf lives
A listing view is easy to generate. A guest might click a place they intend to book, or open several tabs to get a feel for prices. Bookings are rarer, and Airbnb wants search to help guests choose a place. If the team capped the total number of events, a busy stretch of browsing could squeeze out the older bookings the model was supposed to learn from.
Airbnb separated the inputs into two windows:

Airbnb chose the caps so that only about 2% of sequences would be cut short. The limits keep individual histories manageable even when a guest has opened hundreds of thousands of listings. To represent the retained events, the model draws on a common set of features. It uses a shared embedding table for identifiers with many possible values, including listing and host IDs, and represents locations at multiple geographic levels.
Train on several searches with one pass through the guest’s history
Suppose the San Francisco guest runs three searches, with listing views in between. Each search needs a different snapshot of the guest’s history. Airbnb could encode the history separately for each search, but then earlier events would be processed again whenever the guest ran another query.
The Transformer can produce a useful snapshot at each step. A causal mask limits each step to the current event and the ones before it. For example, the searches at times 4, 7 and 10 take their guest profiles from the encoder outputs at times 3, 6 and 9. Those profiles are embeddings, vectors that summarise the guest’s history up to that point. Airbnb can run the encoder once and give each search the right vector.

Airbnb also cut work that came from making batches uniform. It grouped histories of a similar length so shorter ones needed fewer empty positions to match their batch. It then sent only actual searches to the ranker, skipping the empty search slots. Together, these changes raised training throughput to roughly four times what it had been.
Prepare the guest profile ahead of the search
The heavy work happens in a daily batch job. Airbnb runs the encoder for guests who have generated new events and saves the resulting embeddings. When a guest searches, the live ranker looks up the saved embedding and uses it alongside the current query to score the candidate listings.

If you change the dates for San Francisco, the ranker sees the new dates on your next search. The listing you opened a minute ago can feed into the saved profile at a following refresh. That’s how Airbnb brings years of activity into a live search without running the Transformer over the guest’s full history on every request.
What Airbnb found in three rounds of search testing
Airbnb rolled out the changes in three stages. For each live A/B test, it randomly assigned guests to the current or new model and kept each guest in the same group throughout the test. The team tracked bookings and watched for unwanted effects using guardrail metrics. It also tested rankings offline using Normalised Discounted Cumulative Gain (NDCG), a score that rewards putting listings guests went on to book higher in the results.
Airbnb started with the long-term history alone, using events such as bookings and reviews to build the guest profile. Compared with the existing system, the offline ranking score rose 0.44%. In the live test, 0.31% more guests made an uncancelled booking and listing views rose 0.38%.
Next, Airbnb added 21 days of listing views to the guest profile. With both windows, the offline lift reached 1.48% over the original system. In the live test, 0.55% more guests made an uncancelled booking, uncancelled nights booked rose 0.82%, and listing views rose 0.90%. Airbnb reported all three live gains as statistically significant.
For the third stage, Airbnb changed how listings were scored. The setwise ranker scores each listing in the context of the other candidates returned for the same search. Airbnb trained it jointly with the guest encoder. That stage added 2.3% to the offline ranking score, bringing the reported improvement across all three stages to 3.78%. In a separate live test for this stage, uncancelled reservations rose a further 0.28%.
Airbnb used the same guest embeddings to rank listings in promotional emails. It reported 5.04% more email clicks, 0.16% more guests with an uncancelled booking and 0.23% more uncancelled nights.
Where can old history and fresh clicks work together?
Job recommendations: Past applications can show the roles someone has been willing to pursue. If they’ve applied for analyst roles before but spent this week opening analytics engineering jobs, recent views can help the job board pick up on that shift sooner.
Online shopping: Past orders can help a supermarket surface the staples someone buys every week. If they’ve been browsing cake tins and decorating supplies, the shop can also suggest things they might need for this particular order.
The full scoop
To learn more about this, check Airbnb’s Engineering Blog post on this topic
If you are already subscribed and enjoyed the article, please give it a like and/or share it others, really appreciate it 🙏
Keep learning
How Lyft Uses AI to Scale Translation Across 150+ Products
Lyft rebuilt its localisation pipeline to support Québec compliance, European expansion and translations across 150+ services.
The system combines fast LLM drafting, reasoning-based evaluation, glossary-aware prompts and human review to reduce translation latency from days to minutes.
This piece breaks down how Lyft made AI translation production-ready with retries, placeholder protection, prompt versioning and locale-specific tuning.
How Pinterest Used Multimodal AI to Help Millions of Shoppers
Pinterest turned billions of products into 4.2 million shopping landing pages and improved search performance by 35%.
Behind that was a content-first system built to understand product images and metadata, compress noisy attributes into a usable vocabulary and match products to topics across a massive catalog.
This piece breaks down how Pinterest used vision-language models, contrastive learning and distributed inference to make products easier to discover.




