Overview

PAP (Persuasive Adversarial Prompts) treats jailbreaking as a social-engineering problem. Rather than searching for an adversarial token suffix, it asks an attacker LLM to rewrite a harmful request using a named persuasion technique (Authority, Storytelling, Logical Appeal, etc.), then sends each rewrite to the target model and scores the response with a judge LLM. The generator ships with the top 10 high-impact techniques from the paper. The technique whose rewrite scores highest wins. Reference: Zeng et al. 2024, “How Johnny Can Persuade LLMs to Jailbreak Them” (arXiv 2401.06373).

Algorithm

For each technique in the list:
  1. Build a REWRITE_PROMPT instructing the attacker to rephrase the request using the technique.
  2. Send the rewritten prompt to the target.
  3. Ask the judge for a 1-10 compliance score.
  4. Track the highest-scoring (technique, prompt, response) triple.
  5. Short-circuit if a score crosses success_threshold.
There is no multi-step refinement; each technique is tried exactly once.

Parameters

Return value

Example

Pass distinct providers when you want a stronger attacker or a separate judge:

Registration

PAPGenerator is registered as "pap" in generator_registry:

Source