Reproduce “Large Language Models as Optimizers” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Chengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoc V. Le, Denny Zhou, Xinyun Chen
OPRO uses a language model as a black-box optimizer, proposing instructions, scoring them, and feeding candidates and scores into later prompts. On GSM8K, with PaLM 2-L scoring and PaLM 2-L-IT optimizing, its best instruction reached 80.2% test accuracy, versus 71.8% for “Let’s think step by step.” This result is specific to that setup; gains vary across tasks and models.
Key insights
- Large Language Models (LLMs) can act as black-box optimizers by learning from an in-context 'optimization trajectory' of past solutions and their scores.
- Providing a sorted history of solution-score pairs (ascending order of score) within the meta-prompt enables the LLM to infer effective improvement directions.
- Integrating task exemplars and numerical scores into the meta-prompt is crucial for the LLM's performance in understanding and optimizing the target task.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.