How Wing gets you the perfect Thai food every time, at scale
By: Karan Kanwar
Tags: AI, Startup, Delivery, Assistant, Wing

An anonymized request from Wing AI’s beta group

For those of you who don’t know, Wing is the world’s first assistant that you can truly count on. Whatever you ask of us, as long as it’s legal and possible, we are able to get done. If you’re interested in learning more about Wing, and perhaps signing up to use Wing, head on over to https://getwingapp.com :-)

Now, on to the problem at hand. Getting the perfect Thai food! You might be thinking, what? How hard could it be? Just Google Thai food and pick the first one. While yes, that is probably the easiest option — it is also probably the easiest option to ruin trust with a user we’ve so far worked very hard to build trust with. Which is why Wing takes these tiny things very seriously. Our internal goal with these sorts of things is to create such an amazing experience for the customer, that they become an advocate of Wing.

Here is how we handled one particular request about Thai food, taking a very high-level look at some of our systems. Wing has many more proprietary systems, tools, machine learning models, exclusive data sources and partnerships that work in tandem to ensure quality and deliver amazing experiences, built with hundreds and hundreds of developer-hours. Though, here is what I can share! If you’re interested in working on problems like these or learning more about all the other advanced projects at Wing, consider emailing us with a copy of your resume.

Step 1. Understanding the problem landscape

Wing creates a hypothesis in response to all user requests. Our AI Engine, in concert with our Data Ingestion Engine, and Knowledge Graph already understand that we’re talking about a Delivery, of type Food, of type Thai.

Using our Knowledge Graph, Wing is able to understand attributes that are unique to Food Deliveries, as well as custom attributes that are relevant to Thai food. We know which partners to enlist, and which data sources to use. We also recognized the food items requested by the user in this particular case. To the left, we’ve included a representation of what our Knowledge Graph data structure somewhat looks like.

If there is a pre-written handler for this task, we will leverage this to handle the coordination and execution of the task (in a more complex case where we do not have a skill available, we can also rely on our Deep Learning systems that extrapolate actions to be taken in response to a particular task, learned from data from our expert human assistants)

Step 2. Learning about our options

Once we have generated a hypothesis, we have to get a little more specific and figure out exactly how to get the task done. That means, figuring our which restaurant, and the logistics of the point A to B delivery. In order to do this, we leverage the hypothesis we’ve created to get data. Our Data Ingestion Engine grabs data from a variety of identified sources and creates one complete data object about the problem domain. In this case, we are able to extract a list of Thai restaurants, complete with addresses, reviews, and traffic all from multiple sources — within a reasonable delivery radius to the user, automatically filtering out anything below 3 stars. In a similar way, we repeat this process with our own internal systems and locate partners capable of handling such a delivery. We currently have a partnership with a national delivery service provider that we leverage by default for on-demand services like this.

Step 3. Choosing an option

This is where things start to get interesting! The user in question has used the app for a fair amount of time, and we obtained written permission to use elements of their data anonymously to showcase their experience here. With that said, here’s our methodology behind choice-

Our Knowledge Graph, over time, creates a 3-dimensional representation of your sensitivity towards price, value, and quality. In the beginning, all of our users start off at (0,0,0) as represented in the 3-dimensional plane on the right- and as they begin using the service, our systems analyze their speech, merchant choices, and choices of products/items, to carefully update their position in this 3-dimensional plane.

This particular user’s position on this 3-dimensional plane is represented in the graph on the left, along with a red line indicating deviation from the beginning (0,0,0) state. That particular red dot represents high values for price & quality, and a lower value for value. This is quite typical of more lavish spenders, e.g. buying more expensive items/services on average, even if a comparable item can be found for a lower price point.

In practice, we also consider many other sensitivity analyses that are captured and updated over time, that can grow to be represented on large n-dimensional planes. (For the nerds here, our team is aware of the possible bottlenecks here, and are working on dimensionality reduction!)

From these analyses, our handlers are typically able to further filter the options we have on hand. In the case of the price/value/quality analysis, filtering down to the highest in quality and price options in order to satisfy the user’s constraints. Goodbye 4 star and single dollar sign restaurants…!

In addition, our Knowledge Graph surfaces the fact that we know that the user, in this case, is actually Thai! This is apparently something we learned when the user asked us to ship something to her parents’ home in Thailand. One of the rules associated with the Food context in our Knowledge Graph, is the fact that Food of the person’s own background should typically be more authentic if such an option is available. To the left is a graph displaying what this might look like in terms of how a selection is made from a weighted average. Our system, in practice, uses many other knowledge attributes to rank user preferences in a multitude of ways and uses another machine learning-based method to cluster and weigh which recommendation to make.

Finally, we select the option that looks like it meets the user’s needs the best. Though, with that said, our product team has also paid attention to the way in which some people tend to outwardly display wealth, but, when alone, are fine with lower quality/price options. We are in the process of testing this theory by, for some users, including a suggestion that is nearly opposite to the suggestion we’d recommend based on their normal behavioral trends.

For the purpose of demonstrating, I just replicated that request on Wing, as pictured to the right, to show just how quick and easy that was (and looks!) to the user, despite the complexity behind the scenes.

And that is how Wing gets you the perfect Thai food every time, at scale! Just a little more complicated than Googling for the first Thai food place!

If you thought that was interesting, please Follow Wing on LinkedIn to stay tuned for updates.

Or Learn more & Sign Up at https://getwingapp.com