Sentiment Analysis Through Prompt Engineering with GPT-4 on the SmSA IndoNLU Dataset

This research investigates the application of prompt engineering techniques for sentiment analysis using GPT-4 and BERT models on the IndoNLU SmSA dataset. The BERT model is fine-tuned on the dataset, while GPT-4 is employed using various prompt engineering techniques, including zero-shot, one-shot, few-shot, chain-of-thought, and a fusion technique that integrates structured reasoning with factual identification. Both models are evaluated using accuracy, precision, recall, and F1-score. The results reveal that the fusion technique for GPT -4 outperforms other methods, achieving an accuracy of 96.8% and an F1-score of 0.968, significantly surpassing the performance of the fine-tuned BERT model (accuracy: 90.6%). This superior performance is attributed to the fusion technique's ability to guide the model through step-by-step reasoning, enhancing its capacity to handle complex language features like sarcasm and irony. Practical implications of these findings include the potential for more accurate and reliable sentiment analysis in low-resource languages such as Indonesian, with applications in business intelligence, social media monitoring, and customer feedback analysis. Additionally, the study highlights the importance of prompt design in improving model performance and suggests that combining multiple prompt techniques can significantly enhance sentiment classification accuracy. The research also underscores the need for robust security measures, successfully mitigating prompt injection attacks by reducing vulnerability rates from 25.3% to 3.8%. The implications for enhancing AI-driven sentiment analysis in low-resource languages, with opportunities for future research to explore local models and hybrid prompt strategies.

Authors

Institutions

Publication Details

Published
2024-11-20
DOI
https://doi.org/10.1109/icimcis63449.2024.10957095
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Sentiment Analysis Through Prompt Engineering with GPT-4 on the SmSA IndoNLU Dataset

Raden Budiarto Hadiprakoso, Herlambang Rafli Wicaksono, Zaqiatul Mardiah
Sentiment Analysis and Opinion Mining
article

Sentiment Analysis Through Prompt Engineering with GPT-4 on the SmSA IndoNLU Dataset

Raden Budiarto Hadiprakoso, Herlambang Rafli Wicaksono, Zaqiatul Mardiah
article en

Abstract

This research investigates the application of prompt engineering techniques for sentiment analysis using GPT-4 and BERT models on the IndoNLU SmSA dataset. The BERT model is fine-tuned on the dataset, while GPT-4 is employed using various prompt engineering techniques, including zero-shot, one-shot, few-shot, chain-of-thought, and a fusion technique that integrates structured reasoning with factual identification. Both models are evaluated using accuracy, precision, recall, and F1-score. The results reveal that the fusion technique for GPT -4 outperforms other methods, achieving an accuracy of 96.8% and an F1-score of 0.968, significantly surpassing the performance of the fine-tuned BERT model (accuracy: 90.6%). This superior performance is attributed to the fusion technique's ability to guide the model through step-by-step reasoning, enhancing its capacity to handle complex language features like sarcasm and irony. Practical implications of these findings include the potential for more accurate and reliable sentiment analysis in low-resource languages such as Indonesian, with applications in business intelligence, social media monitoring, and customer feedback analysis. Additionally, the study highlights the importance of prompt design in improving model performance and suggests that combining multiple prompt techniques can significantly enhance sentiment classification accuracy. The research also underscores the need for robust security measures, successfully mitigating prompt injection attacks by reducing vulnerability rates from 25.3% to 3.8%. The implications for enhancing AI-driven sentiment analysis in low-resource languages, with opportunities for future research to explore local models and hybrid prompt strategies.

Jakarta State Polytechnic (ID), Politeknik Siber Cerdika Internasional
Openalex Percentile: Top 73%
Sentiment Analysis and Opinion Mining
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.

Sentiment Analysis Through Prompt Engineering with GPT-4 on the SmSA IndoNLU Dataset — Raden Budiarto Hadiprakoso, Herlambang Rafli Wicaksono, et al. · (2024) | TGRS Research Map | TGRS