Fine-Tuning Large Language Models for Sentiment Classification of AI-Related Tweets

Fine-tuning large language models (LLMs) for sentiment analysis presents a promising avenue for enhancing the understanding of public sentiment surrounding artificial intelligence (AI) topics. This study explores the fine-tuning of Large Language Models (LLMs) for sentiment analysis on AI-related topics using social media data. We collected approximately 20,000 tweets containing hashtags and comments related to AI concerns, including ‘AI Danger,’ ‘AI Ethics,’ ‘AI Problems,’ ‘AI Creating Problem on Jobs,’ and ‘AI Threat.’ The dataset captures public sentiment surrounding potential negative impacts of artificial intelligence. Three cutting-edge LLMs, Llama 2, Gemma, Mistral, and Phi 3, served as our foundational models for fine-tuning. To enhance model performance, we implemented advanced prompt engineering techniques, including Chain-of-Thought (COT), Algorithm-of-Thoughts (AOT), Fewshot and EmotionPrompt. Our results demonstrate that Llama 2 achieves consistent performance across all techniques with accuracies ranging from 82.3% to 83.9%. Phi-3 showed the best performance with EmotionPrompt and Fewshot techniques, achieving accuracies of 87.8% and 87.4% respectively. Gemma 7B performed optimally with Fewshot at 84.0% accuracy, while Mistral achieved 85.0% accuracy using the same technique. The research reveals that Fewshot and AOT consistently produce reliable results across models, with Emotion-Prompt showing model-specific effectiveness. Our findings have applications for enhancing the precision and dependability of sentiment analysis instruments that track public opinion and AI-related speech.

Authors

Institutions

Publication Details

Published
2024-12-06
DOI
https://doi.org/10.1109/wiecon-ece64149.2024.10914746
Citations
3
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
1.04
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Fine-Tuning Large Language Models for Sentiment Classification of AI-Related Tweets

Rahul Debnath, Md Jahid Alam Riad, Mahfuzur Rahman Shuvo, Fateha Jannat Ayrin et al.
3 citations
Sentiment Analysis and Opinion Mining
1.04
article

Fine-Tuning Large Language Models for Sentiment Classification of AI-Related Tweets

Rahul Debnath, Md Jahid Alam Riad, Mahfuzur Rahman Shuvo, Fateha Jannat Ayrin, Prosenjit Roy, Nobanul Hasan, Ayesha Akhter Tamanna
article en
3 citations

Abstract

Fine-tuning large language models (LLMs) for sentiment analysis presents a promising avenue for enhancing the understanding of public sentiment surrounding artificial intelligence (AI) topics. This study explores the fine-tuning of Large Language Models (LLMs) for sentiment analysis on AI-related topics using social media data. We collected approximately 20,000 tweets containing hashtags and comments related to AI concerns, including ‘AI Danger,’ ‘AI Ethics,’ ‘AI Problems,’ ‘AI Creating Problem on Jobs,’ and ‘AI Threat.’ The dataset captures public sentiment surrounding potential negative impacts of artificial intelligence. Three cutting-edge LLMs, Llama 2, Gemma, Mistral, and Phi 3, served as our foundational models for fine-tuning. To enhance model performance, we implemented advanced prompt engineering techniques, including Chain-of-Thought (COT), Algorithm-of-Thoughts (AOT), Fewshot and EmotionPrompt. Our results demonstrate that Llama 2 achieves consistent performance across all techniques with accuracies ranging from 82.3% to 83.9%. Phi-3 showed the best performance with EmotionPrompt and Fewshot techniques, achieving accuracies of 87.8% and 87.4% respectively. Gemma 7B performed optimally with Fewshot at 84.0% accuracy, while Mistral achieved 85.0% accuracy using the same technique. The research reveals that Fewshot and AOT consistently produce reliable results across models, with Emotion-Prompt showing model-specific effectiveness. Our findings have applications for enhancing the precision and dependability of sentiment analysis instruments that track public opinion and AI-related speech.

American University (US), American InterContinental University (US), Prairie View A&M University (US), University of Chittagong (BD)
Quality Education
Openalex Percentile: Top 18%
Sentiment Analysis and Opinion Mining
1.04
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Fine-Tuning Large Language Models for Sentiment Classification of AI-Related Tweets — Rahul Debnath, Md Jahid Alam Riad, et al. · (2024) | TGRS Research Map | TGRS