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

基于意图的提示校准:利用合成边界案例增强提示优化

Intent-based Prompt Calibration: Enhancing prompt optimization with synthetic boundary cases

Elad Levi, Eli Brosh, Matan Friedmann

AI总结:

提出一种基于意图的提示校准方法,通过迭代生成合成边界案例并优化提示,在有限标注样本下超越现有方法,适用于审核和生成等真实任务。

摘要:

提示工程是一项具有挑战性且重要的任务,因为大型语言模型(LLMs)对给定提示的高度敏感性以及文本任务指令固有的模糊性。自动提示工程对于实现LLMs的最佳性能至关重要。近期研究展示了LLMs通过采用包含上次试验结果的元提示并提议改进提示来自动进行提示工程的能力。然而,这需要一个高质量的基准来比较不同的提示,在许多实际应用场景中获取这样的基准既困难又昂贵。在这项工作中,我们引入了一种新的自动提示工程方法,使用一个校准过程,该过程迭代地将提示细化到用户意图。在优化过程中,系统联合生成边界用例的合成数据,并根据生成的数据集优化提示。我们展示了我们的方法在真实世界任务(如审核和生成)上相对于强大的专有模型的有效性。我们的方法在有限数量的标注样本下优于最先进的方法。此外,我们验证了系统每个关键组件的优势。我们的系统以模块化方式构建,便于适应其他任务。代码可在https://github.com/Eladlev/AutoPrompt获取。

英文摘要:

Prompt engineering is a challenging and important task due to the high sensitivity of Large Language Models (LLMs) to the given prompt and the inherent ambiguity of a textual task instruction. Automatic prompt engineering is essential to achieve optimized performance from LLMs. Recent studies have demonstrated the capabilities of LLMs to automatically conduct prompt engineering by employing a meta-prompt that incorporates the outcomes of the last trials and proposes an improved prompt. However, this requires a high-quality benchmark to compare different prompts, which is difficult and expensive to acquire in many real-world use cases. In this work, we introduce a new method for automatic prompt engineering, using a calibration process that iteratively refines the prompt to the user intent. During the optimization process, the system jointly generates synthetic data of boundary use cases and optimizes the prompt according to the generated dataset. We demonstrate the effectiveness of our method with respect to strong proprietary models on real-world tasks such as moderation and generation. Our method outperforms state-of-the-art methods with a limited number of annotated samples. Furthermore, we validate the advantages of each one of the system's key components. Our system is built in a modular way, facilitating easy adaptation to other tasks. The code is available $\href{https://github.com/Eladlev/AutoPrompt}{here}$.

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

↑