Product Recommendation System Using Large Language Model: Llama-2
MuhammadZaid Katlariwala, Aakash Gupta · 2024
Product recommendation systems are an essential part of many e-commerce platforms. They help users discover new products that they are likely to be interested in, and can also increase sales and engagement. Traditional recommendation systems typically use collaborative filtering or content-based filtering to generate recommendations. However, these systems have limitations, such as the cold start problem and the difficulty of capturing complex user preferences. Large language models (LLMs) have recently emerged as a promising new approach to product recommendation. LLMs are trained on massive datasets of text and code, and they can learn to understand and generate human language at a high level. This makes them well-suited for tasks such as product recommendation, which require the ability to understand user preferences and product descriptions. In this paper, we propose a product recommendation system that uses the Llama-2 LLM. Our system works by first generating a personalized user embedding for each user. This embedding captures the user’s preferences based on their past interactions with the system. The system then uses this embedding to generate a ranked list of recommended products for the user. We evaluated our system on a real-world dataset of user interactions with an e-commerce platform. Our results show that our system outperforms traditional recommendation systems on a variety of metrics, including click-through rate and purchase rate.