Paper summary: Large Language Models as Optimizers
OPRO describes an optimisation task in natural language and lets an LLM propose new solutions from a history of past solutions and scores, used mainly to optimise prompts.
Problem
Many optimisation problems have no gradients. Prompt engineering is one of them: the “parameters” are words, and the objective is task accuracy.
Method
Optimization by PROmpting (OPRO) writes the optimisation problem in plain language. Each step:
- A meta-prompt describes the task and lists previously generated solutions with their scores, sorted.
- The LLM proposes new candidate solutions.
- The candidates are evaluated and added to the meta-prompt for the next step.
The authors first try it on linear regression and small travelling-salesman problems, then focus on prompt optimisation: searching for an instruction (e.g. a phrase prepended to a maths question) that maximises accuracy.
Key results
Across several LLMs, the paper reports that OPRO-optimised prompts outperform human-designed prompts by up to 8% on GSM8K and up to 50% on Big-Bench Hard tasks. On small travelling-salesman instances, the conclusion notes OPRO performs on par with some hand-crafted heuristics.
Limitations
The paper is explicit that OPRO isn’t meant to beat gradient-based optimisers or dedicated solvers. The length of the LLM’s context window makes large problems (high-dimensional regression, travelling salesman with many nodes) hard to fit in the prompt. On larger TSP instances, a classic farthest-insertion heuristic overtakes the LLMs. The paper also includes a section analysing overfitting in prompt optimisation.
Sources
- Large Language Models as Optimizers (arXiv:2309.03409) — arXiv
- Hugging Face Daily Papers, 2023-09-08 — Hugging Face
- Large Language Models as Optimizers (arXiv HTML full text) — arXiv
- Code repository (linked in the paper) — GitHub
This is a summary written from the linked public sources. Figures and numbers are as reported there.