Prompt Engineering a Prompt Engineer

Qinyuan Ye, Maxamed Axmed, Reid Pryzant, Fereshte Khani
11/9/2023
cs.CLcs.AIcs.LG

No official code found. Best implementation: INK-USC/PE2 (12 stars, MIT, last commit 2024-08-01).

Abstract

Prompt engineering is a challenging yet crucial task for optimizing the performance of large language models on customized tasks. It requires complex reasoning to examine the model's errors, hypothesize what is missing or misleading in the current prompt, and communicate the task with clarity. While recent works indicate that large language models can be meta-prompted to perform automatic prompt engineering, we argue that their potential is limited due to insufficient guidance for complex reasoning in the meta-prompt. We fill this gap by infusing into the meta-prompt three key components: detailed descriptions, context specification, and a step-by-step reasoning template. The resulting method, named PE2, exhibits remarkable versatility across diverse language tasks. It finds prompts that outperform "let's think step by step" by 6.3% on MultiArith and 3.1% on GSM8K, and outperforms competitive baselines on counterfactual tasks by 6.9%. Further, we show that PE2 can make targeted and highly specific prompt edits, rectify erroneous prompts, and induce multi-step plans for complex tasks.

View on arXivView PDF

Code Implementations(1)

INK-USC/PE2Community69%
MIT

Code for paper "Prompt Engineering a Prompt Engineer" (https://arxiv.org/abs/2311.05661)

121Shell, PythonJul 30, 20242 years agoMIT

Cite this paper

@article{ye2023prompt,
  title  = {Prompt Engineering a Prompt Engineer},
  author = {Qinyuan Ye and Maxamed Axmed and Reid Pryzant and Fereshte Khani},
  year   = {2023},
  eprint = {2311.05661},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.05661v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.05661.svg)](https://codeofpaper.com/paper/2311.05661)

Discussion