A LLM-assisted Amazon shopping assistant that simplifies reviewing online feedback, helping to analyze product summaries and gain better insight to advise on Amazon purchases.
Reviews play a central role in the path to purchase, and many consumers don’t just skim them before purchasing or passing on a product. 53% of users within the age group 18-34 read Amazon review for more than 10 minutes before deciding to buy a product. It is also useful to compare products in terms of user reviews side-by-side to appreciate their strengths, weaknesses and other related issues, as well as, interpret reviews based on personalized requirements.
A high-level design for the proposed system is presented below:
Our key components all use the OpenAI API, with GPT3.5-turbo as a base model for AI-driven predictions.
-
Prompt Classifier : Classifies whether the user wants a summary, comparison or recommendation. Internal backend component.
-
Review Summarizer : Summarizes multiple reviews in JSON format and returns structured product review summaries. An example is shown below:
-
Product Comparisons: Performs structured comparison across pairs of products. An example is shown below:
-
Personalized Product Recommendations: Given a user input, generates product recommendations by comparison of summaries guided by the user's requirements. An example is shown below:
-
Keyword Extraction: Extract keywords from the summarized reviews and allow to filter the summary according to a keyword. An example is shown below:
We use the Amazon Review Dataset Provided by UCSD (2018) with 233.1 million reviews. The dataset contains reviews in the range May 1996 - Oct 2018. We host a subset of this dataset in JSON format, along with associated metadata on MongoDB Atlas.
- Clone the repository:
git clone https://github.com/VijayrajS/ShopGPT
- Create a Python virtual environment: If you do not have Python virtualenv installed, please run the following command to install virtualenv:
pip install virtualenv or pip3 install virtualenv
or,
python3 -m pip install virtualenv
Setup the virtualenv by running the following commands:
python3 -m virtualenv .shopgpt_env
source .shopgpt_env/bin/activate
- Install necessary Python packages:
pip install -r requirements.txt
- Set up your own OpenAI API key: Follow instructions from OpenAI API docs. Update your API key in line3 of
GPTGateway.py
. - Download the dataset from UCSD Amazon Reviews Dataset
- Host your Database: Host the downloaded dataset on MongoDB Atlas. Update your MongoDB Atlas URI in line10 of
DataSource.py
. - Run the App Locally: Run
python UI_v0.py