The core of an AI system is software that uses machine-learning algorithms. The Machine Learning model analyzes the historical data on sales and the personal data of the users and generates shopping recommendations for every user visiting the online shop. There may be several models like that running simultaneously and later they unite in an ensemble to provide better quality recommendations.
Within the user-based approach, the model analyzes the profile of the customer and his preferences. Once it has defined the profile, it finds the profiles of the other customers that he is similar to and recommends to him the products that they bought.
Within the item-based approach, the model analyzes the customer's shopping session and recommends the products equivalent to the products that he's already viewed and the products complimentary that he has viewed, put in the basket, or bought earlier. For example, it would recommend the coffee capsules to the customer who is viewing the coffee machines or the cleaning products for the carpet he has bought a few months ago.