Instacart Spotlight: Search Team

Instacart has millions of products across hundreds of stores in thousands of zip codes. There’s a team that powers the little-white-search-bar at the top of your screen on Instacart.com. They help you sift through the results and make sure you get what you want even when you make a typo.

What is the search team — what do you guys do?

Brandon: The search team is responsible for making sure our customers can find what they’re looking for. We take all of Instacart’s catalog data and display it to customers on the site and apps. If you look at Instacart’s home page, 90% of it is product data and that data comes through the Search team. Our team is running behind the scenes every time a customer browses by aisle or department, performs a search or uses the autocomplete feature. We are also responsible for the Search Product and Experience itself on both the website and native mobile apps.

Sharath: To do our job better, we must understand our products and users better. And we must do this at scale and often in real-time so we can deliver the best experience either in response to an explicit search query or by recommending contextually relevant products.

Search Bay Bridge

What are the various roles on the search team?

Jon: The search team has a pretty full stack and full organization approach to everything. We touch all parts of the code, from the UI and implementing it through the apps and also controlling the backend in our search cluster. Everything that we build is cross-functional and we actually integrate with more teams than most because we touch both the backend components of the catalog and partner teams and the customer and shopper facing front ends.

Brandon: In many companies, the search team is just a back-end team and only works on queries and algorithms. We are a little different in that we work full-stack. We are working on product, changing the ways customers actually interact with us, working on the search and making searches better on the back end and using data science to help predict what people are looking for and what they want. We integrate it the whole way through. More recently, some of our team has developed their mobile expertise and we’ve been able to do this in the native apps as well. We have a fully integrated team — we have iOS, Android, design, data science, full-stack engineering — we have one person that can do everything.

How much impact is search impacting the business?

Vincent: Most of the time, people may think that search is just a little text box on the screen. However, in fact, that small chunk of screen can result in a major part of our orders which makes a huge impact on our business. Our research indicates that among our returning customers, more than half of them will use the search experience rather than browsing to find their items. On the other hand, search experience also plays an important role for first time customers because the the first search experience has a strong impact on the retention rate for those new customers.

What’s the most popular query?

Sharath: Bananas, eggs, milk. We have even seen users just type organic, perhaps expecting to see everything organic.

Vincent: The top queries is one of the most interesting things search team work on to help our customers to discover new things. Like Microsoft’s Cortana and Google’s Google Now, the modern search engines not only work in a reactive mode, but also proactively suggest the users what to search. In Instacart, we have data on people’s interests in grocery shopping, our search team can rely on that big data and keep innovate to enable our customers to discover hot and popular items, catch the trending of grocery shopping and even magically find some potential items which fits their needs well.

Search Team Ice Cream

You guys get the answers of what people are looking for. How are you sharing that with the rest of the company and why is that so valuable?

Brandon: One of the recent things that we started doing is tracking which searches people are searching for frequently but never finding what they want. We created a tool that the business development team can use to go back to our retail partners to share that information. For instance, people were always searching for batteries, but Target didn’t have batteries on their Instacart storefront. Ryan from our BD team shared this data with Target and now Target lists batteries on Instacart so our customers can find them and get them delivered. We can help retailers with what they need to show on their site to fulfill customers’ wants and desires better.

Jon: Separating false positives from false negatives. Fixing common misspellings isn’t as simple as basic letter distance searching. For example, when users search “red bell”, “red bull” should not appear. The spelling is close, but the user actually wanted the vegetable. We prevent red bull from appearing in these search results by training our autocorrections from user behavior. Conversion data is used throughout the site in several features to better rank search results.

Sharath: The vocabulary that people use to describe what they want doesn’t necessarily match the descriptions for product they are trying to find. In some cases, it’s obvious like eggs and search results is eggs. But if people type “Thanksgiving” or “Valentine’s Day” in the search box, it is unlikely all relevant products have those the query words as part of product description. Translating user interests/intentions to what product they might be looking for is another problem.

Jonathan: Recently, we started realizing that a lot of users use the search bar to dig into our site features. For example, they’ll search for special requests or order history or they’ll be in one store and then search for another store to switch context and we are adding features to facilitate that flow. We never want a user to hit a dead end where they type in a search and end up with a blank page.

search-ferry

No one else in the company has the insights you are able to get. Why is it so important to retailers and to our company?

Damon: We can gather specific insights about the way users shop — from what they searched for and ultimately added to cart to the frequency at which they reordered an item. This information is unique to the online shopping experience and provides our retailer partners with a deep understanding of how the behavior of in-store versus online customers may differ. With this feedback, retailers can better anticipate things like inventory replenishments. For Instacart, the more we learn about the way our users shop, the better we can tailor and personalize their experience to help them find what they need in a quick and effortless manner. If a customer is searching for a term that matches an item they’ve previously purchased, we can surface that item higher in the results. The guiding principle for the search team is to provide a rich and intuitive experience from presenting the exact items you’ve searched for to recommending items based on your shopping preferences.

