[Paper Review] SentimentGPT: Exploiting GPT for Advanced Sentiment Analysis and its Departure from Current Machine Learning
The paper investigates three GPT-based strategies (prompt-based, fine-tuned, and embedding-based) for sentiment analysis on SemEval-2017 Task 4, showing GPT approaches outperform traditional models by over 22% in F1-score.
This study presents a thorough examination of various Generative Pretrained Transformer (GPT) methodologies in sentiment analysis, specifically in the context of Task 4 on the SemEval 2017 dataset. Three primary strategies are employed: 1) prompt engineering using the advanced GPT-3.5 Turbo, 2) fine-tuning GPT models, and 3) an inventive approach to embedding classification. The research yields detailed comparative insights among these strategies and individual GPT models, revealing their unique strengths and potential limitations. Additionally, the study compares these GPT-based methodologies with other current, high-performing models previously used with the same dataset. The results illustrate the significant superiority of the GPT approaches in terms of predictive performance, more than 22\% in F1-score compared to the state-of-the-art. Further, the paper sheds light on common challenges in sentiment analysis tasks, such as understanding context and detecting sarcasm. It underscores the enhanced capabilities of the GPT models to effectively handle these complexities. Taken together, these findings highlight the promising potential of GPT models in sentiment analysis, setting the stage for future research in this field. The code can be found at https://github.com/DSAatUSU/SentimentGPT
Motivation & Objective
- Investigate the effectiveness of GPT models for sentiment analysis on social media texts (tweets).
- Compare prompt-based, fine-tuned, and embedding-based GPT approaches against traditional models on SemEval-2017 Task 4.
- Analyze GPT models’ ability to handle linguistic nuances such as emoji, sarcasm, negation, and mixed sentiments.
- Assess linguistic explainability via sentiment reasoning prompts.
- Provide practical guidance for applying GPT-based strategies in sentiment analysis tasks.
Proposed method
- Three GPT-based strategies are explored: prompt-based sentiment analysis with carefully engineered prompts and in-context reasoning; fine-tuning GPT models (Ada, Babbage, Curie) on labeled data; embedding-based classification using GPT text-embedding-ada-002 followed by traditional ML models (XGBoost, Random Forest) on reduced embeddings (PCA from 400 to 150).
- Prompt-based approach uses chat completion GPT-3.5 Turbo with a sentiment scale of 0–2 and includes an explanation prompt for RQ3.
- Evaluation metrics include accuracy, recall, and F1-score; mixed sentiments are handled if the model outputs them.
- The SemEval-2017 Task 4 English dataset is used, noting class imbalance (Positive/Neutral > Negative).
- Linguistic nuance analysis identifies seven categories (emoji, slang, hashtag, negation & sarcasm, mixed sentiment, cultural context, modern abbreviations).
- Embedding approach leverages GPT embeddings as features for ML classifiers (XGBoost, RF) after PCA dimensionality reduction.

Experimental results
Research questions
- RQ1RQ1: How do GPT-related models perform on sentiment analysis of social media posts compared to existing machine learning solutions?
- RQ2RQ2: How do different GPT products (prompt-based, fine-tuned, embedding) perform in sentiment analysis tasks?
- RQ3RQ3: Can GPT models effectively address linguistic sentiment nuances such as emotion, emojis, and mixed sentiment?
Key findings
- GPT approaches achieve significant predictive performance improvements over state-of-the-art models, with more than 22% higher F1-score.
- Prompt-based GPT-3.5 Turbo with carefully engineered prompts can produce competitive sentiment predictions and supports sentiment reasoning explanations.
- Fine-tuned GPT models (Ada, Babbage, Curie) are evaluated and compared against prompt-based methods, with distinct trade-offs in cost and capability.
- GPT embeddings, when combined with traditional ML models like XGBoost and Random Forest on PCA-reduced features, provide another viable sentiment classification pathway.
- The study highlights difficulties in sentiment tasks such as context understanding and sarcasm and shows GPT models’ enhanced capabilities to address these nuances.
- The English subset of SemEval-2017 Task 4 is used, acknowledging dataset imbalance and focus on a 3-point scale (positive, neutral, negative).

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.