Prompt engineering is essential for optimizing large language models (LLMs), yet the link between prompt structures and task performance remains underexplored. This work introduces an evolutionary approach that combines context-free grammar (CFG) with the MAP-Elites algorithm to systematically explore the prompt space. Our method prioritizes quality and diversity, generating high-performing and structurally varied prompts while analyzing their alignment with diverse tasks by varying traits such as the number of examples (shots) and reasoning depth. By systematically mapping the phenotypic space, we reveal how structural variations influence LLM performance, offering actionable insights for task-specific and adaptable prompt design. Evaluated on seven BigBench Lite tasks across multiple LLMs, our results underscore the critical interplay of quality and diversity, advancing the effectiveness and versatility of LLMs.
Experience-Guided Reflective Co-Evolution of Prompts and Heuristics for Automatic Algorithm Design
Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学北京校区人工智能学院);Department of Data Science, City University of Hong Kong(香港城市大学数据科学系);School of Information, Renmin University of China(中国人民大学信息学院);WeChat, Tencent(微信,腾讯)
Chinese Information Processing Laboratory, Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所信息处理实验室);University of Chinese Academy of Sciences(中国科学院大学);Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络安全学院);National Computer Network Emergency Response Technical Team/Coordination Center of China(中国国家计算机网络应急技术协调中心)
ELITE: Enhanced Language-Image Toxicity Evaluation for Safety
Yonsei University(延世大学);Kyung Hee University(庆熙大学);Korea Institute of Science(韩国科学研究院);Seoul National University(首尔国立大学);Sookmyung Women's University(_sookmyung女子大学)