atlas

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

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

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: In-context learning analysis · 3 citations (OpenAlex)

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.

Compares instruction optimization (IO) and exemplar optimization (EO) for automatic prompt optimization on BBH and MMLU with black-box PaLM 2, Gemini, and GPT models, finding that optimized exemplars often outweigh optimized instructions and that joint optimization works best.

Problem

Automatic prompt optimization has focused on instructions while exemplars are often handcrafted or ignored; it is unclear how their relative importance and joint optimization compare under black-box access and a comparable budget.

Approach

Uses model-generated exemplars from the validation set (correctly answered examples) as a free by-product and optimizes them with simple search (random search, mutation), then combines them with SoTA IO methods such as APE, ProTeGi, PromptAgent and OPRO, showing EO can outweigh IO and that mixing both under a fixed budget yields synergy.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add mutation-based exemplar optimization to the seed instructionPaLM 2 text-bison-002 · BBHaverage test accuracy (%): 60.30 -> 72.92Helped
Add ProTeGi instruction optimization without exemplar optimizationPaLM 2 text-bison-002 · BBHaverage test accuracy (%): 60.30 -> 68.13Helped
Add mutation-based exemplar optimization after ProTeGiPaLM 2 text-bison-002 · BBHaverage test accuracy (%): 68.13 -> 77.29Helped
Replace no exemplar optimization with random-search exemplar optimizationPaLM 2 text-bison-002 · BBHaverage test accuracy (%): 60.30 -> 71.16Helped
Replace random exemplars with mutation-optimized exemplarsPaLM 2 text-bison-002 · BBHaverage test accuracy (%): 70.81 -> 77.29Helped
Add ProTeGi instruction optimization without exemplar optimizationGemini 1.0 Pro · BBHaverage test accuracy (%): 63.14 -> 65.91Helped
Add mutation-based exemplar optimization to the seed instructionGemini 1.0 Pro · BBHaverage test accuracy (%): 63.14 -> 75.77Helped
Add mutation-based exemplar optimization after ProTeGiGemini 1.0 Pro · BBHaverage test accuracy (%): 65.91 -> 79.01Helped
Add random-search exemplar optimization to the seed instructionPaLM 2 text-bison-002 · MMLUaverage test accuracy (%): 65.77 -> 72.75Helped
Add ProTeGi instruction optimization while using random-search exemplarsPaLM 2 text-bison-002 · MMLUaverage test accuracy (%): 72.75 -> 72.31Hurt
Add ProTeGi instruction optimization without exemplar optimizationGemini 1.5 Flash · BBHaverage test accuracy (%): 75.07 -> 80.39Helped
Add random-search exemplar optimization to the seed instructionGemini 1.5 Flash · BBHaverage test accuracy (%): 75.07 -> 83.25Helped

Surprising findings

Limitations

Experimental setup

Datasets: BIG-Bench Hard MMLU

Benchmarks: BIG-Bench Hard MMLU

Metrics: accuracy

Baselines: No IO APE ProTeGi PromptAgent OPRO PromptBreeder

Builds on: APE ProTeGi PromptAgent OPRO DSPy

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