mlsanityData to 7 Oct 2026

Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization

arXiv 2406.15708 ↗First posted 22 Jun 2024cs.CL cs.AI cs.LGcited by 28

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  4. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  5. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  6. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  7. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  8. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
  9. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
  10. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
  11. 2023PaLM 2 Technical Reportcited by 1,154
  12. 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
31 more
  1. 2023Large Language Models as Optimizerscited by 830
  2. 2023Gemini: A Family of Highly Capable Multimodal Modelscited by 810
  3. 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 803
  4. 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 778
  5. 2022Automatic Chain of Thought Prompting in Large Language Modelscited by 684
  6. 2023Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolutioncited by 521
  7. 2024A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applicationscited by 428
  8. 2021True Few-Shot Learning with Language Modelscited by 343
  9. 2022Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLPcited by 316
  10. 2023State of What Art? A Call for Multi-Prompt LLM Evaluationcited by 299
  11. 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 226
  12. 2024Many-Shot In-Context Learningcited by 203
  13. 2023EvoPrompt: Connecting LLMs with Evolutionary Algorithms Yields Powerful Prompt Optimizerscited by 189
  14. 2023What Makes Good Examples for Visual In-Context Learning?cited by 150
  15. 2023Compositional Exemplars for In-context Learningcited by 143
  16. 2023Large Language Models as Evolutionary Optimizerscited by 122
  17. 2024Gecko: Versatile Text Embeddings Distilled from Large Language Modelscited by 81
  18. 2022On the Relation between Sensitivity and Accuracy in In-context Learningcited by 71
  19. 2022Self-Generated In-Context Learning: Leveraging Auto-regressive Language Models as a Demonstration Generatorcited by 68
  20. 2023InstructZero: Efficient Instruction Optimization for Black-Box Large Language Modelscited by 68
  21. 2018Bayesian Optimization of Combinatorial Structurescited by 64
  22. 2023In-context Example Selection with Influencescited by 60
  23. 2023Prompt Engineering a Prompt Engineercited by 53
  24. 2022TEMPERA: Test-Time Prompting via Reinforcement Learningcited by 50
  25. 2023AutoPEFT: Automatic Configuration Search for Parameter-Efficient Fine-Tuningcited by 49
  26. 2022GPS: Genetic Prompt Search for Efficient Few-shot Learningcited by 37
  27. 2022Bayesian Optimization over Discrete and Mixed Spaces via Probabilistic Reparameterizationcited by 35
  28. 2023Prompt Optimization via Adversarial In-Context Learningcited by 33
  29. 2023AutoHint: Automatic Prompt Optimization with Hint Generationcited by 29
  30. 2023Automatic Engineering of Long Promptscited by 14
  31. 2024Towards Truly Zero-shot Compositional Visual Reasoning with LLMs as Programmerscited by 14

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 17; 2026: 8.

28 papers.

Sort:

By area:

  1. 2025Multi-Agent Design: Optimizing Agents with Better Prompts and Topologiescited by 106
  2. 2024SPRIG: Improving Large Language Model Performance by System Prompt Optimizationcited by 28
  3. 2025Heterogeneous Swarms: Jointly Optimizing Model Roles and Weights for Multi-LLM Systemscited by 22
  4. 2025Towards LLMs Robustness to Changes in Prompt Format Stylescited by 21
  5. 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generationcited by 20
  6. 2025Prompting in the Dark: Assessing Human Performance in Prompt Engineering for Data Labeling When Gold Labels Are Absentcited by 15
  7. 2024Hyperband-based Bayesian Optimization for Black-box Prompt Selectioncited by 9
  8. 2024A Comparative Study of DSPy Teleprompter Algorithms for Aligning Large Language Models Evaluation Metrics to Human Evaluationcited by 7
  9. 2025Meta-Prompt Optimization for LLM-Based Sequential Decision Makingcited by 7
  10. 2025A Survey of Automatic Prompt Optimization with Instruction-focused Heuristic-based Search Algorithmcited by 6
  11. 2025CAPO: Cost-Aware Prompt Optimizationcited by 6
  12. 2025What Makes a Good Natural Language Prompt?cited by 6
16 more
  1. 2025Scaling Textual Gradients via Sampling-Based Momentumcited by 5
  2. 2025Code-enabled language models can outperform reasoning models on diverse taskscited by 4
  3. 2025Towards Compute-Optimal Many-Shot In-Context Learningcited by 3
  4. 2025Agentic Policy Optimization via Instruction-Policy Co-Evolutioncited by 2
  5. 2026TextReg: Mitigating Prompt Distributional Overfitting via Regularized Text-Space Optimizationcited by 2
  6. 2025Towards more Contextual Agents: An extractor-Generator Optimization Frameworkcited by 1
  7. 2025Evolutionary Prompt Optimization Discovers Emergent Multimodal Reasoning Strategies in Vision-Language Modelscited by 1
  8. 2026MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLscited by 1
  9. 2026CANTANTE: Optimizing Agentic Systems via Contrastive Credit Attributioncited by 1
  10. 2026FORGE: Self-Evolving Agent Memory With No Weight Updates via Population Broadcastcited by 1
  11. 2025Audit, Alignment, and Optimization of LM-Powered Subroutines with Application to Public Comment Processingcited by 0
  12. 2025DelvePO: Direction-Guided Self-Evolving Framework for Flexible Prompt Optimizationcited by 0
  13. 2026APEX: Automated Prompt Engineering eXpert with Dynamic Data Selectioncited by 0
  14. 2026SAGE: Stochastic Prompt Optimization via Agent-Guided Explorationcited by 0
  15. 2026Towards Spec Learning: Inference-Time Alignment from Preference Pairscited by 0
  16. 2026Large language models in medical time series analysiscited by 0