1. A Prompt Example Construction Method Based on Clustering and Semantic Similarity.
- Author
-
Chen, Ding and Wang, Jun
- Abstract
With the launch of OpenAI's ChatGPT, large language models have garnered significant attention, and applications based on these models have proliferated. A critical challenge has emerged: how to rapidly enhance the capabilities of general LLMs in specialized domains. Compared to fine-tuning and other methods, prompt engineering has proven to be a cost-effective approach for improving the performance of LLMs on specific tasks, yielding remarkable results. However, current prompt example construction methods are numerous and lack a universally applicable approach that spans different models and tasks. Furthermore, existing research is predominantly tested and evaluated on a limited range of specific datasets, failing to explore the broader impact of these methods on a wider array of tasks. This paper proposes a prompt example construction method based on clustering and semantic similarity, which combines clustering algorithms with semantic similarity techniques to significantly improve the quality of prompt examples. In comparative tests conducted on six LLMs and seven datasets, the overall accuracy and stability of the proposed method significantly outperforms five other common methods, demonstrating broad applicability and the potential to enhance the output performance of all LLMs. Through comparative experiments, this paper also identifies that as the parameter scale of LLMs increases, the improvement effect of the prompt example construction method on LLM output performance tends to diminish. Additionally, diversified prompt example sets provide a more pronounced enhancement in LLM output performance. [ABSTRACT FROM AUTHOR]
- Published
- 2024
- Full Text
- View/download PDF