使用 Hugging Face Pipeline API 时,仅支持生成式模型,不支持非生成式模型。
如何开始
安装难度为中等。标准包安装仅需一条命令(python -m pip install -U garak),但若要进行有效的扫描,则需要选择并配置目标模型,且部分生成器需要配置 API 密钥。
核验依据
README: `garak` is a command-line tool. It's developed in Linux and OSX.
README: `garak` checks if an LLM can be made to fail in a way we don't want. `garak` probes for hallucination, data leakage, prompt injection, misinformation, toxicity generation, jailbre…
README: `garak` needs to know what model to scan, and by default, it'll try all the probes it knows on that model, using the vulnerability detectors recommended by each probe.
README: Once generation is complete, a row evaluating that probe's results on each detector is given. If any of the prompt attempts yielded an undesirable behavior, the response will be m…
README: `garak` generates multiple kinds of log: * A log file, `garak.log`. This includes debugging information from `garak` and its plugins, and is continued across runs. * A report of t…