A Particle Swarm Optimization-Based Approach Coupled With Large Language Models for Prompt Optimization

被引:0
作者
Hsieh, Po-Cheng [1 ]
Lee, Wei-Po [1 ]
机构
[1] Natl Sun Yat Sen Univ, Dept Informat Management, Kaohsiung, Taiwan
关键词
ChatGPT; large language model; machine learning; particle swarm optimization; prompt optimization;
D O I
10.1111/exsy.70049
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Large language models (LLMs) have been developing rapidly to attract significant attention these days. These models have exhibited remarkable abilities in achieving various natural language processing (NLP) tasks, but the performance depends highly on the quality of prompting. Prompt engineering methods have been promoted for further extending the models' abilities to perform different applications. However, prompt engineering involves crafting input prompts for better accuracy and efficiency, demanding substantial expertise with trial-and-error effort. Automating the prompting process is important and can largely reduce human efforts in building suitable prompts. In this work, we develop a new metaheuristic algorithm to couple the Particle Swarm Optimization (PSO) technique and LLMs for prompt optimization. Our approach has some unique features: it can converge within only a small number of iterations (i.e., typically 10-20 iterations) to vastly reduce the expensive LLM usage cost; it can easily be applied to conduct many kinds of tasks owing to its simplicity and efficiency; and most importantly, it does not need to depend so much on the quality of initial prompts, because it can improve the prompts through learning more effectively based on enormous existing data. To evaluate the proposed approach, we conducted a series of experiments with several types of NLP datasets and compared them to others. The results highlight the importance of coupling metaheuristic search algorithms and LLMs for prompt optimization, proving that the presented approach can be adopted to enhance the performance of LLMs.
引用
收藏
页数:17
相关论文
共 57 条
[1]  
Alva-Manchego F, 2020, 58TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2020), P4668
[2]  
Bach SH, 2022, PROCEEDINGS OF THE 60TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2022): PROCEEDINGS OF SYSTEM DEMONSTRATIONS, P93
[3]   Evolution of Semantic Similarity-A Survey [J].
Chandrasekaran, Dhivya ;
Mago, Vijay .
ACM COMPUTING SURVEYS, 2021, 54 (02)
[4]   A Survey on Evaluation of Large Language Models [J].
Chang, Yupeng ;
Wang, Xu ;
Wang, Jindong ;
Wu, Yuan ;
Yang, Linyi ;
Zhu, Kaijie ;
Chen, Hao ;
Yi, Xiaoyuan ;
Wang, Cunxiang ;
Wang, Yidong ;
Ye, Wei ;
Zhang, Yue ;
Chang, Yi ;
Yu, Philip S. ;
Yang, Qiang ;
Xie, Xing .
ACM TRANSACTIONS ON INTELLIGENT SYSTEMS AND TECHNOLOGY, 2024, 15 (03)
[5]  
Cho S, 2023, FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, ACL 2023, P960
[6]  
Deng Mingkai, 2022, P 2022 C EMP METH NA, P3369, DOI DOI 10.18653/V1/2022.EMNLP-MAIN.222
[7]  
Guo J., 2024, INT C LEARN REPR
[8]  
Hu M., 2004, P 10 ACM SIGKDD INT, DOI DOI 10.1145/1014052.1014073
[9]   Survey of Hallucination in Natural Language Generation [J].
Ji, Ziwei ;
Lee, Nayeon ;
Frieske, Rita ;
Yu, Tiezheng ;
Su, Dan ;
Xu, Yan ;
Ishii, Etsuko ;
Bang, Ye Jin ;
Madotto, Andrea ;
Fung, Pascale .
ACM COMPUTING SURVEYS, 2023, 55 (12)
[10]   How Can We Know What Language Models Know? [J].
Jiang, Zhengbao ;
Xu, Frank F. ;
Araki, Jun ;
Neubig, Graham .
TRANSACTIONS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, 2020, 8 :423-438