Thanks for joining us on 'This is My Architecture.'
My name is Will, I'm from AWS
and I'm joined here today by Elie from Ounass.
Welcome, Elie.
Thank you for having me.
So Elie, tell us a bit more about Ounass and what you guys do.
Sure. So Ounass is a luxury ecommerce company,
a part of Al Tayer.
We focus on delivering great customer experience
with a high degree of personalization.
Great. I see a really interesting architecture here,
and you used it to solve an interesting challenge.
Can you tell us a bit more about the challenge
that you solved with this architecture?
Sure. So in order to provide personalization for our customers,
we've built an item based recommender system
that uses clickstream data.
Yep. And I see here that you have state machines,
and you have a few machine learning services.
What do you do with state machines here?
Sure. So my state machine consists of three steps.
It's a whole workflow that manages data pulling,
training, and serving out my model.
And this whole workflow
is triggered periodically by an EventBridge rule,
so that the model is always refreshed.
Great. So I'm assuming that the three stages
are a projection for the machine learning lifecycle.
So the first one is, can you tell us a bit more about the first stage?
Sure. So the first stage is the training step.
So in this step, we have a Lambda function that's invoked.
And this is going to query Athena,
which is going to pull browsing data of our customers from the lake,
it's gonna process it, remove outliers, and so on.
And it's going to push the results into an S3 bucket
that's going to be used in production.
Great. So in the first stage, you preprocess your data
and prepare it for the next stage,
which is training a machine learning model.
So what happened here? What happens in the second stage?
Sure. So when this step is done,
a SageMaker training job is triggered,
and this is going to read from this S3 bucket, the browsing data,
so that we train a Word2Vec algorithm
using the BlazingText container by SageMaker.
Great. So why did you decide to use SageMaker
instead of something like EC2, for example?
So essentially, SageMaker streamlines
the whole model training and model deployment workflow,
and has capabilities to monitor the endpoint behavior and so on.
And why BlazingText as an algorithm?
Yeah, sure. So I used the BlazingText container by SageMaker,
which had the Word2Vec algorithm,
and Word2Vec was used here to pull item representations
as vectors of all of our items or our catalog,
so that we can provide like,
similar items in terms of vector proximity,
Great. Then you finished training, and you saved your model in an S3 bucket,
what happens after that?
So after that,
the last step is a SageMaker deployment job,
in which, SageMaker takes care of configuring an endpoint
and then deploying it into production.
Great. And I see a browser here.
This is where the user is interacting with the SageMaker model,
so what happens from the browser all the way back to the model?
Sure. So when the endpoint is deployed,
as users browse through the platform for Ounass,
they will go through product pages.
And when they go through certain product pages,
a request is triggered
and calls API gateway.
Then what happens, API gateway is going to invoke a Lambda function,
that's going to request a recommendation from the endpoint,
and get the recommended items back,
which is then going to be served into the front end
as recommendations for the user.
So, since SageMaker is giving you an endpoint,
why do you use API gateway here?
Sure. So API gateway is going to streamline both the authentication,
and routing of the requests into several endpoints by SageMaker.
So essentially, it makes it easier for me to both handle security
and manage the different API's that I have under the hood.
This is great. I also understand that testing and evaluating
recommendation engine or recommendation models
can be a bit challenging.
So how did you go about testing your model?
So what we've done is that we collaborated with the CRM team
and we launched an A/B test that had a duration of about two weeks.
And we had two groups:
a control group, which was served recommendations
based on the most popular items,
and the test group
in which we served the recommendations
that were based on this Word2Vec algorithm.
And we've observed at the end of that duration,
an uplift of 0.6% of the conversion rate between the two groups.
So thanks for sharing this. What's next in this project?
Sure. So the model that we've deployed
is going to have a hard time to handle the cold start problem.
So the new items to our catalog.
So what we're planning to do is we're planning to enrich it
by including a recommender system that's based on images,
and another one that's based on product description,
and make a hybrid workflow
that's going to leverage all of these three data sets.
This has been fascinating.
Thanks for joining us today, and thanks for sharing your architecture.
Thank you for giving me the opportunity to share my work.
Wonderful.
Thanks for joining us in 'This is My Architecture.'
We hope you enjoyed it.