How Zomato Uses Machine Learning (2024)

  • Last updated August 24, 2021
  • In

Zomato saw 3x improvement in its 'feature store' service compared to last year

  • Published on August 20, 2021
  • by Amit Raja Naik

How Zomato Uses Machine Learning (1)

How Zomato Uses Machine Learning (2)

How Zomato Uses Machine Learning (3)

Lately, Zomato has been taking the internet by storm with intriguing posts like the independence day ‘not accepting orders anymore‘ or super friendly notifications reminding you to order food from its platform like never before. That is just one side of the coin. On the backdrop, Zomato has been experimenting with various machine learning models to provide personalised experiences to its customers, driver-partners and restaurants.

Today, many consumer-focused brands are trying to understand customer preferences in real-time and offer personalised experiences. It requires surfing through the data lake, creating useful machine learning models, and deploying them in production. For instance, Swiggy had created a heatmap feature (showcasing demand areas) for its delivery partners, which helped them know where to go next after delivering the food or grocery orders.

Zomato uses ML to predict a lot of challenges in real-time, including last-mile delivery of food orders, allocation of delivery partners, estimation of time for restaurants to prepare food, grooming of delivery partners, assessing fake reviews, etc. “Solving these unknowns helps us provide better customer experience and improve business metrics by either reducing costs or increasing the revenue,” says Ram Singla, VP of Technology at Zomato.

Founded in 2008, Zomato offers services like restaurant discovery and reviews, home delivery, online table reservation, digital payments when dining out, etc. It also works with restaurant partners to provide tools to engage and acquire more customers while empowering them with last-mile delivery services, alongside a one-stop procurement solution, Hyperpure, for ingredients and kitchen supplies.

The company currently has about two lakh+ merchants or restaurant partners, one lakh+ delivery partners and has completed close to 10 crore+ deliveries. It is present in over 23 countries. Recently, the Zomato IPO hit the primary market, and in two days, it witnessed an oversubscription of 4.18 times by retail investors. In FY21, the company made 86 per cent of its operating revenue from food delivery services which stood at INR 1,715 crore.

Join our editors every weekday evening as they steer you through the most significant news of the day, introduce you to fresh perspectives, and provide unexpected moments of joy

Your newsletter subscriptions are subject to AIM Privacy Policy and Terms and Conditions.

Here’s how Zomato uses ML

In its latest blog post, the food delivery giant Zomato unveiled its secret ingredients of machine learning. It said it uses a simple equation of three variables — input, brain, and output, via ‘model training’ and ‘model prediction’ techniques. Meaning, if the output and input are known, the process of figuring out the brain is called model training. If the input and brain are known, the method of computing the output is called model prediction.

How Zomato Uses Machine Learning (4)

(Source: Zomato)

Once the team deploys the model to production, it creates a ‘model server’ to make predictions via remote APIs (application programme interface). Then, using these APIs, they make ‘model predictions.’

“As you deploy more ‘model servers,’ you evolve your ‘ML runtime,'” says Singla. He says this formalises the model training and deployment process, thereby increasing the team’s cadence, leading to faster turnaround time, more experimentation, and better models.

Secret sauce

Zomato’s ‘ML runtime’ consists of four essential components: feature compute engine, feature store, model store, and model serving API gateway.

In addition to this, it supports two types of features based on frequency — real-time features and batched features.

At Zomato, real-time features are computed using event streams published on Apache Kafka and are processed in real-time by stream processing engine Apache Flink. These are later stored in an online feature store powered by Redis Cluster. On the other hand, batched features are computed using Apache Spark and are stored in their offline feature store DynamoDB with new features getting cached in Redis Cluster.

Experiments

Early this year, Zomato’s machine learning team load-tested its ‘feature store’ to a maximum throughput of around 18 million requests per minute, both in terms of performance and latency. Surprisingly, this led to a 3x improvement in its ‘feature store’ service compared to last year.

Zomato converts all its production models into a standard format using MLFlow. The team believes that this helps to decouple and makes it possible to write tools that work with models from any ML library without integrating each tool with each library. The ML libraries can be TensorFlow, PyTorch, LightGBM. or sci-kit-learn, etc.

