arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.06553cs.CLcs.AIcs.LG
收藏

基于离线逆强化学习的查询依赖提示评估与优化

Query-Dependent Prompt Evaluation and Optimization with Offline Inverse RL

University of Cambridge(剑桥大学);DAMTP(应用数学与理论物理系)

Hao Sun, Alihan Hüyük, Mihaela van der Schaar

AI总结:

针对大语言模型零样本提示优化中被忽视的查询依赖问题及评估难、成本高的挑战,提出基于离线逆强化学习的Prompt-OIRL方法,通过离线奖励模型和N选最佳策略实现高效经济的查询依赖提示优化。

摘要:

本研究旨在通过零样本提示优化提升大语言模型(LLMs)的算术推理能力。我们发现此类优化中一个此前被忽视的目标——查询依赖性,并阐明了阻碍提示优化技术成功且经济设计的两个随之而来的挑战。一个主要问题是,在推理阶段没有标准答案可用时,缺乏有效的提示评估方法。同时,通过与LLMs交互来在广阔的自然语言提示空间中进行学习,被证明是资源密集型的。为解决此问题,我们提出Prompt-OIRL,该方法利用离线逆强化学习从离线提示示范数据中提取见解。这类数据是在可公开获取的数据集上对多种提示进行基准测试时产生的副产品。借助Prompt-OIRL,查询依赖的提示优化目标通过首先学习一个离线奖励模型来实现,该模型无需访问LLMs即可评估任意查询-提示对;随后采用N选最佳策略推荐最优提示。我们在不同规模的LLM和算术推理数据集上的实验评估,证实了所提方法的有效性和经济可行性。

英文摘要:

In this study, we aim to enhance the arithmetic reasoning ability of Large Language Models (LLMs) through zero-shot prompt optimization. We identify a previously overlooked objective of query dependency in such optimization and elucidate two ensuing challenges that impede the successful and economical design of prompt optimization techniques. One primary issue is the absence of an effective method to evaluate prompts during inference when the golden answer is unavailable. Concurrently, learning via interactions with the LLMs to navigate the expansive natural language prompting space proves to be resource-intensive. To address this, we introduce Prompt-OIRL, which harnesses offline inverse reinforcement learning to draw insights from offline prompting demonstration data. Such data exists as by-products when diverse prompts are benchmarked on open-accessible datasets. With Prompt-OIRL, the query-dependent prompt optimization objective is achieved by first learning an offline reward model. This model can evaluate any query-prompt pairs without accessing LLMs. Subsequently, a best-of-N strategy is deployed to recommend the optimal prompt. Our experimental evaluations across various LLM scales and arithmetic reasoning datasets underscore both the efficacy and economic viability of the proposed approach.

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

↑