The Swiggy delivery personnel that arrived at your doorstep was most probably selected by an AI after taking into consideration multiple different parameters. “It is almost an existential necessity because there are a lot of hard problems, which actually require the use of AI/ML,” Vijay Anand Seshadri, senior vice president and engineering fellow at Swiggy, said.

With a presence in more than 500 cities in India, Swiggy fulfils nearly 1.5 million orders per day. On December 31, 2022, Swiggy’s ML Platform was executing more than a million ML predictions per second. Not only that, Swiggy’s data platform was processing more than 10 million events per minute. 

In this exclusive interview with Analytics India Magazine, Seshadri discusses how Swiggy harnesses the power of data analytics and AI/ML, potential use cases of ChatGPT, Large Language Models and AR/VR technologies among other things.

Please tell us about the role of data and analytics in the engineering team’s decision-making process? 

Vijay: There is a lot of emphasis on the data science modelling and the tooling available for analysts to be able to do their job, which is actually very important. But what I feel is often missed in making that function very effective for a business is the preparatory work that goes long before you get to analytics. Do we have standardised methods of collecting data from the marketplace or do we have the right governance practices in terms of ensuring data quality?

A lot of time is spent in making sure that you understand the data. You understand how it is modelled. You understand the intricacies of why some columns are null in some cases and why they are populated with certain fields. And this means that you might start having a lot of tribal knowledge in your company. So what we have been doing is trying to move away from that model, where we have a set of tools and processes that standardise the way we collect data.

For example, we have a mechanism called continuous data capture that allows us to continuously replicate the production state into our data warehousing boundaries. And the advantage of this is that you can apply what we call quality gates. This helps us ensure that by the time it gets to the analyst, that there is good confidence that the data is fresh, reliable and in a format that is easily consumable.

Besides, we have also built an online analytics system internally which allows us to monitor key business metrics at a zone level. On a near real time basis, a lot of the ground conditions change. So we have built a business alerting tool, which is hyperlocal and allows analysts to take action according to the changing ground reality.

How does Swiggy use AI/ML to improve the customer experience and drive business growth? 

Vijay: When a customer opens our app, one of the things that we show to the customer is for each restaurant is the estimated delivery time. Now if you look at the process of generating this value, we can neither be conservative or aggressive. If we conservative and the estimated time of delivery is too high, the customer might not place the order. Similarly, on the flip side, if the time is too short, it could lead to a bad customer experience. Hence, it’s critical to strike a balance and it’s a very hard problem.

To derive the time shown, the model takes into consideration the driver fleet capacity near that particular restaurant, the driver’s waiting time at the restaurant, the preparation time taken by the restaurant ( which also varies depending on multiple factors) and also the last mile delivery, which is the distance from the restaurant to the customer’s home. Factoring in all these parameters, the models come up with the most accurate time.

Similarly, we also use AI/ML to understand the customer’s search intent. We need to have a more topical intelligence on our menu and items on our catalogue, like, for example, we have built a food intelligence platform that is able to associate different types of ingredients with different menu items. 

A customer might search for home style cooked food or something bland, for all these things, you actually need to have an extra layer of intelligence that says how do we categorise items in the catalogue so that we have these food intelligence attributes. This is another example of how AI and ML are very critical for us to give the right customer experience.

Furthermore, AI/ML is also used when it comes to driver assignment. When an order is actually placed, we have to assign an order and this turns out to be a multivariable optimization problem. Because we have to balance multiple different objectives for that. It’s not just the nearest driver to the restaurant. We all have to look at cost, we have to look at customer experience meaning you have to balance delivery time. ??We also have to make sure that we are balancing out the earnings across our driver fleet right so this is another hard problem where I think we use a lot of the machine learning and AI models. 

How does Swiggy plan to continue to innovate and advance its use of AI/ML?

Vijay: There are innumerable applications where we can actually improve the experience for all the partners in the ecosystem. So for example, one of the other areas that we have been exploring is on both image processing as well as face detection and recognition sort of capabilities. 

Another area that I think is not explored that well is around quality controls. It’s very important for us because the food actually is delivered as promised, which means there is no foreign object detection or any kind of tampering. Hence, I believe especially around image processing, voice recognition, there’s a lot of areas where I feel that there is a lot of scope for us to improve.

Further, we would also like to bring a more hyper-personalised experience to our customers. We have improved a lot in this regard, but we would like to improve in this aspect as well. AR/VR could have potential use cases for our DineOut. It’s important for customers to understand the ambience that a restaurant offers. If a customer is able to actually experience and visualise this, it would be really interesting, but these are very early stages.

Does Swiggy plan to use ChatGPT-like chatbots?

Vijay: Conversational intelligence is a key aspect when it comes to customer support. It is important to note that customer support is not necessarily restricted to consumers. It has a huge potential when it comes to things like driver support. We also have restaurant partners who might interface with us, so overall given that there are so many parties in our marketplace, I think a charge GPT like Solution could be quite effective. Besides, if you look at the language models they are oriented towards English but I think there is also scope for building language models that are for the regional languages used in India. 

What are the challenges faced by the engineering team while implementing AI/ML at Swiggy?

Vijay:  One of the first challenges we encountered was the diversity in data sources. This might look like a very mundane problem, but we operate hundreds of micro services in production and a lot of them have their own data stores, stored in different formats etc. To overcome this, we developed the Continuous Data Capture tool that allowed us to capture the data. 

The second stage was really trying to build a data lake that allowed us to have different views of the data that is being collected, because there is an analytical view and then there are also data science use cases. So the data processing pipeline had to handle all of these use cases supporting both ad hoc analysis as well as machine learning analysis and this was a challenge.

The third challenge was to have a common model that we can uniformly use across multiple different domains. We have multiple domains and to produce the data in such a way that we have a very consistent model that we can expose is a challenge, and there is still work going on, it is not a solved problem yet. How do we ensure that we can semantically understand the data easier is an area where we are exploring some solutions.

The post Behind the Scenes: What is Swiggy Hungry For? appeared first on Analytics India Magazine.