| name | promptquine-evolving-in-context-prompts |
| title | Evolving Prompts In-Context: An Open-ended, Self-replicating Perspective |
| version | 0.0.2 |
| engine | skillxiv-v0.0.2-claude-opus-4.6 |
| license | MIT |
| url | https://arxiv.org/abs/2506.17930 |
| keywords | ["PromptOptimization","EvolutionarySearch","InContextLearning","AutomatedPrompting"] |
| description | Automatically discovers optimal in-context learning prompts through evolutionary token pruning that removes redundant demonstrations to create effective 'gibberish' prompts. Matches state-of-the-art optimization with low-data regimes. Use for automated prompt discovery without manual tuning or human expertise. |
PromptQuine: Evolutionary Token Pruning for Optimal In-Context Learning
Conventional wisdom says that good in-context learning prompts must be well-formed, semantically coherent examples that clearly demonstrate the task. PromptQuine challenges this by discovering that removing tokens from coherent demonstrations to create seemingly incoherent sequences often improves performance. This counterintuitive finding suggests language models respond to minimal features rather than full linguistic structure. PromptQuine formalizes this as an evolutionary search problem: given a prompt with n tokens, discover which subset of m tokens maximizes task performance. The result is a framework that discovers effective prompts faster and cheaper than human optimization or prior automatic methods.
The insight is that natural language prompts contain redundant features. Strategic token removal eliminates this redundancy while preserving core task-relevant information that models actually use. This "Partial Context Hypothesis" explains why seemingly garbled prompts work—they contain just enough signal.
Core Concept
PromptQuine treats prompt optimization as an evolutionary search where the population is binary token masks. Each mask represents which tokens to keep from an original demonstration. Genetic algorithms with regularized evolution search this high-dimensional space, using low-data task performance as the fitness function. The framework includes:
- Token Mask Representation: Binary vector indicating which tokens are retained (1) or pruned (0)
- Bit-Flip Mutations: Only allow 1→0 operations (removing tokens), preventing expansion
- Calibration-then-Selection: Re-rank candidates to reduce overfitting to small validation sets
- Tournament Selection: Probabilistic selection favoring high-fitness masks
- Regularized Evolution: Balance exploration vs. exploitation to avoid premature convergence
The search landscape exhibits surprising properties: sparse pruned prompts often plateau at excellent performance, suggesting models extract sufficient information from minimal tokens.
Architecture Overview
- Genetic Algorithm Core: Population of binary masks evolving through mutation and selection
- Fitness Function: Task performance on small validation set (low-data regime)
- Mutation Strategy: Token removal (bit-flip 1→0) only
- Calibration Module: Re-ranking to mitigate overfitting
- Tournament Selection: Fitness-biased probabilistic selection
- Stopping Criteria: Convergence when elite fitness plateaus