The paper proposes a framework called Optimization by PROmpting (OPRO) that utilizes large language models (LLMs) as optimizers. The key idea is to describe the optimization problem in natural language and instruct the LLM to iteratively generate new solutions based on the problem description and the previously found solutions.
The paper first showcases OPRO on two classic optimization problems - linear regression and the Traveling Salesman Problem (TSP). The results demonstrate that LLMs can properly capture the optimization directions on small-scale problems merely based on the past optimization trajectory provided in the meta-prompt.
The main application of OPRO is prompt optimization, where the goal is to find instructions that maximize the task accuracy for natural language tasks. The paper conducts comprehensive evaluations on several LLMs, including text-bison, PaLM 2-L, gpt-3.5-turbo, and gpt-4. Starting from initial prompts with low task accuracies, the authors show that all LLMs are able to serve as optimizers and consistently improve the performance of the generated prompts through iterative optimization. The OPRO-optimized prompts outperform human-designed prompts by up to 8% on GSM8K and by up to 50% on Big-Bench Hard tasks.
The paper also analyzes the transferability of the found prompts, observing that the OPRO-optimized prompts for GSM8K transfer well to other math reasoning benchmarks. Additionally, the authors investigate the impact of various meta-prompt design choices and the phenomenon of semantically similar instructions achieving drastically different accuracies.
To Another Language
from source content
arxiv.org
Key Insights Distilled From
by Chengrun Yan... at arxiv.org 04-16-2024
https://arxiv.org/pdf/2309.03409.pdfDeeper Inquiries