Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Add prompt converters for atbash, caesar, morse and cipherchat from paper #223

Merged
merged 7 commits into from
Jun 10, 2024

Conversation

jl8771
Copy link
Contributor

@jl8771 jl8771 commented May 28, 2024

Description

Implementation of CipherChat from this paper.

Implements one converter for Atbash cipher, Caesar cipher, Morse cipher with option to prepend plaintext "expert" description text.

Novel role-play based CipherChat implemented as jailbreak template.

Tests and Documentation

Added tests and documentation for each converter:

  • Atbash cipher converter with single word and punctuation
  • Caesar cipher converter with manually specified offset, single word and punctuation
  • Morse code converter with repeated word separated by space

pyrit/prompt_converter/atbash_converter.py Outdated Show resolved Hide resolved
pyrit/prompt_converter/atbash_converter.py Outdated Show resolved Hide resolved
pyrit/prompt_converter/atbash_converter.py Outdated Show resolved Hide resolved
pyrit/prompt_converter/caesar_converter.py Outdated Show resolved Hide resolved
pyrit/prompt_converter/atbash_converter.py Show resolved Hide resolved
tests/test_prompt_converter.py Outdated Show resolved Hide resolved
pyrit/prompt_converter/cipher_converter.py Outdated Show resolved Hide resolved
pyrit/prompt_converter/caesar_converter.py Outdated Show resolved Hide resolved
pyrit/prompt_converter/caesar_converter.py Outdated Show resolved Hide resolved
pyrit/prompt_converter/cipher_converter.py Outdated Show resolved Hide resolved
@rlundeen2 rlundeen2 marked this pull request as ready for review June 10, 2024 18:35
Copy link
Contributor

@rlundeen2 rlundeen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Conflicts need to be fixed
  • pre-commits run (I can kick it off in CI but can help locally)
  • PR title and description updated from "draft"

@jl8771 jl8771 changed the title [DRAFT] FEAT: Add prompt converters for atbash, caesar, morse and cipherchat from paper FEAT: Add prompt converters for atbash, caesar, morse and cipherchat from paper Jun 10, 2024
@rlundeen2 rlundeen2 merged commit fae9fc3 into Azure:main Jun 10, 2024
5 checks passed
@jl8771 jl8771 deleted the converters/cipher branch July 1, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants