The advent of large language models (LLMs) such as ChatGPT has attracted considerable attention in various domains due to their remarkable performance and versatility. As the use of these models continues to grow, the importance of effective prompt engineering has come to the fore. Prompt optimization emerges as a crucial challenge, as it has a direct impact on model performance and the extraction of relevant information. Recently, evolutionary algorithms (EAs) have shown promise in addressing this issue, paving the way for novel optimization strategies. In this work, we propose a evolutionary multi-objective (EMO) approach specifically tailored for prompt optimization called EMO-Prompts, using sentiment analysis as a case study. We use sentiment analysis capabilities as our experimental targets. Our results demonstrate that EMO-Prompts effectively generates prompts capable of guiding the LLM to produce texts embodying two conflicting emotions simultaneously.
翻译:大语言模型(LLMs)如ChatGPT的出现,因其卓越的性能和多功能性在各个领域引起了广泛关注。随着这些模型的应用日益增长,有效提示工程的重要性愈发凸显。提示词优化已成为一项关键挑战,因为它直接影响模型性能和相关信息的提取。近年来,进化算法(EAs)在应对这一问题上展现出潜力,为新型优化策略开辟了道路。本文提出了一种专为提示词优化设计的进化多目标(EMO)方法——EMO-Prompts,并以情感分析为案例进行研究。我们以情感分析能力作为实验目标。结果表明,EMO-Prompts能够有效生成提示词,引导大语言模型同时输出包含两种矛盾情感的表达。