arXiv:2411.06729cs.CL2024-11被引 5

不依赖训练,用少量输出逆推原始提示,效果更准更清晰。

Reverse Prompt Engineering

  • 用大模型+类遗传算法优化,零样本重建提示
  • 仅需少量输出即恢复高保真提示,优于现有方法
  • 适合数据受限场景,可生成高质量文本

我们研究在严格黑盒、零样本和数据有限条件下的语言模型逆问题。提出一种无需训练的框架,仅通过语言模型产生的少量文本输出即可重建提示。现有方法依赖大量输出进行训练和推理,现实不可行,且常产生混乱文本。相比之下,本方法在资源受限下始终生成连贯且语义清晰的提示。框架结合大语言模型与受遗传算法启发的优化过程,有效恢复提示。多个公开数据集上的实验表明,该方法实现高质量提示重建,生成的提示在语义和功能上均更接近原始提示,优于当前最先进方法。此外,案例研究显示该方法在扰动提示上生成高质量文本具有强潜力。

原文摘要 · Abstract (English)

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.

提示逆向零样本生成模型语言模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。