atlas

Research map / Large language models / Language, safety and interpretability

Evolving Prompts In-Context: An Open-ended, Self-replicating Perspective

ICML 2025 · Large language models › Language, safety and interpretability · approach: In-context learning analysis

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that pruning random ICL demonstrations into unnatural "gibberish" prompts can match or beat prompt optimization baselines, and proposes PromptQuine, an evolutionary search that finds such pruning strategies using only in-context tokens.

Problem

Prompt design for in-context learning is typically driven by well-crafted instructions and demonstrations, yet effective prompt optimization is costly and unreliable; the paper asks whether pruning tokens from random ICL prompts (including into incoherent text) can improve performance and how to sea

Approach

Frames prompt compression as guided prompt search over fixed-order token subsequences of ICL prompts, and uses a genetic algorithm with regularized evolution (PromptQuine) that mutates prompts by pruning random tokens, selecting by held-out fitness, so the search discovers unnatural but effective prompts without external tokens or attribution guidance.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Prune a 1-shot ICL prompt with PromptQuineMeta-Llama-3-8B-Instruct · Classification tasks (average accuracy)accuracy (%): 69.6 -> 77.5Helped
Prune a 4-shot ICL prompt with PromptQuine instead of using TAPruningMeta-Llama-3-8B-Instruct · Classification tasks (average accuracy)accuracy (%): 77.3 -> 81.3Helped
Prune the zero-shot chain-of-thought trigger promptInstructGPT (text-davinci-002) · MultiArithaccuracy: 81.5 -> 86.7Helped
Use PromptQuine rather than TAPruningYelp sentiment transfer · Yelp sentiment transfer (all reported decoding/model settings)Joint Score: 30.2 -> 33.3; 54.6 -> 57.9; 59.6 -> 61.0; 68.1 -> 72.1Helped
Prune a 2-shot ICL prompt with PromptQuineVicuna-7b-v1.5 · AdvBenchASR-EM: 50.4 -> 99.3Helped
Prune a 2-shot ICL prompt with PromptQuineMistral-7B-Instruct-v0.3 · AdvBenchASR-LLM: 47.2 -> 98.1Helped
Use steering-vector fitness instead of ASR-EM or ASR-LLM fitness (ablation)PromptQuine · AdvBenchASR-LLM: 97.4; 97.5; 94.2Hurt
Remove label words from the pruned prompt (ablation)PromptQuine-pruned ICL · Classification tasksperformanceHurt
Remove the entire output, including signal words and label words (ablation)PromptQuine-pruned ICL · Classification tasksperformanceHurt
Remove the entire output (ablation)PromptQuine-pruned ICL · SNLIperformanceHelped
Prune prompts across varied ICL templates (ablation)PromptQuine · SNLIaccuracy fluctuation: 60.8 -> 75.1Mixed
Prune prompts across varied ICL templates (ablation)PromptQuine · PIQAaccuracy fluctuation: 79.5 -> 82.1Mixed

Surprising findings

Limitations

Experimental setup

Datasets: SST-2 Subj AG's News Yelp-5 SNLI Yahoo PIQA Yelp sentiment transfer AdvBench GSM8K MAWPS MultiArith

Benchmarks: SST-2 Subj AG's News Yelp-5 SNLI Yahoo PIQA Yelp sentiment transfer AdvBench GSM8K MAWPS

Metrics: accuracy joint score attack success rate

Baselines: ICL (1-shot) ICL (4-shot) LLMLingua LLMLingua2 RLPrompt EvoPrompt Promptbreeder SAHCPruning

Builds on: Promptbreeder RLPrompt Threshold Accepting regularized evolution LLMLingua

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy