garak.probes.ansiescape
ANSI probe
Try to get model to produce ANSI codes. These can disrupt downstream processing.
We have a couple of different dimensions here: * the encoding can vary - raw binary, or an escaped version; * the technique used can vary - can we get OCS8, OCS52 * the action can also be different - log cursor, crash machine, install software etc.
- class garak.probes.ansiescape.AnsiEscaped(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/stable/docs/source/../../garak/_config.py'>)
Bases:
Probe
Probe for eliciting ANSI control codes from a model
ANSI escape codes can disrupt downstream processes. Try to get escaped ANSI out of a model.
- doc_uri: str = 'https://i.blackhat.com/BH-US-23/Presentations/US-23-stok-weponizing-plain-text-ansi-escape-sequences-as-a-forensic-nightmare-appendix.pdf'
- class garak.probes.ansiescape.AnsiRaw(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/stable/docs/source/../../garak/_config.py'>)
Bases:
AnsiEscaped
Probe for eliciting raw ANSI control codes from a model
ANSI escape codes can disrupt downstream processes. Try to get raw ANSI out of a model.