Articles

Enhancing the Shopify Personal Shopper: A Conversational AI Experiment

 
Enhancing the Shopify Personal Shopper: A Conversational AI Experiment Source: ExpertGuru Articles

This is a story where we tried to elevate the Shopify personal shopper experience by integrating advanced conversational AI functionalities, we tried our hands at in an experiment. This involved creating a more interactive and agentic shopping assistant that could not only recommend products but also offer expert advice, track orders, and engage in contextual conversations.

Initial Approach: Q&A to Recommendations

We began by exploring a question-and-answer (Q&A) driven approach. The personal shopper would greet the user and initiate a series of targeted questions to understand their needs and preferences. Based on these responses, the shopper would then generate personalized product recommendations.

This approach, however, presented some technical hurdles:

  • Agentic Decision Making: Each user response would require the shopper to make an "agentic" decision, dynamically selecting the next question based on the previous answer. This logic, while potentially powerful, could lead to a brittle system that struggles with unforeseen user input.
  • Technical Complexity: Integrating with ChatGPT for product recommendations involved receiving responses in JSON format. Asking separate follow-up questions would necessitate front-end development to handle this asynchronous communication and potentially introduce additional dependencies.

Refined Approach: Recommendations with Conversational Follow-Up

To overcome these challenges, we adopted a more streamlined approach:

  1. Recommendation Engine Integration: We leveraged a product recommendation engine pre-trained on user behavior and browsing history. This engine would generate an initial set of relevant product suggestions for the user.
  2. Contextual Follow-up Questions: After presenting the initial recommendations, the personal shopper would engage the user with a targeted follow-up question. This question would be dynamically generated based on the displayed products and user interaction. For example, upon displaying athletic wear, the shopper might ask, "Are you looking for something for running or weightlifting?"
  3. Dedicated Conversation Analysis API: To streamline follow-up question generation, we developed a separate API. This API would analyze the user's interaction with the presented products and the overall conversation context. Based on this analysis, the API would generate the most appropriate follow-up question to further refine the shopping experience. This separation of concerns simplifies the front-end development as the API provides a single point of interaction for conversation analysis and question retrieval.

Benefits and Future Directions

This revised approach offers several advantages:

  • Improved User Experience: The initial product recommendations provide a starting point, while the follow-up questions allow for further personalization. This creates a more natural and engaging conversation flow.
  • Reduced Development Complexity: By separating recommendation generation and conversation analysis, the front-end development becomes more manageable.
  • Enhanced Scalability: The dedicated conversation analysis API can be easily scaled to handle increased user traffic and adapt to evolving user behavior.

Future iterations could involve integrating sentiment analysis to tailor to the shopper's tone and responses. Additionally, we could explore integrating with other services like order tracking APIs for a truly comprehensive shopping assistant experience.

Recent Articles
Our Savior: Fly.io
Mar 2024 - Carlos
Retrieval or Generative?
Mar 2024 - Ike