Part 4 of 5 · Position bias and evaluationLearn and do
Interleaving puts two rankers on one page
An A/B test on bookings needs a lot of traffic. Interleaving compares two rankers on the same page.
Predict
Two rankers take turns filling one page, A first, and both rank L4 at the top. The guest books L4. Which ranker gets the credit?
Ranker A ranks A1, A2, A3, and ranker B ranks B1, B2, B3. One page takes turns: A1, B1, A2, B2, A3, B3. If B2 is booked, this search counts for B. When both rankers want the same listing, the one whose turn it is places it, and the other adds its next best on its own turn.
Interleaving merges two rankers' lists into one page for the same search, then checks whose listings get booked. Airbnb wrote about it in 2022:
It credited interleaving with a 50x speedup over an A/B test on the same traffic (1 source).
It assigns credit by bookings, a downstream action, near the end of the guest's path (1 source).
It's the main evaluation step before the A/B test (1 source).
The A/B test decides
An A/B test splits guests at random between the old ranker and the new one. Measure uncancelled bookings, with cancellations, host declines, ratings and latency as guardrails. Airbnb's tests typically run for three weeks.
When offline and online disagree, which one Airbnb round asked about directly (1 report), suspect the offline set first. It may re-rank only logged results, carry position bias in its labels, or use a label that isn't the objective.
In the editor, write interleave(a, b), the page the two rankers build by taking turns, and credit(team, booked), the ranker a booking counts for. team maps each listing on the page to the ranker that placed it, "A" or "B".
Pick an answer above to see the rest
Instructions
1
Write interleave(a, b): A first, the rankers take turns adding their best listing that isn't on the page yet. A ranker with nothing new skips its turn. Return the page and who placed each listing.
2
Write credit(team, booked): the ranker that placed the booked listing, or None without a booking.