Task Facet Learning: A Structured Approach to Prompt Optimization

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Juneja, Gurusha, Jajoo, Gautam, Natarajan, Nagarajan, Li, Hua, Jiao, Jian, Sharma, Amit
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866918024694464512
author Juneja, Gurusha
Jajoo, Gautam
Natarajan, Nagarajan
Li, Hua
Jiao, Jian
Sharma, Amit
author_facet Juneja, Gurusha
Jajoo, Gautam
Natarajan, Nagarajan
Li, Hua
Jiao, Jian
Sharma, Amit
contents Given a task in the form of a basic description and its training examples, prompt optimization is the problem of synthesizing the given information into a text prompt for a large language model. Humans solve this problem by also considering the different facets that define a task (e.g., counter-examples, explanations, analogies) and including them in the prompt. However, it is unclear whether existing algorithmic approaches, based on iteratively editing a given prompt or automatically selecting a few in-context examples, can cover the multiple facets required to solve a complex task. In this work, we view prompt optimization as that of learning multiple facets of a task from a set of training examples. We exploit structure in the prompt optimization problem and break down a prompt into loosely coupled semantic sections. The proposed algorithm, UniPrompt, (1) clusters the input space and uses clustered batches so that each batch likely corresponds to a different facet of the task, and (2) utilizes a feedback mechanism to propose adding, editing or deleting a section, which in turn is aggregated over a batch to capture generalizable facets. Empirical evaluation on multiple datasets and a real-world task shows that prompts generated using \shortname{} obtain higher accuracy than human-tuned prompts and those from state-of-the-art methods. In particular, our algorithm can generate long, complex prompts that existing methods are unable to generate. Code for UniPrompt is available at https://aka.ms/uniprompt.
format Preprint
id arxiv_https___arxiv_org_abs_2406_10504
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Task Facet Learning: A Structured Approach to Prompt Optimization
Juneja, Gurusha
Jajoo, Gautam
Natarajan, Nagarajan
Li, Hua
Jiao, Jian
Sharma, Amit
Artificial Intelligence
Computation and Language
Machine Learning
Given a task in the form of a basic description and its training examples, prompt optimization is the problem of synthesizing the given information into a text prompt for a large language model. Humans solve this problem by also considering the different facets that define a task (e.g., counter-examples, explanations, analogies) and including them in the prompt. However, it is unclear whether existing algorithmic approaches, based on iteratively editing a given prompt or automatically selecting a few in-context examples, can cover the multiple facets required to solve a complex task. In this work, we view prompt optimization as that of learning multiple facets of a task from a set of training examples. We exploit structure in the prompt optimization problem and break down a prompt into loosely coupled semantic sections. The proposed algorithm, UniPrompt, (1) clusters the input space and uses clustered batches so that each batch likely corresponds to a different facet of the task, and (2) utilizes a feedback mechanism to propose adding, editing or deleting a section, which in turn is aggregated over a batch to capture generalizable facets. Empirical evaluation on multiple datasets and a real-world task shows that prompts generated using \shortname{} obtain higher accuracy than human-tuned prompts and those from state-of-the-art methods. In particular, our algorithm can generate long, complex prompts that existing methods are unable to generate. Code for UniPrompt is available at https://aka.ms/uniprompt.
title Task Facet Learning: A Structured Approach to Prompt Optimization
topic Artificial Intelligence
Computation and Language
Machine Learning
url https://arxiv.org/abs/2406.10504