>> You're not going to want to miss this episode of the AI Show.
We talk about building recommender systems with my friend Miguel,
who lives in beautiful Spain.
Make sure you tune in.
[MUSIC]
>> Hello and welcome to this episode of the AI Show.
We're talking all about building recommender systems with Miguel.
Miguel, How are you doing, my friend?
>> Very good, sir.
Thank you for having me.
>> Fantastic. Tell us about yourself. What do you do?
>> I'm a Data Scientist in Microsoft,
working on different areas in the company I started in Azure,
and recently I was moved to Xbox to gaming.
>> Fantastic. Recommender systems. Tell us the details.
>> I feel like there is
a massive opportunity that
never happened before in history until now,
and it's about recommendation systems where we can really
build a strong relationship with customers.
I was thinking about this quote from Henry Ford,
and he's one of biggest innovators, and he was saying,
you can have a car of any color as long as it is black, he said.
This is actually pretty similar
to what we have in the Internet right now.
All the pages are the same for everyone.
This quote was from 100 years ago.
Now in the Internet,
we have the same thing, and then, on the other hand,
we have a personalized service,
which is what you get when you enter a store.
I remember a story when I was going to get married.
I had to get a suit,
and I went to the store and there was this guy,
and he looked at me like this and then he said, this is the size.
Then he'd grabbed a suit,
and I tried it and he was perfect.
I remember I was with my father and
I said, let's try another one,
and the guy brought another one and it was like no,
it was the first one. The guy was amazing.
We were out in 30 minutes but the thing is,
this is the perfect personalized experience
you have in a day-to-day,
but this person can only get 10 or 20 customers fair day maybe.
We have a recommendation system.
The idea is we can scale to thousands of customers.
Obviously, a recommendation system is
not as good as a real person,
but maybe it's something in between you can
have any color you want as long as it's
black and the perfect experience.
In my opinion, that's an amazing opportunity
and something that I was thinking that Satya,
our CEO says, is it talks a lot about
empathy in the sense of understanding the customer.
He has this quote,
he says our job is to meet
the unmet unarticulated needs of our customers.
That's what unmet unarticulated.
Somehow AI solution is something
that we can understand
the customer and we can give a better service.
That's the first opportunity that I think is amazing.
Now, the second opportunity is the economic opportunity.
We have a very difficult economic situation,
high inflation, all companies are cutting costs.
We live in an environment where we need to do more with less.
Obviously, AI can help in their productivity
but if you think about AI,
we can do two things.
We can either increase the revenue or reduce the cost.
Now, the thing is,
there are many AI solutions that reduce the costs.
You can think about medical imaging
to make a better use of doctors.
Things like data configuration like DALL-E,
and all this imagination
that we're seeing that our amazing things like co-pilot.
I know you're a super fan of a copilot.
This is reducing cost, but you always have a limit.
But recommendation system, for example,
you can actually increase the revenue.
That's the key.
There is a famous report by McKinsey,
around 10 years ago actually,
they mentioned that 35 percent of the revenue of
amazon.com comes from recommendation systems,
and 75 percent of what people
watch on Netflix comes from recommendation systems.
Basically, my opinion, if you're in e-commerce,
or you're in media and somehow you're selling to B2C
to customers unit recommendation systems.
These two perspectives, I think they are quite interesting.
>> I love the two perspectives,
and it sounds like you can have your cake and eat it too.
One, you're getting a better experience for your customers.
Two, because you're getting a better experience,
you're increasing hopefully revenue.
It sounds too good to be true.
How does someone go about doing this in a reasonable way?
>> Creating recommendations is actually pretty challenging.
My team for the last four years,
I think we have built
this repository called Microsoft Recommenders is
an open-source repository where we help people build
recommendation systems on Azure.
We have a here the repository.
I'm going to show you we are sharing,
we see the screen right now.
>> Yeah.
>> Now, I would like to quickly talk
about the three main components of the content that we have here.
The three main components are the test,
the library, this is the library and the examples.
I'm going to start with a test because
one of the biggest challenges for us is being able to
maintain the library and also
being able to make the library robust enough.
When people download the library and start using library,
it works, and that's very challenging.
We have a very advanced test infrastructure
and everything is here in the content.
We have multiple categories of test.
Actually, these categories
is something that we work
with many different people in the company.
It's not only our team,
so it's people from Azure,
people from Microsoft Research,
and many other people.
We have different tests.
We are trying to really make sure that we cover all the scenarios.
Things like unit tests,
data validation to make sure that the data schema is right.
Functional tests to make sure that
the machine learning works correctly.
Integration making sure that different components
in your Azure piling works correctly.
Things like performance tests and making sure that
the solution is performing
in terms of computation time and memory,
and it doesn't change, it's always bounded.
Responsible AI test,
this is something that I'm super excited about,
how we make sure that we are enforcing fairness,
transparency, explainability and we are working
with explainability of fairness team
and Microsoft to make this happen.
Security, which is massively important for us.
Actually, the security we have
the dependence is one of the most difficult things
in these libraries that dependency.
We need to make sure that all the dependencies are
secure and pass the standards of Microsoft.
Really a lot of different tests.
Right now we are running around 900 tests per day.
>> Wow.
>> Here you can see some of them.
We have some tests that I execute when there is a pull request.
These are the unit tests and then the nightly bells.
Here you see that we have three environments,
the CPU environment, GPU, and Spark.
Here this is just one example of some of the tests.
You see here there's a good number
and you see the different Python versions.
One interesting thing that we're doing,
and this is very recent is that we wanted
to scale this set of tests,
and at the end of the day,
this is a massive envelope platform that tests everything.
We are using Azure ML to distribute tests on different machines.
For example, here what you see is a group of tests.
You see that this is actually a file and a specific test.
This is going to one worker.
There are different groups, so different groups go to
different workers and then each of them execute different tests.
Basically, we are executing everything in
parallel to make sure we are reducing the costs,
which right now is very important and we are going faster.
>> That's cool.
>> This is the tests as suite,
which is really interesting.
Now, the second thing that I wanted to
talk about is the library percent.
Let me close all of these things.
The main principle is we want to make this
very simple and very easy for people to use.
If you look at the continent is very simple.
We have actually these five folders and everything is there.
Here we have everything related to datasets.
How to load a dataset,
how to download a dataset,
and actually different datasets that we use.
Evaluation is how to evaluate.
In recommendation systems, the evaluation metrics are
different in comparison to other solutions.
We have models,
all the machine learning models that we build,
actually in the main page, in the main read me,
there is a large list of all the different models,
and with our description and example,
some of them are
external models and algorithms done by the research community.
Then the ones that have this star are done by Microsoft,
maybe by my team or maybe by
some partners like Microsoft Research and we work a lot with them.
Yeah, here you see we have around
20 different algorithms on different environments.
>> That's the second component.
Then the third component is the examples.
I think this is probably the most interesting component for
people that want to
learn about recommendation systems and want to build.
Basically, is a set of examples using Jupiter Notebooks.
Basically, we have two examples.
What we call the Quickstart examples and,
for example, here,
this is one algorithm that is pretty simple,
is very fast, is one of the algorithms that our team developed.
The idea of this Quickstart Notebook is
a very quick way of showing the algorithm.
We use one dataset.
Here you have the example of dataset.
Then we train with the split in train and test.
Then we instantiate the model,
we trained the model,
predict, and then compute the metrics.
It is very simple.
If you want to start,
if you are starting on recommendation system,
you can bring your data here,
execute this algorithm and it should work.
>> This is really cool.
You were going to say, I just want to mention.
In this repo, you have the tests that show the thing is solid,
the models that you can use,
and there is over 20.
Half of which your team or folks that Microsoft had built.
Then you have simple notebooks that show you
step-by-step process how to use them. Am I getting this right?
>> Exactly. That's the key idea.
I feel this is one of the reasons why
this library has been so successful.
Actually, there was something amazing
that happened last week actually.
For the first time, this library is
the top rated Machine Learning library at Microsoft on GitHub.
We surpassed LightGBM.
LightGBM is actually a boosting Machine library.
>> It's an important one.
>> Is very good.
In my opinion, LightGBM is a piece of art.
For people that are in AI,
LightGBM is a piece of art, is fantastic.
Being at the same level as LightGBM in terms of
popularity is an absolute honor. We're super happy.
>> Fantastic. This is something that you use
during your daily work and other people at Microsoft,
and now you're hoping other people
will use it as well. Is that right?
>> Yes, exactly.
A lot of people internally in
Microsoft are using it at different teams.
But also we worked with external teams using these repository and
actually from time to time we hire
people that they use the repository and we don't even know.
Because this is an open repository and anyone can take it.
It's funny because sometimes I
get a message from LinkedIn and it's like,
hey Miguel, I'm using Recommenders, it's super cool.
Then they may ask a question like,
hey, how can you help me on that?
From Microsoft army, I think Microsoft is
providing a good third leadership,
providing open source code so people can learn.
Also, even for our customers is good because we are creating
content that is useful to these customers.
>> I love it. If folks want to get started with Recommenders,
what is your suggestion?
Obviously go to the repository.
We're going to put a link on there,
but what would be your go do this to learn stuff?
What would you tell people to do?
>> Well, so my advice is, in my experience,
when I create AI systems,
the best strategy is to start from something that works.
That's the gist. Instead of creating something from scratch,
which is what everybody does, I will do the opposite.
This is what I will do. I will go
to one of the simple examples here.
Let's take this one and I will make sure it runs in my computer.
It should run because, again,
we have these 900 tests, so it should run.
If it is not running just let me know, but it's just run.
Then make sure that it runs.
Then what I will do is, I will come
here and I will remove this dataset.
I will put my dataset
and see if it works and then build from there, start from there.
The interesting thing is that if you follow this pattern,
suddenly you have around 20 different algorithms that you can try.
Suddenly from not having anything,
you'll have a massive suite
of different algorithms that you can try.
This is just for the Machine Learning and
we just talked about the Machine Learning but for example here,
if you want to operationalize this and deploy this model.
We have examples on how to deploy this model on Azure.
Here's one example,
you have different Azure services
and actually these notebook has two ways of deploying.
One is the batch mode where
basically you store all the recommendations in Cosmos.
Then if you want to provide the recommendations,
the only thing you do is you do a select.
Basically given an ID,
give me back the requested output.
It is like this, you see.
Given the ID, I'm just doing a query to
Cosmos and I'm returning the list of items.
This is what is called the batch architecture.
>> That's cool.
>> Then the other one is the real-time architecture when you can
load the model in memory and you can score the model in real time.
Well, there are several differences,
but here in just one notebook,
you can use it to
deploy your Machine Learning model for reproduction.
>> I love you advice of, hey,
start with something that works like take a notebook,
run it, and then start putting your data in it.
This is amazing. Thank you so much for being with us, my friend.
>> It was awesome to be here.
>> Awesome. Well, for those that are watching,
make sure you go to the repository,
I'm putting the link below so that you can take a look at it.
We've been learning all about building
a Recommender systems with Miguel,
who has made a wonderful repo
that I am going to and play with. Hopefully you will too.
Thank you so much for watching
and hopefully we'll see you next time.
Take care.
[MUSIC]