Large Language Models (LLMs) have made significant strides in both scientific research and practical applications. Existing studies have demonstrated the state-of-the-art (SOTA) performance of LLMs in various natural language processing tasks. However, the question of how to further enhance LLMs' performance in specific task using prompting strategies remains a pivotal concern. This paper explores the enhancement of LLMs' performance in sentiment analysis through the application of prompting strategies. We formulate the process of prompting for sentiment analysis tasks and introduce two novel strategies tailored for sentiment analysis: RolePlaying (RP) prompting and Chain-of-thought (CoT) prompting. Specifically, we also propose the RP-CoT prompting strategy which is a combination of RP prompting and CoT prompting. We conduct comparative experiments on three distinct domain datasets to evaluate the effectiveness of the proposed sentiment analysis strategies. The results demonstrate that the adoption of the proposed prompting strategies leads to a increasing enhancement in sentiment analysis accuracy. Further, the CoT prompting strategy exhibits a notable impact on implicit sentiment analysis, with the RP-CoT prompting strategy delivering the most superior performance among all strategies.
翻译:大型语言模型(LLMs)在科学研究和实际应用中都取得了显著进展。现有研究已证明了LLMs在各种自然语言处理任务中的最先进(SOTA)性能。然而,如何通过提示策略进一步在特定任务中增强LLMs的性能仍然是一个关键问题。本文探讨了通过应用提示策略来增强LLMs在情感分析中的性能。我们形式化了情感分析任务的提示过程,并针对情感分析引入了两种新颖的策略:角色扮演(RP)提示和思维链(CoT)提示。具体来说,我们还提出了RP-CoT提示策略,该策略是RP提示和CoT提示的组合。我们在三个不同领域的数据集上进行了对比实验,以评估所提出的情感分析策略的有效性。结果表明,采用所提出的提示策略可逐步提升情感分析的准确性。此外,CoT提示策略在隐性情感分析中展现了显著影响,其中RP-CoT提示策略在所有策略中实现了最卓越的性能。