Closed KutalVolkan closed 2 weeks ago
Wow that was (once again) very fast! Just tiny comments, and I agree with @rdheekonda 's comments as well, of course. Thanks a ton!
Wow that was (once again) very fast! Just tiny comments, and I agree with @rdheekonda 's comments as well, of course. Thanks a ton!
You're welcome! Thanks to you guys, I'm still learning a ton of stuff, so I'm just giving something back. :)
Overview
This PR introduces a new
DiacriticConverter
class underpyrit.prompt_converter
to enable transformations using diacritical marks on specified characters. This converter is inspired by techniques outlined in resources such as Bypassing Azure AI Content Safety Guardrails, where diacritical marks can be applied to bypass content filters. The converter provides an effective tool for testing the resilience of AI content safety mechanisms against such techniques.Work Completed
Implemented
DiacriticConverter
:pyrit.prompt_converter
.Edge Case Handling:
target_chars
is empty."aeiou"
fortarget_chars
if unspecified.Test Suite:
pytest
tests covering default and custom targets, emptytarget_chars
, and invalid accent handling.Related Issue
Resolves FEAT add diacritics converter #515