How Lights Online increased CVR |READ NOW
Interactive Product Search Engine: Insights from a Machine Learning Engineer
Tyler Hutcherson
February 17, 2022

Interactive Product Search Engine: Insights from a Machine Learning Engineer

Product recommendations are everywhere in ecommerce. However, at Skafos, we’ve taken a unique approach to assisting the online shopping journey. If you’ve experienced any of our recommendation widgets in the wild, they are unlike others you’ve probably seen elsewhere. Watch this video to learn more.

We’ll spend the rest of this article exploring exactly HOW we provide interactive product recommendations from the ML Engineer’s perspective.

The right tool for the right job

Say you were trying to buy a new vacuum cleaner. A recommendation algorithm designed to get shoppers to fill up their cart with additional products might recommend a new vacuum filter, an extension cord, a Swiffer, or a matching broom. On the other hand, an algorithm designed to find visually similar vacuum cleaners will recommend alternatives that just look similar.

What’s also true is that the vacuum merchant may have different customer satisfaction goals adhering to their established brand.

Recognizing that the world of ecommerce is changing and also exploding, we’ve intentionally designed our recommendation system to be flexible, based on the goals of the merchant and quality of the training data.

The Search Engine

Our AI backend system is built as a product search engine, combining results from many models in parallel. Based on your “likes” (i.e. upvotes) and “dislikes” (i.e. downvotes) accumulated in a given shopping session, the frontend widgets use our ML API to make search requests with your explicit preferences.

For example, below is our “Product Finder” where you can upvote and downvote products as they flip, narrowing in on recommendations.

Another example is our “See Similar” widget that allows you to find similar products with one click.

On the backend, we have machine learning models that score products based on visual, text, or metadata similarity, as well as models for overall popularity, and frequently-bundled recommendations. On a search request, each individual model ranks the entire product catalog from most to least relevant based on the different facets described above.

Each model produces a “score” stored in item-wise vectors. Each value in the score vector represents a specific product/item in the catalog and its “score”. Higher scores are better (meaning a product is more relevant for a particular shopper). See example results from two arbitrary models, A and B, below:

Now the magic happens. Score vectors from each model are summed as a linear combination.

How are the model weights determined? Well… that’s our secret sauce. It’s also a constant work in progress. However, for some widgets, we may only care about visual similarity. For others, we may care only about popular products, or products frequently purchased together. The weighting is designed to be flexible. For applications where a mix of models is used, we start with a reasonable baseline for each shop. Then, over time, we start to adjust/tune the model weights based on interaction data and desired business outcomes.

After aggregating the product results, post-search filters are applied, final scores are normalized, and the response is returned to the client in under 300ms.

In summary, our product search engine gives ultimate flexibility to the merchant and agency to the shoppers. Want interactive product recommendations based on visual similarity, or some custom/magic combination? We can do that for you.

In a future post, I will share about specific technology choices and tools on the backend that allow us to provide recommendations in real-time.

Hero photo by Jan Antonin Kolar on Unsplash

About the Author

Tyler is a Machine Learning Engineer at Skafos, helping Shopify merchants convert more traffic with interactive recommendations. Try our Shopify app with a 14-day free trial.