Pr$εε$mpt: Sanitizing Sensitive Prompts for LLMs

Amrita Roy Chowdhury, David Glukhov, Divyam Anshumaan, Prasad Chalasani, Nicolas Papernot +2 more
4/7/2025
cs.CRcs.LG

No official code found. Best implementation: danshumaan/preempt (16 stars, last commit 2025-04-21).

Abstract

The rise of large language models (LLMs) has introduced new privacy challenges, particularly during inference where sensitive information in prompts may be exposed to proprietary LLM APIs. In this paper, we address the problem of formally protecting the sensitive information contained in a prompt while maintaining response quality. To this end, first, we introduce a cryptographically inspired notion of a prompt sanitizer which transforms an input prompt to protect its sensitive tokens. Second, we propose Pr$εε$mpt, a novel system that implements a prompt sanitizer. Pr$εε$mpt categorizes sensitive tokens into two types: (1) those where the LLM's response depends solely on the format (such as SSNs, credit card numbers), for which we use format-preserving encryption (FPE); and (2) those where the response depends on specific values, (such as age, salary) for which we apply metric differential privacy (mDP). Our evaluation demonstrates that Pr$εε$mpt is a practical method to achieve meaningful privacy guarantees, while maintaining high utility compared to unsanitized prompts, and outperforming prior methods

View on arXivView PDF

Code Implementations(1)

danshumaan/preemptCommunity100%

Code repository for Preempt

160Python, Jupyter NotebookApr 13, 20251 years ago

Similar Papers

Cite this paper

@article{chowdhury2025prmpt,
  title  = {Pr$εε$mpt: Sanitizing Sensitive Prompts for LLMs},
  author = {Amrita Roy Chowdhury and David Glukhov and Divyam Anshumaan and Prasad Chalasani and Nicolas Papernot and Somesh Jha and Mihir Bellare},
  year   = {2025},
  eprint = {2504.05147},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.05147v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.05147.svg)](https://codeofpaper.com/paper/2504.05147)

Discussion