paper-with-me

Papers

Automatic Prompt Optimization with "Gradient Descent" and Beam Search

2023-05-04 · Reid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee, Chenguang Zhu, Michael Zeng

Large Language Models (LLMs) have shown impressive performance as general purpose agents, but their abilities remain highly dependent on prompts which are hand written with onerous trial-and-error effort. We propose a simple and nonparametric solution to this problem, Automatic Prompt Optimization (APO), which is inspired by numerical gradient descent to automatically improve prompts, assuming access to training data and an LLM API. The algorithm uses minibatches of data to form natural language "gradients" that criticize the current prompt. The gradients are then "propagated" into the prompt by editing the prompt in the opposite semantic direction of the gradient. These gradient descent steps are guided by a beam search and bandit selection procedure which significantly improves algorithmic efficiency. Preliminary results across three benchmark NLP tasks and the novel problem of LLM jailbreak detection suggest that Automatic Prompt Optimization can outperform prior prompt editing techniques and improve an initial prompt's performance by up to 31%, by using data to rewrite vague task descriptions into more precise annotation instructions.

📄 PDF Abstract BibTeX arXiv:2305.03495

Code (6)

microsoft/lmops 공식 구현 jax
batorskq/prl pytorch
lastmile-ai/aiconfig
seasonyao/automatic_prompt_optimization_physician_prompting
yongchao98/promst pytorch
zcrwind/prefer pytorch

Tasks

LLM Jailbreak

Similar Papers 제목 키워드 기반

Introducing MAPO: Momentum-Aided Gradient Descent Prompt Optimization

2024-10-25 · Anthony Cui, Pranav Nandyalam, Ethan Cheung, Kevin Zhu

Momentum-Aided Prompt Optimization (MAPO) enhances the efficiency and efficacy of prompt optimization for Large Language Models (LLMs). Building on ProTeGi, MAPO uses positive natural language "gradients" and a momentum-…

Prompt Engineering

A Meta-Learning Based Gradient Descent Algorithm for MU-MIMO Beamforming

2022-10-24 · Jing-Yuan Xia, Zhixiong Yang, Tong Qiu, Huaizhang Liao 외

Multi-user multiple-input multiple-output (MU-MIMO) beamforming design is typically formulated as a non-convex weighted sum rate (WSR) maximization problem that is known to be NP-hard. This problem is solved either by it…

Deep LearningMeta-Learning

A Learning Aided Flexible Gradient Descent Approach to MISO Beamforming

2022-06-21 · Zhixiong Yang, Jing-Yuan Xia, Junshan Luo, Shuanghui Zhang 외

This paper proposes a learning aided gradient descent (LAGD) algorithm to solve the weighted sum rate (WSR) maximization problem for multiple-input single-output (MISO) beamforming. The proposed LAGD algorithm directly o…

When Gradient Descent Meets Derivative-Free Optimization: A Match Made in Black-Box Scenario

2023-05-17 · Chengcheng Han, Liqing Cui, Renyu Zhu, Jianing Wang 외

Large pre-trained language models (PLMs) have garnered significant attention for their versatility and potential for solving a wide spectrum of natural language processing (NLP) tasks. However, the cost of running these …

Knowledge Distillation

Multigroup Multicast Design for Pinching-Antenna Systems: Waveguide-Division or Waveguide-Multiplexing?

2025-06-19 · Shan Shan, Chongjun Ouyang, Yong Li, Yuanwei Liu

This article addresses the design of multigroup multicast communications in the pinching-antenna system (PASS). A PASS-enabled multigroup transmission framework is proposed to maximize multicast rates under a couple of t…