[논문 리뷰] Large Language Models Are Human-Level Prompt Engineers
이 논문은 Automatic Prompt Engineer (APE)를 소개합니다. 이는 LLM 주도 방법으로, 자연어 지시문을 자동으로 생성하고 선택하여 LLM을 유도하며, 다수의 작업에서 인간 수준의 제로샷 성능을 달성하고 소수-shot 학습 및 진실성 제어를 향상시킵니다.
By conditioning on natural language instructions, large language models (LLMs) have displayed impressive capabilities as general-purpose computers. However, task performance depends significantly on the quality of the prompt used to steer the model, and most effective prompts have been handcrafted by humans. Inspired by classical program synthesis and the human approach to prompt engineering, we propose Automatic Prompt Engineer (APE) for automatic instruction generation and selection. In our method, we treat the instruction as the "program," optimized by searching over a pool of instruction candidates proposed by an LLM in order to maximize a chosen score function. To evaluate the quality of the selected instruction, we evaluate the zero-shot performance of another LLM following the selected instruction. Experiments on 24 NLP tasks show that our automatically generated instructions outperform the prior LLM baseline by a large margin and achieve better or comparable performance to the instructions generated by human annotators on 19/24 tasks. We conduct extensive qualitative and quantitative analyses to explore the performance of APE. We show that APE-engineered prompts can be applied to steer models toward truthfulness and/or informativeness, as well as to improve few-shot learning performance by simply prepending them to standard in-context learning prompts. Please check out our webpage at https://sites.google.com/view/automatic-prompt-engineer.
연구 동기 및 목표
- LLMs를 위한 효과적인 지시를 자동으로 생성함으로써 프롬프트 설계에 대한 인간 노력을 줄이는 것을 목표로 한다.
- 지시 생성을 흑박스 최적화로 다루는 자연어 프로그램 합성으로 프레이밍한다.
- 지시 생성을 위한 제안을 하고 품질을 평가하는 데 LLM을 활용한다.
- 다양한 작업에서 자동으로 설계된 프롬프트가 인간이 제작한 프롬프트에 맞서거나 이를 능가할 수 있음을 보인다.
제안 방법
- 지시 생성을 최적화로 형식화한다: 기대 점수 f(rho, D_train, M)을 최대화하는 rho를 찾는다.
- 제안 엔진으로 LLM을 활용하여 시연으로부터 후보 지시문 U를 생성한다.
- 선택된 점수 f를 사용하여 후보를 학습 데이터에서 평가하고 상위 성과자를 선택한다.
- 시연으로부터 지시문 후보를 생성하기 위해 forward 또는 reverse 생성을 사용한다.
- 높은 점수를 받는 후보를 중심으로 제안 집합을 다듬기 위해 반복 몬테카를로 탐색을 선택적으로 적용한다.
- 실행 정확도나 로그 확률을 점수 함수로 사용하고, 계산을 절약하기 위한 적응형 다단계 평가를 적용한다.
실험 결과
연구 질문
- RQ1자동으로 생성된 지시문이 제로샷 및 소수샷 작업에서 인간이 제작한 프롬프트와 대등하거나 이를 초과할 수 있는가?
- RQ2지시 유도 및 BIG-Bench 작업에서 LLM이 생성한 프롬프트가 탐욕적 프롬프트 선택을 넘어 개선되는가?
- RQ3APE가 효과적인 제로샷 체인-오브-생각(chain-of-thought) 프롬프트를 발견하고 출력이 진실성이나 정보성으로 향하도록 유도할 수 있는가?
주요 결과
- APE는 24개의 Instruction Induction 작업에서 인간 프롬프트와 동등하거나 더 나은 제로샷 성능을 달성하고 21개 BIG-Bench 작업 중 17개에서 그렇다.
- InstructGPT를 사용한 24개 작업의 사분위 중앙평균(IQM)은 APE가 인간이 설계한 프롬프트를 능가함을 시사한다(IQM 0.810 vs 0.749).
- 맥락 내 예시 이전에 APE 생성 지시문을 추가하면 대부분의 작업에서 소수 샘플 학습이 향상된다.
- APE는 효과적인 제로샷 체인-오브-생각 프롬프트를 발견하고 모델을 진실성이나 정보성으로 향하도록 이끌 수 있다.
- TruthfulQA에서 APE가 제안한 프롬프트는 강한 진실성과 정보성의 균형을 달성하며, 때로는 인간 프롬프트보다 더 높은 true+informative 정확도를 보인다.
더 나은 연구,지금 바로 시작하세요
논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.