Comparative Analysis of Open-Source Large Language Models for Sentiment Analysis and Prompt Engineering
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
Machine Learning models such as Random Forests and Naïve Bayes are trained and used for sentiment analysis. Large language models (LLMs) are currently used in many tasks because of their advanced attention architecture and the large amount of data they have been trained on. Closed source LLMs like ChatGPT, from OpenAI, and Gemini, from Google, are being explored and used for various tasks. However, they do not allow the user to fully interact and fine-tune them for performing specific tasks. Hence, some users opt for open-source LLMs such as BERT and GPT-2 because they can fine-tune them to their desired tasks. Despite their widespread use, they have not been explored fully to find out how they perform against each other in sentiment analysis and prompt engineering. This paper examines how such open-source large language models perform in analyzing sentiments and their responsiveness to prompts, specifically offering more insights and details about the sentiments aside from giving the sentiment's polarity. The study aims to contribute to the knowledge of the effectiveness of the large language models in sentiment analysis and prompt engineering. This will also inform the reader of the choice between the various LLMs for their use.