Extracting Prompts by Inverting LLM Outputs
Cornell University
PDF 由论文原始站点提供,PaperCompass 不保存论文文件。DOI 10.18653/v1/2024.emnlp-main.819 ↗
摘要
We consider the problem of language model inversion: given outputs of a language model, we seek to extract the prompt that generated these outputs. We develop a new black-box method, output2prompt, that extracts prompts without access to the model’s logits and without adversarial or jailbreaking queries. Unlike previous methods, output2prompt only needs outputs of normal user queries. To improve memory efficiency, output2prompt employs a new sparse encoding techique. We measure the efficacy of output2prompt on a variety of user and system prompts and demonstrate zero-shot transferability across different LLMs.