Understanding Public Opinion on AI Pre- and Post-ChatGPT Launch with Machine Learning
Using transformer-based natural language processing to investigate how public emotions toward artificial intelligence changed following the release of ChatGPT.

Overview
This project explored how public sentiment surrounding artificial intelligence evolved before and after the launch of ChatGPT. Working with three large Twitter datasets spanning 2017–2024, we developed a machine learning pipeline to classify emotions in nearly half a million tweets. Beyond building the analysis pipeline, we validated model performance through manual annotation, statistical testing, and multiple preprocessing strategies to ensure robust and reliable findings.
Process
- 1Collected three large Twitter datasets covering AI discussions before and after ChatGPT's launch.
- 2Performed exploratory data analysis to understand data quality, language distribution, tweet characteristics, and temporal coverage.
- 3Designed two separate preprocessing pipelines to investigate how stopword removal affected transformer performance.
- 4Built a large-scale emotion classification pipeline using Hugging Face's DistilRoBERTa model running on GPU.
- 5Manually validated model predictions through stratified sampling of 1,600 tweets.
- 6Applied weighted accuracy calculations and statistical tests to verify robustness.
- 7Compared emotional trends across multiple time periods and preprocessing strategies before interpreting societal implications.
Key insights
- Public AI discussions became significantly less neutral following the release of ChatGPT.
- Positive emotions such as joy and surprise increased substantially.
- Negative emotions including fear, sadness, and anger also became more common, indicating a more emotionally polarized public discussion.
- Results remained highly consistent across different preprocessing approaches, demonstrating the robustness of the analysis pipeline.
- Manual validation highlighted the importance of human evaluation when applying transformer models to nuanced social media language such as sarcasm and humor.
Outcome
The project produced a scalable machine learning pipeline capable of analyzing hundreds of thousands of social media posts using transformer-based emotion classification. Statistical validation confirmed that the launch of ChatGPT represented a significant shift in public emotional discourse surrounding AI, while also identifying the strengths and limitations of modern NLP models when applied to real-world social media data.
Reflection
This project deepened my understanding of the complete machine learning workflow—from collecting and cleaning real-world datasets to evaluating model performance and interpreting results critically. Rather than treating AI models as black boxes, I learned the importance of validating predictions, questioning preprocessing decisions, and understanding where machine learning succeeds and where human judgment remains essential.