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

ABSTRACT 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.

Authors

Institutions

Publication Details

Journal
Expert Systems
Published
2025-04-29
DOI
https://doi.org/10.1111/exsy.70049
Citations
2
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
4.96
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Wei‐Po Lee, Ping-Heng Hsieh
2 citations
Expert Systems
Topic Modeling
4.96
article

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

Wei‐Po Lee, Ping-Heng Hsieh
article en
2 citations

Abstract

ABSTRACT 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.

Expert SystemsVol. 42(6)
National Sun Yat-sen University (TW)
Openalex Percentile: Top 6%
Topic Modeling
4.96
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.