PyRIT
PyRIT copied to clipboard
FEAT: Generalize Colloquial Wordswap Attack Converter
Is your feature request related to a problem? Please describe.
The converter in colloquial_wordswap_converter.py needs to be generalized to use different versions of colloquial word swaps. Currently, it is only implemented to allow for custom dictionary inputs and defaults to Singaporean colloquial context.
Describe the solution you'd like
- Create a YAML file in
datasets\prompts_convertersor a directory forColloquialWordSwap - Add the dictionary of words (the default one that is currently in the converter) as a YAML file that can be passed into the constructor. The default can be Singaporean.
- Create additional versions of word swaps as an example of other word swap contexts this converter can be used for!
Additional context
The attack module is originally adapted from Project Moonshot, referenced in #376.