[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-122103-en":3,"doc-seo-122103-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},122103,8796095461610,"Oliver","https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c",8,"Research & Report","Sentiment Analysis of Product Reviews Using Machine Learning and Pre-Trained LLM - Application and Benchmarking","Sentiment analysis via artificial intelligence using machine learning and large language models (LLMs) enables automatic classification of texts into positive, negative, or neutral categories, helping computers interpret emotions from textual data without direct human intervention. The work targets automated sentiment analysis for customer product reviews, supporting more nuanced understanding of consumer opinions for data-driven business decisions. Classifiers including Random Forest, Naive Bayes, and Support Vector Machine are benchmarked alongside GPT-4. Traditional models perform efficiently on short concise text, while GPT-4 yields stronger results on detailed inputs, capturing subtle and mixed sentiments with higher precision, recall, and F1 scores.","Article  \nSentiment Analysis of Product Reviews Using Machine Learning and Pre-Trained LLM  \nPawanjit Singh Ghatora 1, Seyed Ebrahim Hosseini 1, *, Shahbaz Pervez 1, Muhammad Javed Iqbal 2 and Nabil Shaukat 3  \nCitation: Ghatora, P.S.; Hosseini, S.E.; Pervez, S.; Iqbal, M.J.; Shaukat, N. Sentiment Analysis of Product Reviews Using Machine Learning and Pre-Trained LLM. Big Data Cogn. Comput. 2024, 8, 199. [https://](https://)[ ](https://)[doi.org/10.3390/bdcc8120199](doi.org/10.3390/bdcc8120199)  \nAcademic Editor: Domenico Ursino  \nReceived: 7 October 2024  \nRevised: 24 November 2024  \nAccepted: 10 December 2024  \nPublished: 23 December 2024  \nCopyright: © 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license ([https://](https://)[ ](https://)[creativecommons.org/licenses/by/](creativecommons.org/licenses/by/)[ ](creativecommons.org/licenses/by/)[4.0/](4.0/)) .  \n1 Whitecliffe School of Information Technology, Auckland 1010, New Zealand;  \n[20231893@mywhitecliffe.com](20231893@mywhitecliffe.com) (P.S.G.); [shahbazp@whitecliffe.ac.nz](shahbazp@whitecliffe.ac.nz) (S.P.)  \n2 Department of Computer Science, University of Engineering and Technology Taxila, Taxila 47050, Pakistan; [javed.iqbal@uettaxila.edu.pk](javed.iqbal@uettaxila.edu.pk)  \n3 Institute of Design, Robotics and Manufacturing, School of Mechanical Engineering, University of Leeds, Leeds LS2 9JT, UK; [n.shaukat@leeds.ac.uk](n.shaukat@leeds.ac.uk)  \n* Correspondence: [seyedh@whitecliffe.ac.nz](seyedh@whitecliffe.ac.nz)  \nAbstract: Sentiment analysis via artificial intelligence, i.e., machine learning and large language models (LLMs), is a pivotal tool that classifies sentiments within texts as positive, negative, or neutral. It enables computers to automatically detect and interpret emotions from textual data, covering a spectrum of feelings without direct human intervention. Sentiment analysis is integral to marketing research, helping to gauge consumer emotions and opinions across various sectors. Its applications span analyzing movie reviews, monitoring social media, evaluating product feedback, assessing employee sentiments, and identifying hate speech. This study explores the application of both traditional machine learning and pre-trained LLMs for automated sentiment analysis of customer product reviews. The motivation behind this work lies in the demand for more nuanced understanding of consumer sentiments that can drive data-informed business decisions. In this research, we applied machine learning-based classifiers, i.e., Random Forest, Naive Bayes, and Support Vector Machine, alongside the GPT-4 model to benchmark their effectiveness for sentiment analysis. Traditional models show better results and efficiency in processing short, concise text, with SVM in classifying sentiment of short length comments. However, GPT-4 showed better results with more detailed texts, capturing subtle sentiments with higher precision, recall, and F1 scores to uniquely identify mixed sentiments not found in the simpler models. Conclusively, this study shows that LLMs outperform traditional models in context-rich sentiment analysis by not only providing accurate sentiment classification but also insightful explanations. These results enable LLMs to provide a superior tool for customer-centric businesses, which helps actionable insights to be derived from any textual data.  \nKeywords: sentiment analysis; machine learning; large language models (LLMs); OpenAI; GPT-4; text analysis; product reviews  \n1. Introduction  \nWith the growing dependence on digital data, developing effective and scalable sentiment analysis systems is vital for any organization, whether business-or product-focused. Analyzing sentiment is also crucial for businesses of all sizes, in knowing and promptly responding to customers’ feedback or opinion on several topics. It plays an ","cbCairx0yYFFSf9S","https://ap.wps.com/l/cbCairx0yYFFSf9S","pdf",1690205,1,18,"English","en",105,"# Introduction\n## Motivation and relevance of sentiment analysis\n## Challenges in digital, unstructured product review data\n# Methodology and models\n## Traditional ML classifiers\n## Pre-trained LLM (GPT-4) comparison\n# Results and discussion\n## Performance on short vs detailed text\n## Mixed-sentiment identification\n# Conclusion","[{\"question\":\"What sentiment categories does the study focus on for product reviews?\",\"answer\":\"The study classifies sentiment in text into positive, negative, and neutral categories to detect and interpret emotions expressed in customer reviews.\"},{\"question\":\"Which traditional machine learning classifiers are compared in the research?\",\"answer\":\"The study benchmarks Random Forest, Naive Bayes, and Support Vector Machine (SVM) against the GPT-4 model for sentiment analysis.\"},{\"question\":\"Why does GPT-4 perform better on more detailed review texts?\",\"answer\":\"GPT-4 better captures subtle and mixed sentiments in context-rich, detailed text, achieving higher precision, recall, and F1 scores than simpler models.\"}]","Sentiment Analysis of Product Reviews Using Machine Learning and Pre-Trained LLM - Application and Benchmarking | PDF",1785808833,45,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"sentiment-analysis-of-product-reviews-using-machine-learning-and-pre-trained-llm-application-and-benchmarking","",{"@graph":36,"@context":85},[37,54,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/research-report/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/sentiment-analysis-of-product-reviews-using-machine-learning-and-pre-trained-llm-application-and-benchmarking/122103/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":23,"description":14,"dateModified":62,"datePublished":62,"encodingFormat":61,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-04",true,{"@type":65,"interactionType":66,"userInteractionCount":4},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What sentiment categories does the study focus on for product reviews?","Question",{"text":75,"@type":76},"The study classifies sentiment in text into positive, negative, and neutral categories to detect and interpret emotions expressed in customer reviews.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"Which traditional machine learning classifiers are compared in the research?",{"text":80,"@type":76},"The study benchmarks Random Forest, Naive Bayes, and Support Vector Machine (SVM) against the GPT-4 model for sentiment analysis.",{"name":82,"@type":73,"acceptedAnswer":83},"Why does GPT-4 perform better on more detailed review texts?",{"text":84,"@type":76},"GPT-4 better captures subtle and mixed sentiments in context-rich, detailed text, achieving higher precision, recall, and F1 scores than simpler models.","https://schema.org",{"og:url":52,"og:type":87,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":89,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]