Soft Begging: Modular and Efficient Shielding of LLMs against Prompt Injection and Jailbreaking based on Prompt Tuning

Simon Ostermann, Kevin Baum, Christoph Endres, Julia Masloh, Patrick Schramowski
7/3/2024
cs.CRcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

Prompt injection (both direct and indirect) and jailbreaking are now recognized as significant issues for large language models (LLMs), particularly due to their potential for harm in application-integrated contexts. This extended abstract explores a novel approach to protecting LLMs from such attacks, termed "soft begging." This method involves training soft prompts to counteract the effects of corrupted prompts on the LLM's output. We provide an overview of prompt injections and jailbreaking, introduce the theoretical basis of the "soft begging" technique, and discuss an evaluation of its effectiveness.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ostermann2024soft,
  title  = {Soft Begging: Modular and Efficient Shielding of LLMs against Prompt Injection and Jailbreaking based on Prompt Tuning},
  author = {Simon Ostermann and Kevin Baum and Christoph Endres and Julia Masloh and Patrick Schramowski},
  year   = {2024},
  eprint = {2407.03391},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.03391v1}
}

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/2407.03391.svg)](https://codeofpaper.com/paper/2407.03391)

Discussion