The Python Risk Identification Tool for generative AI (PyRIT) is an open access automation framework to empower security professionals and machine learning engineers to proactively find risks in their generative AI systems.
This PR introduces a ZeroWidthConverter class under pyrit.prompt_converter, designed to inject zero-width spaces between characters in a given text. The primary purpose of this converter is to support testing of content safety mechanisms by creating transformed text that may bypass certain filters while appearing unchanged to the human eye.
Work Completed
Implemented ZeroWidthConverter Class:
Functionality: Injects zero-width spaces (Unicode U+200B) between each character in the input text to create an unaltered visual appearance that may circumvent content safety filters.
Testing:
Basic Functionality: Confirms that zero-width spaces are correctly inserted between each character.
Overview
This PR introduces a
ZeroWidthConverter
class underpyrit.prompt_converter
, designed to inject zero-width spaces between characters in a given text. The primary purpose of this converter is to support testing of content safety mechanisms by creating transformed text that may bypass certain filters while appearing unchanged to the human eye.Work Completed
Implemented
ZeroWidthConverter
Class:U+200B
) between each character in the input text to create an unaltered visual appearance that may circumvent content safety filters.Testing:
Related Issue
Resolves Add Zero-Width Converter for Text Transformation #516