Anatomy of an online shopping AI system

Klevu helps over 3,000 brands use data and machine learning to improve product search.
article cover

Francis Scialabba

· 3 min read

Whether you’re typing “PlayStation 5,” “Dyson Airwrap,” or “Taylor Swift on vinyl” into a retailer’s search bar, algorithms help make holiday-shopping wishlists a reality.

Using machine learning, natural language processing, and purchase data, an algorithm can connect your query to the results and, for better or for worse, also decide more products to recommend.

  • This behind-the-scenes tech helps fuel the $4.2 trillion global industry that is online shopping.

For Black Friday, Emerging Tech Brew talked with Nilay Oza, CEO and cofounder of Klevu—a finnish tech company that fuels smart search for 3,000+ brands, including Puma, Avon, and ColourPop. Klevu was founded in 2013 and has raised ~$18 million to date.

Inside the algorithm

The company’s algorithm has a few different components to it, but it all starts with linguistics.

First up: offline processing. Once Klevu gets access to a store’s catalog, it uses natural language processing to add richer, fuller descriptions of each product for the machine’s benefit. That means adding linguistically relevant synonyms or annotations (think: adding “outdoor furniture” or “oak wood” to the description of a garden bench).

  • For instance, if you’ve got your heart set on a new pair of combat boots, for the best chance of relevant search results, that item would also need to be tagged with keywords like “shoes,” “leather,” “zip-up,” and the like.

Eventually, the catalog expands by 2x–3x, Oza said, all thanks to natural language processing, strategic synonyms, and annotations.

Next up: query processing. Say you’ve got a budget for that pair of combat boots, and you’re searching for a pair either around $100 or under $100—two very different searches.

  • “As humans, it is very easy for us to understand that the intent is different—how do you make software understand?” Oza told us. “That’s what we do.”

Part of it comes down to language rules that a machine can analyze and use as go-to shortcuts—like the fact that in the English language, if there are two nouns in a row, the second one is typically the “primary subject,” Oza said.

Stay up to date on emerging tech

Drones, automation, AI, and more. The technologies that will shape the future of business, all in one newsletter.

  • Exhibit A: If you’re looking for a waist belt to go with your combat boots, it’s a lot more likely you’re primarily looking for a belt, not a waist.

Where does ML come in?

Primarily after you press Enter on your search. Either you click on the combat boots, exit the site, or start searching something else—and, sort of like Big Brother, the ML algorithm is watching.

Oza told us Klevu keeps data store-specific (even if two retailers are owned by the same parent company). It typically tracks a shopper’s IP address—and “nothing else,” Oza said—from session to session, and notes what they view, click on, and purchase. That information then influences the products recommended to others with similar behavior.

  • Since the algorithm’s training data comes from user behavior, and it’s store-specific, it typically takes about 30 days for the algorithm to learn enough to make the best possible recommendations.
  • The company also asks retailers for historic sales data to arm the algorithm with some info in getting started, Oza explained.

And it all comes back to natural language processing in the end—if you search a less-common term and then click on a product, the term you used will be added to the catalog to help make future results more relevant to others.

Bottom line: What you search for, click on, and buy today are making our algorithmic overlords ever-smarter—and, in theory, better at selling you stuff. So watch your wallet.

Stay up to date on emerging tech

Drones, automation, AI, and more. The technologies that will shape the future of business, all in one newsletter.