arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.17346cs.LGcs.AI
收藏

基于人类反馈的提示优化

Prompt Optimization with Human Feedback

National University of Singapore(新加坡国立大学);Massachusetts Institute of Technology(麻省理工学院);Institute of Data Science, National University of Singapore(新加坡国立大学数据科学研究院)

Xiaoqiang Lin, Zhongxiang Dai, Arun Verma, See-Kiong Ng, Patrick Jaillet, Bryan Kian Hsiang Low

AI总结:

针对黑盒大模型仅依赖人类偏好反馈的提示优化问题,提出基于决斗式老虎机策略的APOHF算法,在多种任务上以少量反馈高效找到优质提示。

摘要:

大型语言模型(LLMs)在各种任务中展现了卓越的性能。然而,LLMs的性能在很大程度上依赖于输入的提示,这催生了近期许多关于提示优化的研究。然而,以往的工作通常需要获得一个数值评分来评估每个提示的质量。不幸的是,当人类用户与黑盒LLM交互时,获得这样的评分往往不可行且不可靠。相反,从人类用户那里获得偏好反馈通常要容易得多且更可靠,即向用户展示由一对提示生成的响应,并询问用户更喜欢哪一个。因此,在本文中,我们研究了基于人类反馈的提示优化(POHF)问题,其目标仅使用人类偏好反馈来优化黑盒LLM的提示。受决斗式老虎机(dueling bandits)的启发,我们设计了一种理论上严谨的策略,在每次迭代中选择一对提示来查询偏好反馈,并由此引入了我们命名为自动POHF(APOHF)的算法。我们将APOHF算法应用于各种任务,包括优化用户指令、文本到图像生成模型的提示优化,以及基于人类反馈的响应优化(即使用APOHF的变体进一步细化响应)。结果表明,我们的APOHF能够使用少量偏好反馈实例高效地找到好的提示。我们的代码可在\url{https://github.com/xqlin98/APOHF}找到。

英文摘要:

Large language models (LLMs) have demonstrated remarkable performances in various tasks. However, the performance of LLMs heavily depends on the input prompt, which has given rise to a number of recent works on prompt optimization. However, previous works often require the availability of a numeric score to assess the quality of every prompt. Unfortunately, when a human user interacts with a black-box LLM, attaining such a score is often infeasible and unreliable. Instead, it is usually significantly easier and more reliable to obtain preference feedback from a human user, i.e., showing the user the responses generated from a pair of prompts and asking the user which one is preferred. Therefore, in this paper, we study the problem of prompt optimization with human feedback (POHF), in which we aim to optimize the prompt for a black-box LLM using only human preference feedback. Drawing inspiration from dueling bandits, we design a theoretically principled strategy to select a pair of prompts to query for preference feedback in every iteration, and hence introduce our algorithm named automated POHF (APOHF). We apply our APOHF algorithm to various tasks, including optimizing user instructions, prompt optimization for text-to-image generative models, and response optimization with human feedback (i.e., further refining the response using a variant of our APOHF). The results demonstrate that our APOHF can efficiently find a good prompt using a small number of preference feedback instances. Our code can be found at \url{https://github.com/xqlin98/APOHF}.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