Skip to the content.

Sentiment Analysis of ChatGPT Reviews: In-Depth Walkthrough with Insights

In this article, we walk through the sentiment analysis of ChatGPT reviews, step-by-step, explaining each phase of the analysis in detail. The goal is to uncover user feedback trends, highlight strengths, and identify areas for improvement.

Overview of the Process

The analysis consists of several key phases: Data Cleaning and Preparation Sentiment Analysis using TextBlob Removing Duplicates Creating Custom Net Promoter Score (NPS) Categories Recent NPS Calculation Visualization of Sentiment Distribution Extracting Common Phrases in Positive and Negative Reviews Aspect-Based Sentiment Analysis Sentiment Trends Over Time Final NPS Calculation

Each phase has been carefully designed to provide meaningful insights. Let’s dive into the steps in detail.

1. Loading and Cleaning the Data

Purpose: Ensure clean, consistent data for accurate analysis.

Actions:

Loaded the dataset into a DataFrame. Handle missing values by replacing null entries in the ‘Review’ column with an empty string (‘’). Convert all reviews to lowercase to maintain consistency and avoid case-sensitive duplicates.

2. Sentiment Analysis

Goal: Classify each review as positive, negative, or neutral.

Sentiment polarity values range from -1 (most negative) to +1 (most positive), with 0 representing neutral feedback.

Implementation:

Library: TextBlob is used to calculate sentiment polarity.

Rules:

Positive: Polarity > 0

Negative: Polarity < 0

Neutral: Polarity = 0

3. Removing Duplicate Reviews

Purpose: Prevent duplicate entries from skewing the analysis.

Method: Apply the drop_duplicates function on the ‘Review’ column to remove identical reviews.

This ensures that each user’s review is counted only once.

4. Custom Net Promoter Score (NPS) Categories

NPS Overview: Net Promoter Score measures user satisfaction and loyalty.

Custom Categories:

Strong Promoter: A 5-star review with more than 30 characters.

Promoter: A 5-star review that is brief.

Passive: A 4-star review.

Detractor: A review with a rating of 3 stars or below.

By distinguishing detailed reviews from short ones, we give more weight to longer, thoughtful feedback.

5. Recent Reviews NPS Calculation

Objective: Analyze recent user sentiment by calculating NPS for reviews from a specific time frame (e.g., after January 1, 2024).

Calculation:

Compute percentages for each NPS category.

NPS formula: NPS= %Promoters − %Detractors

6. Sentiment Distribution Visualization

Purpose: Provide an overview of sentiment proportions across all reviews.

Visualization: A bar chart is generated using Plotly to display counts of positive, negative, and neutral reviews.

Insights: This visualization quickly highlights the dominant sentiment category.

7. Common Phrases in Positive Reviews

Goal: Identify common themes that users appreciate.

N-grams: Sequences of consecutive words (e.g., bigrams and trigrams).

Tool: CountVectorizer is used to extract frequent phrases.

Output: The top 20 frequent phrases are displayed using a horizontal bar chart.

Examples: “easy to use,” “amazing app.”

8. Common Phrases in Negative Reviews

Purpose: Identify recurring pain points from negative reviews.

Apply the same n-gram extraction method as above.

Visualize the top 20 negative phrases.

Examples: Phrases like “slow response” or “wrong answer” may indicate issues that need attention.

9. Aspect-Based Sentiment Analysis

Objective: Categorize negative feedback based on common problem areas.

Categories and Keywords:

App Performance: Keywords like “slow,” “lag,” and “crash.”

User Interface: Keywords like “confusing” and “hard to navigate.”

Feature Issues: Keywords like “missing feature” and “not working.”

Response Quality: Keywords like “incorrect” and “irrelevant.”

Result:

A bar chart displays the frequency of each issue.

This helps identify the most frequently reported problems.

10. Sentiment Trends Over Time

Purpose: Track how user sentiment evolves.

Reviews are grouped by month.

A line chart is generated to show changes in positive, neutral, and negative reviews.

Insights: Patterns can indicate user reactions to updates or new features.

11. Final NPS Calculation

Goal: Compute the overall NPS to summarize user feedback.

A positive NPS indicates strong user satisfaction.

A negative NPS signals the need for improvement.

Key Takeaways

This sentiment analysis sheds light on user satisfaction and areas that need attention. Positive reviews often praise the app’s usefulness, while negative reviews highlight concerns about performance or incorrect responses. The insights provided can help stakeholders enhance the user experience by focusing on strengths and addressing pain points.