Azure / PyRIT

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.
MIT License
1.91k stars 366 forks source link

FEAT: Add Zero-Width-Converter #519

Closed KutalVolkan closed 2 weeks ago

KutalVolkan commented 3 weeks ago

Overview

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

  1. 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.
  2. Testing:

    • Basic Functionality: Confirms that zero-width spaces are correctly inserted between each character.

Related Issue

Resolves Add Zero-Width Converter for Text Transformation #516