arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.06729cs.CL
收藏

逆向提示工程

Reverse Prompt Engineering

Northwestern University(西北大学)

Hanqing Li, Diego Klabjan

AI总结:

针对黑盒、零样本且仅有少量模型输出的场景,提出结合LLM与遗传算法优化的免训练提示反演框架,实现比现有方法更贴合原提示的高质量恢复。

摘要:

我们在严格的黑盒、零样本和有限数据条件下,探索了一个新的语言模型反演问题。我们提出了一个新颖的免训练框架,仅使用来自语言模型的有限数量文本输出来重建提示。现有方法依赖于在训练和推理时都能获得大量输出,这一假设在现实世界中并不现实,而且它们有时会产生乱码文本。相比之下,我们依赖有限资源的方法始终能够生成连贯且具有语义意义的提示。我们的框架利用大型语言模型以及受遗传算法启发的优化过程来有效恢复提示。在源自公开来源的多个数据集上的实验结果表明,我们的方法实现了高质量的提示恢复,并且生成的提示在语义和功能上比当前最先进的方法更贴合原始提示。此外,所介绍的用例研究证明了该方法在基于扰动提示生成高质量文本数据方面的强大潜力。

英文摘要:

We explore a new language model inversion problem under strict black-box, zero-shot, and limited data conditions. We propose a novel training-free framework that reconstructs prompts using only a limited number of text outputs from a language model. Existing methods rely on the availability of a large number of outputs for both training and inference, an assumption that is unrealistic in the real world, and they can sometimes produce garbled text. In contrast, our approach, which relies on limited resources, consistently yields coherent and semantically meaningful prompts. Our framework leverages a large language model together with an optimization process inspired by the genetic algorithm to effectively recover prompts. Experimental results on several datasets derived from public sources indicate that our approach achieves high-quality prompt recovery and generates prompts more semantically and functionally aligned with the originals than current state-of-the-art methods. Additionally, use-case studies introduced demonstrate the method's strong potential for generating high-quality text data on perturbed prompts.

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

↑