The Importance of Directional Feedback for LLM-based Optimizers
Allen Nie, Ching-An Cheng, Andrey Kolobov, Adith Swaminathan
TL;DR
The paper investigates using large language models as general optimizers for problems expressed in natural language, introducing a formal distinction between directional and non-directional feedback and showing that directional signals enable more effective search in text space. It proposes Sequential Prompt Optimization, a framework where an LLM-based optimizer updates a tunable prompt $p_{\text{tunable}}$ based on a history of outputs, rewards, and feedback, aided by a Feedback Synthesizer and a Prompt Selector to ensure monotonic improvement. The authors provide theoretical arguments and empirical evidence across two domains—the optimization of mathematical functions and the crafting of poetry prompts—demonstrating that directional (or synthesized) feedback yields greater stability and efficiency than non-directional or reward-only feedback. The work suggests broad potential for LLM-based optimizers to tackle diverse, nontraditional optimization tasks, while calling for further methods to generate effective directional feedback in practice.
Abstract
We study the potential of using large language models (LLMs) as an interactive optimizer for solving maximization problems in a text space using natural language and numerical feedback. Inspired by the classical optimization literature, we classify the natural language feedback into directional and non-directional, where the former is a generalization of the first-order feedback to the natural language space. We find that LLMs are especially capable of optimization when they are provided with {directional feedback}. Based on this insight, we design a new LLM-based optimizer that synthesizes directional feedback from the historical optimization trace to achieve reliable improvement over iterations. Empirically, we show our LLM-based optimizer is more stable and efficient in solving optimization problems, from maximizing mathematical functions to optimizing prompts for writing poems, compared with existing techniques.
