Zero-Shot Recommendation System for E-Commerce

Miguel Cardoso
3 min readJul 11, 2023

--

🚀 Making Recommendations Without Customer Data 🎯

In the world of e-commerce, personalized recommendations are vital for engaging customers and driving sales, clicks or any relevant goal you might have. But what if you’re starting an e-commerce application from scratch without any customer data? In this blog post, we’ll explore the power of a zero-shot recommendation system that allows you to make quite accurate product recommendations with not that much effort, without relying on customer-specific information. By leveraging cutting-edge technologies such as OpenAI’s ADA (text embeddings model), Pinecone (vector database), and Google Cloud’s Vision API, we’ll unveil a solution that delivers impressive item-to-item recommendations right out of the box. ✨

Generating Product Embeddings with OpenAI ADA Model

To measure the relatedness between product titles and descriptions, we employ OpenAI’s ada language model to generate numerical representations known as embeddings. These embeddings capture the semantic meaning of product information and serve as a foundation for building recommendations without any customer data. With ada, you can quickly generate embeddings that pave the way for accurate and meaningful product suggestions. 🔤

Fast Vector Lookup with Pinecone

Integrating Pinecone into our recommender system enables us to perform lightning-fast searches based on high-dimensional embeddings. Pinecone’s vector similarity search service allows for quick retrieval of relevant items from your product catalog, ensuring efficient recommendation retrieval even as your catalog expands. With Pinecone, you can provide accurate recommendations to your customers in real-time. ⚡️

Enhancing Recommendations with Image Similarity

Visual appeal is a crucial aspect of e-commerce. By leveraging the Vision API of Google Cloud Platform (GCP), we can take our recommender system to the next level. There are two options that we explored for image similarity:

  1. Using the Vision API Product Search: By integrating the Vision API Product Search functionality, we can compare product images and recommend visually similar items to customers. This approach diversifies the recommendations and caters to users who prefer a visually-driven shopping experience. 📷
  2. Retrieving Labels and Computing Similarity Manually: Alternatively, we can extract labels from product images using the Vision API and compute similarity scores manually. This method allows for a more fine-grained analysis of product features and attributes, enabling tailored recommendations based on shared characteristics. 🔍

Recognizing the Importance of User Data and Curated Rules

While our zero-shot recommendation system delivers impressive results without any customer data, it’s essential to acknowledge that user data and curated rules are invaluable for further improvement. As your e-commerce application gains traction and collects user data, you can fine-tune the recommendations based on actual user preferences. Additionally, incorporating curated rules and domain expertise allows you to refine the system’s ability to understand specific customer needs and preferences. 📊

Conclusion

Creating a zero-shot recommendation system for e-commerce applications is an exciting endeavor. By harnessing the capabilities of OpenAI’s ada, Pinecone’s fast vector lookup, and Google Cloud’s Vision API for image similarity, you can deliver impressive recommendations even without customer data. However, it’s crucial to recognize that as your e-commerce business grows, gathering user data and incorporating curated rules become essential for continuous improvement. With the right combination of cutting-edge technologies and user-centric strategies, your zero-shot recommendation system can evolve into a powerful tool, delighting customers and driving sales in your e-commerce journey. 🌟

Remember, the initial setup provides a strong foundation, but ongoing efforts to gather user data and refine the system are crucial to unlock the full potential of your zero-shot recommendation system. Keep iterating and delighting your customers! 🚀

Happy recommending! 💡🎉

If you are interested in a pratical tutorial, let me know!

--

--

Miguel Cardoso
Miguel Cardoso

Written by Miguel Cardoso

Innovator and problem solver at heart. Product and Software Engineer exploring AI, software architecture and product management through writing.