Saved in:
Bibliographic Details
Main Authors: Li, Mingqi, Aggarwal, Karan, Xie, Yong, Ahmad, Aitzaz, Lau, Stephen
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.15199
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917783103602688
author Li, Mingqi
Aggarwal, Karan
Xie, Yong
Ahmad, Aitzaz
Lau, Stephen
author_facet Li, Mingqi
Aggarwal, Karan
Xie, Yong
Ahmad, Aitzaz
Lau, Stephen
contents As LLMs evolve, significant effort is spent on manually crafting prompts. While existing prompt optimization methods automate this process, they rely solely on learning from incorrect samples, leading to a sub-optimal performance. Additionally, an unexplored challenge in the literature is prompts effective for prior models may not perform well on newer versions or different languages. We propose the Learning from Contrastive Prompts (LCP) framework to address these gaps, enhancing both prompt optimization and adaptation. LCP employs contrastive learning to generate effective prompts by analyzing patterns in good and bad prompt examples. Our evaluation on the Big-Bench Hard dataset shows that LCP has a win rate of over 76% over existing methods in prompt optimization and demonstrates strong adaptability across different model versions, families, and languages. LCP offers a systematic approach to prompt engineering, reducing manual effort in deploying LLMs across varied contexts.
format Preprint
id arxiv_https___arxiv_org_abs_2409_15199
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Learning from Contrastive Prompts: Automated Optimization and Adaptation
Li, Mingqi
Aggarwal, Karan
Xie, Yong
Ahmad, Aitzaz
Lau, Stephen
Computation and Language
Artificial Intelligence
As LLMs evolve, significant effort is spent on manually crafting prompts. While existing prompt optimization methods automate this process, they rely solely on learning from incorrect samples, leading to a sub-optimal performance. Additionally, an unexplored challenge in the literature is prompts effective for prior models may not perform well on newer versions or different languages. We propose the Learning from Contrastive Prompts (LCP) framework to address these gaps, enhancing both prompt optimization and adaptation. LCP employs contrastive learning to generate effective prompts by analyzing patterns in good and bad prompt examples. Our evaluation on the Big-Bench Hard dataset shows that LCP has a win rate of over 76% over existing methods in prompt optimization and demonstrates strong adaptability across different model versions, families, and languages. LCP offers a systematic approach to prompt engineering, reducing manual effort in deploying LLMs across varied contexts.
title Learning from Contrastive Prompts: Automated Optimization and Adaptation
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2409.15199