In terms of model deployment, Zomato leverages cloud with Kubernetes. Most of Zomato’s models are tuned for inference on CPU rather than GPU, and to further optimise the cost, the team uses spot instances in its Kubernetes cluster. “This setup of ML on Kubernetes has helped us adapt and scale the model, serving across multiple production models, with ease,” says Singla.

Zomato’s ML API gateway is written in Golang, primarily used to remove coupling at the client-side so that the specific logic sits within the gateway. “Generally, when we re-deploy a retrained model or a new model to the same problem, our API requests to the ML API Gateway do not change,” explains Singla.

That has helped the team deploy and experiment models frequently, with minimal effort. ML API Gateway executes a directed acyclic graph of tasks. It has native support with its ‘feature store,’ where the gateway is responsible for fetching features for the model based on the request from the ‘feature store’ as specified in the model plan. That has reduced its time to deploy a model to production to less than 24 hours.

Conclusion

With the help of a small team of data scientists, ML engineers and data engineers, and ‘ML runtime’ in place, Zomato has built several machine learning models to solve multiple challenges in real-time. Few of them include menu digitisation, personalised homepage restaurant listings, increase in GMV and AOV, predicting food preparation time (FPT), enhancing road detection, active driver-partner dispatch, driver-partner grooming audit and compliance, and more.

Amit Raja Naik

Amit Raja Naik is a seasoned technology journalist who covers everything from data science to machine learning and artificial intelligence for Analytics India Magazine, where he examines the trends, challenges, ideas, and transformations across the industry.

Download our Mobile App

How Zomato Uses Machine Learning (6)

How Zomato Uses Machine Learning (7)

How Zomato Uses Machine Learning (8)

How Zomato Uses Machine Learning (9)

How Zomato Uses Machine Learning (10)

How Zomato Uses Machine Learning (11)

How Zomato Uses Machine Learning (12)

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

3 Ways to Join our Community

Telegram group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox

Recent Stories

Mustafa Suleyman Joins as the New CEO of Microsoft AI

The former co-founder of DeepMind and Inflection AI will be heading the consumer AI products

Apple Finally Unveils MM1, a Multimodal Model for Text and Image Data

“I have not seen this level of details from a big tech’s whitepaper for a

Yotta Receives India’s First Cluster of 4,000 NVIDIA H100 GPUs

Yotta revealed the arrival of 4,000+ NVIDIA H100 Tensor Core GPUs at its NM1 data

Oracle Launches Java 22 and Confirms JavaOne 2025 Return

Oracle also announced the return of JavaOne to the San Francisco Bay Area in 2025.

How NVIDIA’s Project GR00T is Accelerating Humanoid Robots

NVIDIA, a powerhouse in accelerated computing, now aims to redefine humanoid robotics with its innovative

Stability AI Releases Stable Video 3D, Generating 3D Videos from Single Images

Stable Video 3D blurs the lines between 2D and 3D content creation.

In 5 Years, Coding will be Done in Natural Language

And the role of programmers is going to be very different.

Google Research Introduce PERL, a New Method to Improve RLHF

The paper introduces PERL, a method using LoRA for efficient training of language models with

Keras 3.1.0 Release Introduces Key Updates for Optimised AI Development

The Keras 3.1.0 update introduces enhanced model optimisation and flexibility, streamlining AI development for developers

How Zomato Uses Machine Learning (2024)
Top Articles
Latest Posts
Article information

Author: Zonia Mosciski DO

Last Updated:

Views: 6198

Rating: 4 / 5 (71 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Zonia Mosciski DO

Birthday: 1996-05-16

Address: Suite 228 919 Deana Ford, Lake Meridithberg, NE 60017-4257

Phone: +2613987384138

Job: Chief Retail Officer

Hobby: Tai chi, Dowsing, Poi, Letterboxing, Watching movies, Video gaming, Singing

Introduction: My name is Zonia Mosciski DO, I am a enchanting, joyous, lovely, successful, hilarious, tender, outstanding person who loves writing and wants to share my knowledge and understanding with you.