Raj: From a retailer’s POV, they don’t usually get this information in a real brick-and-mortar store. In a real store, when 10 people are looking for 10 different things, maybe one of them might talk to a store associate and that associate is not writing it down or telling anyone, so those inquiries are basically lost. So if the customer is looking for something, like batteries, and it’s unstocked, the store will never know about it and there will be a low probability of restocking it until the store manually checks its inventory. Whereas on our site, when people look for batteries, stores will know that instantly because customers tell us what they’re looking for specifically (by typing it in). We then save and share that info with the retailer, along with information about how many people looked for that item and when. That is incredibly valuable and the more we can differentiate ourselves from a real store, the better.

Sharath: Our site also has the capability to type in free text. Let’s say you are like 90% of users who want meat cut in a certain way, that sort of stuff may come out via a query. Another way users can share how they want something is by typing special notes on items, like “fruit ripe enough to consume later this week”

Vincent: From an efficiency point of view, online store supports search is one of the major reasons that online shopping is much faster. From finding the items you need to sorting similar items by brands, price or deals, search allows you to complete the whole shopping experience in minutes. Saving customers’ time in grocery shopping is one of our missions. Retailers can also reach users who are more price or diet conscious by promoting relevant content on the store front.

Raj: There is a huge advantage shopping online over going into a brick & mortar store. We can not only do regular search, but can help personalize your search as well and in essence every user gets their own store.

search-walking-bridge

When customers browse the store, are the first items that people search typically added to their cart?

Brandon: For brand new customers, they tend to start by browsing first. They look at the departments and aisles to try to figure out what they want. Existing customers almost always go straight to search. There is a large, interesting opportunity for us to do a better job figuring out what the customer is looking for and to present a completely customized storefront to help them out.

Raj: It almost feels like search is a button or a switch. Once they start using it, they see how much more powerful it can be over browse because sometimes you don’t know what departments certain items will be in.

Jon: Browse also hides a lot of our products, so a lot of people think that the browse experience shows 100% of our catalog. It’s almost detrimental that people try to find their stuff only through browsing departments. Whereas with search, if it doesn’t show up, chances are it’s not in our catalog.

Can you share the evolution and speed of how search started in the beginning to where it is now?

Brandon: When we first started, we implemented Search in the most basic way possible. We would take a customer’s search and split it up and try to match it again anything in our catalog and bring those results back. If you were searching for “chickpeas” and the product was called “garbanzo beans” in our catalog, you did not find what you were looking for. After a little while we noticed that search was not good and it was the #1 complaint from our customers. We had a live dashboard of searches by users and it would update with number of results and what product the user chose. We could watch our users in real time search for something and not find it — how frustrating! Andrew Kane, who is now on our Logistics team was the one who rebuilt our search engine using a more sophisticated product called Elasticsearch. We’ve continued to build on that as we saw features that customers needed — automatically fixing misspellings for example. In the early days, we had a very small team of 2–3 working on the entire catalog, search & parnter experience. As we’ve grown we’ve been able to focus and invest on Search Experience since it’s so important to the overall customer experience on Instacart.

Jon: It’s important to know that we also use the search service as a caching layer. We do all our data processing before putting it into search and making it available. So like search isn’t just a search. The search infrastructure is also a caching layer and an item retrieval. There’s discreet searches, called filters, where you find an object or you don’t. Then there’s a waited search, which includes a score and that’s how we rank things. Now the ranking is kind of a combination of both how relevant your search team is and how we weighted personalization and other factors.

Brandon: If you compare how much our Search product has changed in the first three years of the company versus the last six months — the last six months wins hands down. One of the more recent investments we’re making in Search is personalization. Here’s an example: people tend to buy a lot of meat at Costco, so that department would previously always live at the top of the Costco marketplace. Now for someone who is a vegetarian and will never ever buy meat that’s a bad experience and we should show move a different department to the top (produce, perhaps?). By personalizing how we rank departments and aisles we created a better experience for our customers; and that in turn helped our business as customers were able to find what they were looking for more quickly.

What’s the relationship with other internal partners, like the catalog team?

Jon: I think of search as a consumer of catalog. We don’t actually control what products necessarily end up in the search index, but we control how it’s surfaced to the end user, our customers.

Sharath: At this point, we work very closely with consumer and shopper teams. Perhaps more so than we do with the catalog team. The catalog team tells Search what products are available and what the product information is, then we store the index and we work with the consumer and shopper teams to figure out how best to bring it to our users and shoppers.

