下载:v0.17.1v0.17.1 ↓0.17.12026-10-16
+16
日增长
10,037
stars
1,481
forks
66
watchers
1,355
prs
1,017
issues
34
releases

README

garak, LLM vulnerability scanner

Generative AI Red-teaming & Assessment Kit

garak checks if an LLM-backed application can be made to fail in a way we don't want. garak probes for hallucination, data leakage, prompt injection, misinformation, toxicity generation, jailbreaks, and many other weaknesses. If you know nmap or msf / Metasploit Framework, garak does somewhat similar things to them, but for LLMs.

garak focuses on ways of making an LLM or dialog system fail. It combines static, dynamic, and adaptive probes to explore this.

garak's a free tool. We love developing it and are always interested in adding functionality to support applications. 















 Get started
  See our user guide! docs.garak.ai
  Join our Discord!
  Project links & home: garak.ai
  Twitter: @garak_llm
  DEF CON slides!



 LLM support

currently supports:
 hugging face hub generative models
 replicate text models
 openai api chat & continuation models
 aws bedrock foundation models
 litellm
 pretty much anything accessible via REST
 gguf models like llama.cpp version = 1046
 .. and many more LLMs!

 Install:

garak is a command-line tool. It's developed in Linux and OSX.

 Standard install with pip

Just grab it from PyPI and you should be good to go:


python -m pip install -U garak


 Install development version with pip

The standard pip version of garak is updated periodically. To get a fresher version from GitHub, try:


python -m pip install -U git+https://github.com/NVIDIA/garak.git@main


 Clone from source

garak has its own dependencies. You can to install garak in its own Conda environment:


conda create --name garak "python=3.11,

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. You can see a list of probes using:

garak --list_probes

To specify a generator, use the --target_type and, optionally, the --target_name options. Model type specifies a model family/interface; model name specifies the exact model to be used. The "Intro to generators" section below describes some of the generators supported. A straightforward generator family is Hugging Face models; to load one of these, set --target_type to huggingface and --target_name to the model's name on Hub (e.g. "RWKV/rwkv-4-169m-pile"). Some generators might need an API key to be set as an environment variable, and they'll let you know if they need that.

garak runs all the probes by default, but you can be specific about that too. --spec probes.promptinject will use only the PromptInject framework's methods, for example. You can also specify one specific plugin instead of a plugin family by adding the plugin name after a .; for example, --spec probes.lmrc.SlurUsage will use an implementation of checking for models generating slurs based on the Language Model Risk Cards framework.

For help and inspiration, find us on Twitter or discord!

 Examples

Probe a commercial model for enco

Top issues

Discussions

Latest release

v0.17.1 v0.17.1 2026-10-16
What's Changed

 New features
 feat(evaluators): add hit@k attack success rate metric by @stefanoamorelli in https://github.com/NVIDIA/garak/pull/2090
  This new metric is currently exposed as terminal output and available per probe/detector pair in the final digest entry of the report.jsonl
 Add Python 3.14 support by @NK-Works in https://github.com/NVIDIA/garak/pull/2297

 Improved plugins
 fix(detectors): match mitigation.Prefixes at the start of the response by @chiruu12 in https://github.com/NVIDIA/garak/pull/2067
 fix(detectors): stop FileDetector scoring an unexamined file as a

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON