lessons from skyscanner ai from zero to production · skyscanner • powering flights, hotels and...

30
AI from zero to production: lessons from Skyscanner Konstantin Halachev • SKYSCANNER

Upload: others

Post on 09-Jul-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

AI from zero to production: lessons from SkyscannerKonstantin Halachev • SKYSCANNER

Page 2: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Using AI to rank hotels

Every business makes daily expert decisions on what to show to whom and when. Those decisions can often be improved with AI

Page 3: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

About Skyscanner

• Powering flights, hotels and car hire.

• Average 70m unique monthly visitors

• Over 70m app downloads

Page 4: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

About me

• Konstantin Halachev

• Currently an Engineering manager in Skyscanner

• Previously a Data Scientist

• Previously a PhD in Bioinformatics from MPII

Page 5: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Lessons from ranking hotels

Page 6: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Skyscanner hotel search

Page 7: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Skyscanner’s hotel recommendations

1. Business need

Goal of the user: To find a good hotel

Goal of Skyscanner: To offer users good hotels

Many ways to approach this …

Page 8: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

1. Business need

Goal of the user: To find a good hotel

Goal of Skyscanner: To offer users good hotels

Many ways to approach this …

We worked on: Which hotels are most relevant to a given user, for a given search at a specific time?

Skyscanner’s hotel recommendations

Page 9: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

2. Data

Source: https://hackernoon.com/the-ai-hierarchy-of-needs-18f111fcc007

Which hotels are most relevant to a given user, for a given search at a specific time?

Page 10: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

2. Data

• Do we have data to answer the question? ••••

• Is the data correct?•••••

• Do we have enough data?•••

Source: https://hackernoon.com/the-ai-hierarchy-of-needs-18f111fcc007

Which hotels are most relevant to a given user, for a given search at a specific time?

Page 11: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

2. Data

Source: https://hackernoon.com/the-ai-hierarchy-of-needs-18f111fcc007

Which hotels are most relevant to a given user, for a given search at a specific time?

• Do we have data to answer the question? ••••

• Is the data correct?•••••

• Do we have enough data?•••

Page 12: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

3. Evaluate

••

Assume we have a new ranking algorithm

Page 13: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

4. Ranking algorithm

Learning to rank hotels

Page 14: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

A few properties that domain experts use to order hotels

• Room price per night• Hotel location• User Rating• Hotel Stars• Hotel Amenities• City• Pictures

Page 15: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

4. Ranking algorithm

4.1 Problem representation

What the user saw and did not choose

What the user saw and did not choose

What the user saw and chose

What the user did not see

Page 16: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

4. Ranking algorithm

4.2 Exploration space

Simple vs Complex models•••

Page 17: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Gradient boosted trees

4. Ranking algorithm

4.2 Exploration space

Page 18: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

4. Ranking algorithm

4.3 Evaluation

• Is there a ground truth?

• Can we reproduce the experiment?

• Can we test with real users?

• Can we test offline?

With assumption for resorting stability

Comparison of multiple models

Page 19: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Great! We have a model, now what?

Page 20: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

SUBTITLE

Getting to production

• Continuous integration (CI)

• Continuous Deployment (CD)

• Testing

• Monitoring

Page 21: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

SUBTITLE

After being in prod. It’s not over

• Effect of latency

• Bias (e.g. self-fulfilling prophesies )

• Updating models

Source: https://papers.nips.cc/paper/5656-hidden-technical-debt-in-machine-learning-systems.pdf

Page 22: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Results

Page 23: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Start simple and iterate

Lean 3-step approach

A/A`: Ensure no harm

Page 24: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Lean 3-step approach

A/A`: Ensure no harmA/B with simple model: SuccessStart simple and iterate

Page 25: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Lean 3-step approach

A/A`: Ensure no harmA/B with simple model: SuccessA/B with more complex models: More success

Start simple and iterate

Page 26: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

One last thing

Page 27: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

A few properties that domain experts use to order hotels

• Room price per night• Hotel location• User Rating• Hotel Stars• Hotel Amenities• City• Pictures

Page 28: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

These properties were enough to offer users better hotels than a domain expert

• Price• Location• Rating• Stars• Amenities• City• Picture

Page 29: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

To summarize

• AI holds a lot of promise for businesses• Expertise, tools and materials are available• Even simple solutions can beat domain

experts. Start simple.

Page 30: lessons from Skyscanner AI from zero to production · Skyscanner • Powering flights, hotels and car hire. • Average 70m unique monthly visitors • Over 70m app downloads. About

Thank you.

Konstantin Halachev • SKYSCANNER