Raj: We do rely on catalog for a few pieces of information. 1) Availability, whether the item is in or out of stock. 2) Item name, which would need to be accurate 3) brand name 4) aisle name. All these need to be correct in order for search to function correctly. Otherwise, users will just see random results.

Damon: Search is a powerhouse tool that is an integral part of the experience for various teams. The partners team, for example, maintains a suite of promotional products for brands to advertise special offers like deals or featured items. Customers discover these promotions not only from the browse experience but also through search. We want to ensure that these offers are surfaced through relevant search terms and can co-exist harmoniously with organic results, taking into consideration things like item ranking. With any items that are added to an order, our shoppers ultimately have to pick them and get it delivered to the customer. Working with the shopper team, we made recent improvements to the special request flow, a feature that allows customers to request an item not in our catalog, to help shoppers understand the request and locate the item faster.

search-hanging-bow

What’s a focus you have now?

Sharath: We have a focus on speeding up search. Classic ecommerce is where you buy may be a couple of products over several visits across many sites. but with groceries people who buy more and more often. If you are searching twice for everything you want to buy, you can end up doing dozen of searches in thirty minutes. If we can save ½ a second on each search, we can save users a lot of time. We can also choose to ‘reinvest’ that time in making improvements to search results. The other thing is improvements presentation of search results. One test that went against our hypothesis — we had search results clustered by aisles and ran a test where we took out the aisles and just ranked by product relevance. But taking out aisles did much worse. It just so happened that what he had in place was better than what we were proposing. So we are constantly testing out user behavior to see how we can improve the experience.

Damon: We’re constantly testing assumptions and it’s a perfect example of how tenacious we are. We don’t shy away from experimenting and being wrong about things. That’s how you figure out the best user experience and make continual improvements. One of our focus is to move towards a greater degree of personalization. Whether you are browsing or searching, the experience is customized — the items are curated based on your order and browse history. We can be much smarter about the recommendations we make from items based on a previous purchase to companion items.

Raj: We’ve run a lot of experiments in the last 12 months.

Jon: A lot of experiments!

What are some things like auto-complete, or other things you are working that impacts conversion?

Sharath: Things like auto-complete now is what users just expect because it’s a standard experience across sites and apps. Search queries are different because they are often about products where people use words that we don’t typically use and spell correctly.

Brandon: We used to see people search zucchini, spell it three different ways, and not find any results because it was spelled wrong each time. Now we can automatically correct that spelling.

Sharath: Brand names are particularly hard too.

Jon: Another thing is between stores, the product offering is different. If you search one store for tempeh, it doesn’t mean that tempeh exists in another store. So we do a lot of reformulations to make sure tofu shows up in cases where tempeh is not available.

What are three words that describe your team?

All: Curious, Ambitious, Innovative

What’s the future of search?

Jon: We are pushing the limit of open source at this point on what’s available.

Raj: Smarter search. People should be able to search cheapest eggplant rather than just eggplant and then figure out which is the cheapest. We need to continuously incorporate complex user preferences to sort and present results without them having to spell it out each time.

Sharath: Relative to your standard search engine where there are hundreds of thousands of results per query, in our case, we may have up to 100 in some cases. But it is important to save time for the user.

There is so much more to Instacart that you have contributed to. What are some examples?

Raj: Whenever any of the employees have some knowledge that others can find useful and learn something new, employees just schedule it and share what they know. For example, I shared a training session on 1Password. That’s a great part of our culture. Even though it’s not strictly work related, people are always wondering how they can add value to other people’s lives because ultimately that’s how Instacart as a company will grow.

Jon: Tuesdays at 12 pm I give classes on how to make Espressos.

Raj: We have biweekly Show & Tell meetings on Fridays with the entire Catalog team. It’s incredibly important to showcase our work outside of the search team. We get to share how we use our catalog to improve search and vice versa. In our Engineering All-Hands meetings, we also get to share what improvements were made last month, and then we share those slides with the whole company after so everyone knows what the search team is working on. We aren’t just silo’ed in a box.

Jon: One thing that you have to do as a team is share the technology stack with the other engineers so they are cognizant of what you are doing. When I first got here, there was a pretty big void of understanding in what Elasticsearch could do, what it was as a technology. We’ve done a good job to propagating the knowledge out so the rest of the engineering team understands how it works. We do this through Engineer lunches or even something incredibly informal like going over to someone’s desk and helping them get Elasticsearch up and running.

Since this spotlight was recorded, Angadh Singh joined the team as a data scientist focusing on improving Instacart’s recommendation and personalization algorithms.

We’re actively looking for Data Scientists and Engineers who are interested in helping our customers find what they’re looking for.