SwarmPrompt: Swarm Intelligence-Driven Prompt Optimization Using Large Language Models
Thilak Shekhar Shriyan, Janavi Srinivasan, Suhail Ahmed, Richa Sharma, Arti Arya
2025
Abstract
The advancement of generative AI and large language models (LLMs) has made developing effective text prompts challenging, particularly for less experienced users. LLMs often struggle with nuances, tone, and context, necessitating precise prompt engineering for generating high-quality outputs. Previous research has utilized approaches such as gradient descent, reinforcement learning, and evolutionary algorithms for optimizing prompts. This paper introduces SwarmPrompt, a novel approach that employs swarm intelligence-based optimization techniques, specifically Particle Swarm Optimization and Grey Wolf Optimization, to enhance and optimize prompts. SwarmPrompt combines the language processing capabilities of LLMs with swarm operators to iteratively modify prompts and identify the best-performing ones. This method reduces human intervention, surpasses human-engineered prompts, and decreases the time and resources required for prompt optimization. Experimental results indicate that SwarmPrompt outperforms human-engineered prompts by 4% for classification tasks and 2% for simplification and summarization tasks. Moreover, SwarmPrompt converges faster, requiring half the number of iterations while providing superior results. This approach offers an efficient and effective alternative to existing methods. Our code is available at SwarmPrompt.
DownloadPaper Citation
in Harvard Style
Shriyan T., Srinivasan J., Ahmed S., Sharma R. and Arya A. (2025). SwarmPrompt: Swarm Intelligence-Driven Prompt Optimization Using Large Language Models. In Proceedings of the 17th International Conference on Agents and Artificial Intelligence - Volume 3: ICAART; ISBN 978-989-758-737-5, SciTePress, pages 86-93. DOI: 10.5220/0013090300003890
in Bibtex Style
@conference{icaart25,
author={Thilak Shriyan and Janavi Srinivasan and Suhail Ahmed and Richa Sharma and Arti Arya},
title={SwarmPrompt: Swarm Intelligence-Driven Prompt Optimization Using Large Language Models},
booktitle={Proceedings of the 17th International Conference on Agents and Artificial Intelligence - Volume 3: ICAART},
year={2025},
pages={86-93},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0013090300003890},
isbn={978-989-758-737-5},
}
in EndNote Style
TY - CONF
JO - Proceedings of the 17th International Conference on Agents and Artificial Intelligence - Volume 3: ICAART
TI - SwarmPrompt: Swarm Intelligence-Driven Prompt Optimization Using Large Language Models
SN - 978-989-758-737-5
AU - Shriyan T.
AU - Srinivasan J.
AU - Ahmed S.
AU - Sharma R.
AU - Arya A.
PY - 2025
SP - 86
EP - 93
DO - 10.5220/0013090300003890
PB - SciTePress