최적화 도구로서의 대형 언어 모델
Large Language Models as Optimizers
September 7, 2023
저자: Chengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoc V. Le, Denny Zhou, Xinyun Chen
cs.AI
초록
최적화는 어디에나 존재합니다. 도함수 기반 알고리즘은 다양한 문제에 대한 강력한 도구로 사용되어 왔지만, 기울기의 부재는 많은 실제 응용 분야에서 어려움을 야기합니다. 본 연구에서는 대규모 언어 모델(LLM)을 최적화 도구로 활용하는 간단하면서도 효과적인 접근법인 PROmpting을 통한 최적화(OPRO)를 제안합니다. 이 방법에서는 최적화 작업을 자연어로 기술하고, 각 최적화 단계에서 LLM이 이전에 생성된 솔루션과 그 값들을 포함한 프롬프트로부터 새로운 솔루션을 생성한 후, 이를 평가하여 다음 최적화 단계를 위한 프롬프트에 추가합니다. 우리는 먼저 선형 회귀와 외판원 문제에서 OPRO를 시연한 후, 작업 정확도를 극대화하는 지시문을 찾는 프롬프트 최적화로 넘어갑니다. 다양한 LLM을 사용하여, OPRO로 최적화된 최고의 프롬프트가 인간이 설계한 프롬프트보다 GSM8K에서 최대 8%, Big-Bench Hard 작업에서 최대 50% 더 우수한 성능을 보임을 입증합니다.
English
Optimization is ubiquitous. While derivative-based algorithms have been
powerful tools for various problems, the absence of gradient imposes challenges
on many real-world applications. In this work, we propose Optimization by
PROmpting (OPRO), a simple and effective approach to leverage large language
models (LLMs) as optimizers, where the optimization task is described in
natural language. In each optimization step, the LLM generates new solutions
from the prompt that contains previously generated solutions with their values,
then the new solutions are evaluated and added to the prompt for the next
optimization step. We first showcase OPRO on linear regression and traveling
salesman problems, then move on to prompt optimization where the goal is to
find instructions that maximize the task accuracy. With a variety of LLMs, we
demonstrate that the best prompts optimized by OPRO outperform human-designed
prompts by up to 8% on GSM8K, and by up to 50% on Big-Bench Hard tasks.