Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization
Not on the map. Why?
Abstract (arXiv)
Large language models have demonstrated remarkable capabilities, but their performance is heavily reliant on effective prompt engineering. Automatic prompt optimization (APO) methods are designed to automate this and can be broadly categorized into those targeting instructions (instruction optimization, IO) vs. those targeting exemplars (exemplar optimization, EO). Despite their shared objective, these have evolved rather independently, with IO receiving more research attention recently. This paper seeks to bridge this gap by comprehensively comparing the performance of representative IO and EO techniques both isolation and combination on a diverse set of challenging tasks. Our findings reveal that intelligently reusing model-generated input-output pairs obtained from evaluating prompts on the validation set as exemplars, consistently improves performance on top of IO methods but is currently under-investigated. We also find that despite the recent focus on IO, how we select exemplars can outweigh how we optimize instructions, with EO strategies as simple as random search outperforming state-of-the-art IO methods with seed instructions without any optimization. Moreover, we observe a synergy between EO and IO, with optimal combinations surpassing the individual contributions. We conclude that studying exemplar optimization both as a standalone method and its optimal combination with instruction optimization remain a crucial aspect of APO and deserve greater consideration in future research, even in the era of highly capable instruction-following models.
Key facts. Cited by 28 papers in the map (data through 7 Oct 2026). Builds on 43 of its 62 references that are in the map. First posted on arXiv 22 Jun 2024.
Builds on
43 of 62 references.
References · 43
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2023PaLM 2 Technical Reportcited by 1,154
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
31 more
- 2023Large Language Models as Optimizerscited by 830
- 2023Gemini: A Family of Highly Capable Multimodal Modelscited by 810
- 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 803
- 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 778
- 2022Automatic Chain of Thought Prompting in Large Language Modelscited by 684
- 2023Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolutioncited by 521
- 2024A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applicationscited by 428
- 2021True Few-Shot Learning with Language Modelscited by 343
- 2022Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLPcited by 316
- 2023State of What Art? A Call for Multi-Prompt LLM Evaluationcited by 299
- 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 226
- 2024Many-Shot In-Context Learningcited by 203
- 2023EvoPrompt: Connecting LLMs with Evolutionary Algorithms Yields Powerful Prompt Optimizerscited by 189
- 2023What Makes Good Examples for Visual In-Context Learning?cited by 150
- 2023Compositional Exemplars for In-context Learningcited by 143
- 2023Large Language Models as Evolutionary Optimizerscited by 122
- 2024Gecko: Versatile Text Embeddings Distilled from Large Language Modelscited by 81
- 2022On the Relation between Sensitivity and Accuracy in In-context Learningcited by 71
- 2022Self-Generated In-Context Learning: Leveraging Auto-regressive Language Models as a Demonstration Generatorcited by 68
- 2023InstructZero: Efficient Instruction Optimization for Black-Box Large Language Modelscited by 68
- 2018Bayesian Optimization of Combinatorial Structurescited by 64
- 2023In-context Example Selection with Influencescited by 60
- 2023Prompt Engineering a Prompt Engineercited by 53
- 2022TEMPERA: Test-Time Prompting via Reinforcement Learningcited by 50
- 2023AutoPEFT: Automatic Configuration Search for Parameter-Efficient Fine-Tuningcited by 49
- 2022GPS: Genetic Prompt Search for Efficient Few-shot Learningcited by 37
- 2022Bayesian Optimization over Discrete and Mixed Spaces via Probabilistic Reparameterizationcited by 35
- 2023Prompt Optimization via Adversarial In-Context Learningcited by 33
- 2023AutoHint: Automatic Prompt Optimization with Hint Generationcited by 29
- 2023Automatic Engineering of Long Promptscited by 14
- 2024Towards Truly Zero-shot Compositional Visual Reasoning with LLMs as Programmerscited by 14
Built on by
Citing papers per year: 2024: 3; 2025: 17; 2026: 8.
28 papers.
Sort:
By area:
- 2025Multi-Agent Design: Optimizing Agents with Better Prompts and Topologiescited by 106
- 2024SPRIG: Improving Large Language Model Performance by System Prompt Optimizationcited by 28
- 2025Heterogeneous Swarms: Jointly Optimizing Model Roles and Weights for Multi-LLM Systemscited by 22
- 2025Towards LLMs Robustness to Changes in Prompt Format Stylescited by 21
- 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generationcited by 20
- 2025Prompting in the Dark: Assessing Human Performance in Prompt Engineering for Data Labeling When Gold Labels Are Absentcited by 15
- 2024Hyperband-based Bayesian Optimization for Black-box Prompt Selectioncited by 9
- 2024A Comparative Study of DSPy Teleprompter Algorithms for Aligning Large Language Models Evaluation Metrics to Human Evaluationcited by 7
- 2025Meta-Prompt Optimization for LLM-Based Sequential Decision Makingcited by 7
- 2025A Survey of Automatic Prompt Optimization with Instruction-focused Heuristic-based Search Algorithmcited by 6
- 2025CAPO: Cost-Aware Prompt Optimizationcited by 6
- 2025What Makes a Good Natural Language Prompt?cited by 6
16 more
- 2025Scaling Textual Gradients via Sampling-Based Momentumcited by 5
- 2025Code-enabled language models can outperform reasoning models on diverse taskscited by 4
- 2025Towards Compute-Optimal Many-Shot In-Context Learningcited by 3
- 2025Agentic Policy Optimization via Instruction-Policy Co-Evolutioncited by 2
- 2026TextReg: Mitigating Prompt Distributional Overfitting via Regularized Text-Space Optimizationcited by 2
- 2025Towards more Contextual Agents: An extractor-Generator Optimization Frameworkcited by 1
- 2025Evolutionary Prompt Optimization Discovers Emergent Multimodal Reasoning Strategies in Vision-Language Modelscited by 1
- 2026MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLscited by 1
- 2026CANTANTE: Optimizing Agentic Systems via Contrastive Credit Attributioncited by 1
- 2026FORGE: Self-Evolving Agent Memory With No Weight Updates via Population Broadcastcited by 1
- 2025Audit, Alignment, and Optimization of LM-Powered Subroutines with Application to Public Comment Processingcited by 0
- 2025DelvePO: Direction-Guided Self-Evolving Framework for Flexible Prompt Optimizationcited by 0
- 2026APEX: Automated Prompt Engineering eXpert with Dynamic Data Selectioncited by 0
- 2026SAGE: Stochastic Prompt Optimization via Agent-Guided Explorationcited by 0
- 2026Towards Spec Learning: Inference-Time Alignment from Preference Pairscited by 0
- 2026Large language models in medical time series analysiscited by 0
- 2026Large language models in medical time series analysis7 Sep 2026
- 2026Towards Spec Learning: Inference-Time Alignment from Preference Pairs22 Jun 2026
- 2026SAGE: Stochastic Prompt Optimization via Agent-Guided Exploration17 Jun 2026
- 2026APEX: Automated Prompt Engineering eXpert with Dynamic Data Selection9 Jun 2026
- 2026TextReg: Mitigating Prompt Distributional Overfitting via Regularized Text-Space Optimization20 May 2026
- 2026FORGE: Self-Evolving Agent Memory With No Weight Updates via Population Broadcast15 May 2026
- 2026CANTANTE: Optimizing Agentic Systems via Contrastive Credit Attribution13 May 2026
- 2026MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLs26 Jan 2026
- 2025Agentic Policy Optimization via Instruction-Policy Co-Evolution1 Dec 2025
- 2025Code-enabled language models can outperform reasoning models on diverse tasks23 Oct 2025
- 2025DelvePO: Direction-Guided Self-Evolving Framework for Flexible Prompt Optimization21 Oct 2025
- 2025Towards Compute-Optimal Many-Shot In-Context Learning22 Jul 2025
16 more
- 2025Audit, Alignment, and Optimization of LM-Powered Subroutines with Application to Public Comment Processing10 Jul 2025
- 2025What Makes a Good Natural Language Prompt?7 Jun 2025
- 2025Scaling Textual Gradients via Sampling-Based Momentum31 May 2025
- 2025CAPO: Cost-Aware Prompt Optimization22 Apr 2025
- 2025Towards LLMs Robustness to Changes in Prompt Format Styles9 Apr 2025
- 2025Evolutionary Prompt Optimization Discovers Emergent Multimodal Reasoning Strategies in Vision-Language Models30 Mar 2025
- 2025A Survey of Automatic Prompt Optimization with Instruction-focused Heuristic-based Search Algorithm26 Feb 2025
- 2025Towards more Contextual Agents: An extractor-Generator Optimization Framework18 Feb 2025
- 2025Prompting in the Dark: Assessing Human Performance in Prompt Engineering for Data Labeling When Gold Labels Are Absent16 Feb 2025
- 2025Heterogeneous Swarms: Jointly Optimizing Model Roles and Weights for Multi-LLM Systems6 Feb 2025
- 2025Multi-Agent Design: Optimizing Agents with Better Prompts and Topologies4 Feb 2025
- 2025Meta-Prompt Optimization for LLM-Based Sequential Decision Making2 Feb 2025
- 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generation1 Feb 2025
- 2024A Comparative Study of DSPy Teleprompter Algorithms for Aligning Large Language Models Evaluation Metrics to Human Evaluation19 Dec 2024
- 2024Hyperband-based Bayesian Optimization for Black-box Prompt Selection10 Dec 2024
- 2024SPRIG: Improving Large Language Model Performance by System Prompt Optimization18 Oct 2024
- 2025Multi-Agent Design: Optimizing Agents with Better Prompts and Topologiescited by 106
- 2025Towards more Contextual Agents: An extractor-Generator Optimization Frameworkcited by 1
- 2026MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLscited by 1
- 2026FORGE: Self-Evolving Agent Memory With No Weight Updates via Population Broadcastcited by 1
- 2026FORGE: Self-Evolving Agent Memory With No Weight Updates via Population Broadcast15 May 2026
- 2026MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLs26 Jan 2026
- 2025Towards more Contextual Agents: An extractor-Generator Optimization Framework18 Feb 2025
- 2025Multi-Agent Design: Optimizing Agents with Better Prompts and Topologies4 Feb 2025
- 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generationcited by 20
- 2025Code-enabled language models can outperform reasoning models on diverse taskscited by 4
- 2025Agentic Policy Optimization via Instruction-Policy Co-Evolutioncited by 2
- 2025Evolutionary Prompt Optimization Discovers Emergent Multimodal Reasoning Strategies in Vision-Language Modelscited by 1
- 2025Agentic Policy Optimization via Instruction-Policy Co-Evolution1 Dec 2025
- 2025Code-enabled language models can outperform reasoning models on diverse tasks23 Oct 2025
- 2025Evolutionary Prompt Optimization Discovers Emergent Multimodal Reasoning Strategies in Vision-Language Models30 Mar 2025
- 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generation1 Feb 2025
- 2024A Comparative Study of DSPy Teleprompter Algorithms for Aligning Large Language Models Evaluation Metrics to Human Evaluationcited by 7
- 2025Audit, Alignment, and Optimization of LM-Powered Subroutines with Application to Public Comment Processingcited by 0
- 2026Towards Spec Learning: Inference-Time Alignment from Preference Pairscited by 0
- 2026Towards Spec Learning: Inference-Time Alignment from Preference Pairs22 Jun 2026
- 2025Audit, Alignment, and Optimization of LM-Powered Subroutines with Application to Public Comment Processing10 Jul 2025
- 2024A Comparative Study of DSPy Teleprompter Algorithms for Aligning Large Language Models Evaluation Metrics to Human Evaluation19 Dec 2024
- 2024SPRIG: Improving Large Language Model Performance by System Prompt Optimizationcited by 28
- 2025Heterogeneous Swarms: Jointly Optimizing Model Roles and Weights for Multi-LLM Systemscited by 22
- 2025Towards LLMs Robustness to Changes in Prompt Format Stylescited by 21
- 2025Prompting in the Dark: Assessing Human Performance in Prompt Engineering for Data Labeling When Gold Labels Are Absentcited by 15
- 2024Hyperband-based Bayesian Optimization for Black-box Prompt Selectioncited by 9
- 2025Meta-Prompt Optimization for LLM-Based Sequential Decision Makingcited by 7
- 2025A Survey of Automatic Prompt Optimization with Instruction-focused Heuristic-based Search Algorithmcited by 6
- 2025CAPO: Cost-Aware Prompt Optimizationcited by 6
- 2025What Makes a Good Natural Language Prompt?cited by 6
- 2025Scaling Textual Gradients via Sampling-Based Momentumcited by 5
- 2025Towards Compute-Optimal Many-Shot In-Context Learningcited by 3
- 2026TextReg: Mitigating Prompt Distributional Overfitting via Regularized Text-Space Optimizationcited by 2
12 most cited of 15 All 15 (JSON)
- 2026Large language models in medical time series analysis7 Sep 2026
- 2026SAGE: Stochastic Prompt Optimization via Agent-Guided Exploration17 Jun 2026
- 2026APEX: Automated Prompt Engineering eXpert with Dynamic Data Selection9 Jun 2026
- 2026TextReg: Mitigating Prompt Distributional Overfitting via Regularized Text-Space Optimization20 May 2026
- 2025Towards Compute-Optimal Many-Shot In-Context Learning22 Jul 2025
- 2025What Makes a Good Natural Language Prompt?7 Jun 2025
- 2025Scaling Textual Gradients via Sampling-Based Momentum31 May 2025
- 2025CAPO: Cost-Aware Prompt Optimization22 Apr 2025
- 2025Towards LLMs Robustness to Changes in Prompt Format Styles9 Apr 2025
- 2025A Survey of Automatic Prompt Optimization with Instruction-focused Heuristic-based Search Algorithm26 Feb 2025
- 2025Prompting in the Dark: Assessing Human Performance in Prompt Engineering for Data Labeling When Gold Labels Are Absent16 Feb 2025
- 2025Heterogeneous Swarms: Jointly Optimizing Model Roles and Weights for Multi-LLM Systems6 Feb 2025
12 newest of 15 All 15 (JSON)