Extracting Prompts by Inverting LLM Outputs
<|reference_start|>Extracting Prompts by Inverting LLM Outputs: 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 learns to extract prompts without access to the model's logits and without adversarial or jailbreaking queries. In contrast to previous work, 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.<|reference_end|>
@article{zhang2024extracting,
    title={Extracting Prompts by Inverting LLM Outputs},
    author={Collin Zhang, John X. Morris, Vitaly Shmatikov},
    journal={arXiv preprint arXiv:2405.15012},
    year={2024},
    archivePrefix={arXiv},
    eprint={2405.15012},
    primaryClass={cs.CL cs.LG}
}