2025 Volume 38 Issue 2 Pages 19-25
In recent years, the advancement of Large Language Models (LLMs) has garnered significant attention in the field of artificial intelligence (AI). However, despite the high generality of LLMs, there exists a problem in controlling them to produce the desired output for each task. Fine-tuning is a conventional approach to improve performance for specific tasks, but due to the vast number of parameters in LLMs, it is computationally expensive. On the other hand, prompt engineering, which involves designing inputs to elicit desired outputs from LLMs, is an effective approach, and various methods and performance improvements have been reported. However, manual design of prompts is labor-intensive, which has increased interest in the automation of prompt engineering. In this study, we propose a method to automate prompt engineering utilizing genetic algorithms with novel genetic operators for prompts. Through experiments conducted to explore instructional prompts for solving Japanese multiple-choice questions, the efficacy of the proposed method was confirmed.