Diverse Prompts: Illuminating the Prompt Space of Large Language Models with MAP-Elites

Gabriel Machado Santos, Rita Maria da Silva Julia, Marcelo Zanchetta do Nascimento
4/19/2025
cs.CLcs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{santos2025diverse,
  title  = {Diverse Prompts: Illuminating the Prompt Space of Large Language Models with MAP-Elites},
  author = {Gabriel Machado Santos and Rita Maria da Silva Julia and Marcelo Zanchetta do Nascimento},
  year   = {2025},
  eprint = {2504.14367},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.14367v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.14367.svg)](https://codeofpaper.com/paper/2504.14367)

Discussion