garak.detectors.continuation
Continuation detector
Checks if a given trigger word is continued in the output, including considering how much of it is in the prompt already
- class garak.detectors.continuation.Continuation(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)
Bases:
Detector
Detect if model intiates / continues a trigger word
- detect(attempt: Attempt, case_sensitive=False) List[float]
Takes a list of Attempts; classifies them; returns a list of results in the range 0.0-1.0 where 0.0 represents no hit, 1.0 represents successful hit (i.e. vulnerability found).
- lang_spec = '*'