Enhancing Sentiment Classification and Irony Detection in Large Language Models through Advanced Prompt Engineering Techniques
Marvin Schmitt, Anne Schwerk, Sebastian Lempert

TL;DR
This paper explores advanced prompt engineering techniques to improve sentiment classification and irony detection in large language models, demonstrating significant performance gains through tailored prompting strategies.
Contribution
It introduces and evaluates specific prompt engineering methods like few-shot and chain-of-thought prompting, showing their effectiveness varies by model and task.
Findings
Few-shot prompting improves GPT-4o-mini sentiment analysis.
Chain-of-thought prompting enhances irony detection in gemini-1.5-flash.
Prompt strategies should be tailored to model and task complexity.
Abstract
This study investigates the use of prompt engineering to enhance large language models (LLMs), specifically GPT-4o-mini and gemini-1.5-flash, in sentiment analysis tasks. It evaluates advanced prompting techniques like few-shot learning, chain-of-thought prompting, and self-consistency against a baseline. Key tasks include sentiment classification, aspect-based sentiment analysis, and detecting subtle nuances such as irony. The research details the theoretical background, datasets, and methods used, assessing performance of LLMs as measured by accuracy, recall, precision, and F1 score. Findings reveal that advanced prompting significantly improves sentiment analysis, with the few-shot approach excelling in GPT-4o-mini and chain-of-thought prompting boosting irony detection in gemini-1.5-flash by up to 46%. Thus, while advanced prompting techniques overall improve performance, the fact…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSentiment Analysis and Opinion Mining · Topic Modeling · Stock Market Forecasting Methods
