Customer Recommendation Engine

This article is about a machine learning project that created a recommendation engine that is useful for any retail business such as car sales or a grocery store that has to generate recommendations of the right products and services for their customers.

How recommendation engines work

Figure: Two methods of how recommendation engines work. Braintoy’s recommendation engine does not recommend products, rather it generates customers based on the products and the customers’ current possessions.

Unlike any other method available in the world today, this ML-powered recommendation system gave the following advantage to the client:

  • Similar customers are recommended based on the input campaign criteria and the customers’ past buying history.
  • It recommends additional input data to the user based on the input data in the campaign and the generated customers.
  • If the user chooses to manually add customers, it filters them (keep or remove) based on the campaign criteria and the generated customers.

I built two tabs for the platform, the New Campaign and Recommend Customers.

The user journey began at the New Campaign tab. This is where two categories of criteria can be selected to feed the machine learning algorithm that will then recommend the appropriate result. The criteria depend on the data, for example, cars and services, movie genre and rating, or food and drinks. The user can specify the data for example in accordance with the above categories under each category, 2018 Honda CRV and Oil change, Horror and 5 Stars, or Apples and Milk.

The user can name the campaign and provide a duration. The user is also able to delete specific data as they deem necessary.

User journeyFigure: A flow chart depicting the user journey outlined in the document.

When the criteria are populated in the New Campaign tab, the user then clicks on the Recommend Customers button to be automatically brought to the next tab that displays a list of customers that would be the most interested in the current campaign. The user can then assign sales agents to each customer or to multiple customers for lead generation and add the customer to a Master Customer List (another tab). Furthermore, the user can save the customers generated in the current campaign and return to the tab at a later time to resume their work. The last state of the program is saved for a smoother workflow.

This project was a custom app that interacted with the models built using the Braintoy mlOS. The backend and frontend technologies used are respectively. I utilized my supervisor’s code to connect the database to sqlite3 using SQLAlchemy and imported create_engine, MetaData,  and Table. The os module was used to connect to the extensive database of customer information. Blueprint and Flask were utilized to create API endpoints, register them, and use them to retrieve and manipulate data in the database. Furthermore, the frontend workflow was streamlined by Polymer.js, a javascript library to make custom web components, use one-way and two-way data binding, and connect to the backend using iron-ajax.

Three things to remember

  1. Software is a system with parts that work with each other. A full-stack developer seamlessly connects them to build a product.
  2. ML is different than traditional formulas. ML creates a formula for you.
  3. Web development is not tough. I had no knowledge but can now develop a web platform.

 

Arnav Jain

Arnav Jain is a computer engineering student at the University of Toronto. He believes that AI should be accessible to everyone. This article is a synthesis of the technologies he learnt to develop this project. These are available to anyone like him who wants to be a future AI Developer.

Start modeling now

FREE TRIAL

Attend a training

BOOK MY SPOT