Skip to main content
QUICK REVIEW

[Paper Review] Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization

Xingchen Wan, Ruoxi Sun|arXiv (Cornell University)|Jun 22, 2024
Teaching and Learning ProgrammingComputer Science3 citations
TL;DR

This paper investigates the relative and combined impact of instruction optimization (IO) and exemplar selection (ES) in automatic prompt optimization (APO) for large language models. It demonstrates that reusing model-generated exemplars from the validation set significantly boosts performance over IO alone, with simple ES methods like random search outperforming state-of-the-art IO, and that combining IO and ES yields synergistic gains, challenging the current research focus on IO.

ABSTRACT

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.

Motivation & Objective

  • To compare the performance of representative instruction optimization (IO) and exemplar selection (ES) methods in automatic prompt optimization (APO).
  • To investigate whether exemplar selection can outperform instruction optimization despite IO receiving more research attention.
  • To evaluate the synergy between IO and ES under constrained computational budgets.
  • To examine the potential of reusing model-generated input-output pairs from the validation set as exemplars.
  • To challenge the prevailing research focus on IO by demonstrating the underappreciated value of ES.

Proposed method

  • The authors evaluate state-of-the-art IO and ES techniques on diverse, challenging tasks from BIG-Bench Hard (BBH) and MMLU benchmarks.
  • They use PaLM 2, Gemini 1.0, and Gemini 1.5 as target models to ensure generalizability.
  • For ES, they generate exemplars from model outputs on the validation set and reuse them as few-shot examples.
  • They compare isolated IO, isolated ES, and hybrid IO+ES strategies under identical computational budgets.
  • They use random search and other simple ES strategies to assess performance without complex optimization.
  • They analyze the impact of exemplar quality and selection strategy on final model performance.

Experimental results

Research questions

  • RQ1Does exemplar selection (ES) outperform instruction optimization (IO) in automatic prompt optimization?
  • RQ2Can simple exemplar selection strategies, such as random search, surpass state-of-the-art IO methods?
  • RQ3What is the performance gain from reusing model-generated exemplars from the validation set?
  • RQ4Is there a synergistic effect when combining IO and ES in APO?
  • RQ5How does the choice of exemplars compare in importance to instruction optimization in LLM prompting?

Key findings

  • Intelligently reusing model-generated exemplars from the validation set consistently improves performance over IO methods alone.
  • Simple exemplar selection strategies like random search outperform state-of-the-art instruction optimization methods when using seed instructions without optimization.
  • The performance gain from effective exemplar selection can eclipse that of advanced instruction optimization.
  • A combination of IO and ES yields superior results, demonstrating a synergistic effect that exceeds individual contributions.
  • The study reveals that state-of-the-art IO methods may implicitly generate high-quality exemplars, which contribute more to performance than the optimized instructions themselves.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.