eval_toolkit.adversarial#
12-technique character-injection bypass suite (core 6 from v0.43.0 +
advanced 6 from v0.47) for testing prompt-injection-detection scorers
under adversarial input perturbation. Each technique is a frozen
dataclass satisfying the TextTransform Protocol;
combine them via eval_toolkit.sweep().
|
Built-in immutable sequence. |
|
Built-in immutable sequence. |
|
Wrap the input in a Unicode bidi-RTL override block. |
|
Built-in immutable sequence. |
|
Randomly flip the case of alphabetic characters. |
|
Insert combining diacritic marks after random characters. |
|
Substitute Latin characters with Cyrillic/Greek homoglyph lookalikes. |
|
Insert invisible / zero-width Unicode characters between characters. |
|
Insert non-semantic punctuation between characters. |
|
Replace whitelisted words with deterministic synonyms. |
|
Strip HTML/XML-like tags from the input. |
|
Insert a single space inside each long enough word. |
|
Apply a Unicode normalization form to the input. |
|
Insert / substitute whitespace variants (regular, non-breaking, tab). |
|
Insert U+200B zero-width spaces between characters at the given ratio. |