Lição 11 de 18 · 11 min
Probes, detectors, generators and buffs: the anatomy of a scanner
Learn the shared vocabulary of open-source LLM scanners such as garak, Augustus and PyRIT, what each part does, and why transforming prompts with buffs multiplies coverage.
Por agora esta página está em inglês.
Up to episode seven the series works by hand: one prompt, one reply, one tester’s judgment. The eighth episode introduces the reason to stop doing everything manually. Its presenter, the creator of PyRIT, says the aim of automating is to let operators focus on the harder, more time-consuming tasks, while code handles the repetitive ones, and that code-driven workflows are repeatable, which matters because models are not always deterministic [1]. The Microsoft team’s 2025 paper agrees that automation helps cover more of the risk landscape, while human expertise stays essential [2].
The five moving parts
- Probes: the attack content. garak describes its probes as classes that generate interactions with a model to test for vulnerabilities [3]; Augustus calls them adversarial test cases representing specific attack patterns, covering prompt injection, jailbreaks, encoding exploits and data extraction [4].
- Buffs: transformations applied to prompts before they are sent. Covered below.
- Generators: the connection to the system under test. In garak they are plugins that give access to model platforms, including Hugging Face, OpenAI, local model files and anything reachable by a REST call [3]. Augustus has a generic REST generator for custom endpoints, configured with a URI, method, headers, request template and response parsing [4].
- Detectors: code that decides whether a reply shows the failure. Augustus lists pattern matching, an LLM acting as judge, the Perspective API and unsafe-content detection among them; garak’s detectors identify when a model exhibits a specific failure mode [3] [4].
- Evaluators and reports: garak’s evaluators are reporting schemes for results. Augustus writes a table, JSON, JSONL or HTML [3] [4].
garak’s own paper summarises the idea: it “probes an LLM in a structured fashion to discover potential vulnerabilities”, and its authors stress that LLM security is dynamic because outputs are unpredictable, models are updated constantly and adversaries are varied [5].
The same ideas under different names
| Role | garak | Augustus | PyRIT (as presented in the series) |
|---|---|---|---|
| Attack content | Probes | Probes | Datasets and seed prompts |
| Prompt transformation | Buffs | Buffs | Converters |
| Reaching the target | Generators | Generators | Targets |
| Deciding the verdict | Detectors | Detectors, plus a judge model | Scoring engines |
| End-to-end workflow | The run itself | The scan, with a judge for multi-turn probes | Orchestrators |
| Record keeping | Report and hit logs | JSONL and HTML output | Memory |
Buffs: one idea, many variants
A buff changes the prompts a probe produces. garak’s base class says a buff “should take as input a list of attempts, and return a list of events”, and it recommends storing the origin attempt’s identifier in each derivative attempt so a result can be traced to its source [6]. Augustus lists seven buff transformations: encoding, paraphrase, poetry in several formats, translation into low-resource languages, and case transforms [4]. PyRIT’s converters do the same job, and the series gives translation and base64 as examples [1].
The science is the one from lesson 5. If a defence stops a request in plain English, does it also stop it encoded, paraphrased or translated? Wei et al. predict failures where safety training did not generalise to forms the model nevertheless understands, and Yong et al. measured exactly that for low-resource languages [7] [8]. A buff makes that question cheap to ask at scale. It also multiplies the work: attempts grow with the number of prompts times the number of variants times the number of generations, so plan time and cost.
A first run
Both projects document short commands. The lines below are taken from their READMEs; run them only against models you own or may test.
python -m pip install -U garak
garak --list_probes
python3 -m garak --target_type huggingface --target_name gpt2 --spec probes.dan.Dan_11_0
go install github.com/praetorian-inc/augustus/cmd/augustus@latest
augustus scan openai.OpenAI --probe dan.Dan_11_0 --detector dan.DAN --verboseA reter
- A scanner has probes, buffs, generators, detectors and an evaluator that writes the report.
- garak, Augustus and PyRIT use different names (buffs and converters, detectors and scorers) for the same roles.
- Buffs transform prompts into variants, which tests whether a defence survives reformulation.
- Every variant should keep the identity of its source prompt so results can be traced.
Teste-se
1. What does a buff do?
- Transforms prompts into variants before they are sent — Certo.
- Judges replies
- Stores the report
- Starts the target
Buffs rewrite attempts, for example by encoding, paraphrasing or translating.
2. Which PyRIT term corresponds to a garak buff?
- Converter — Certo.
- Scorer
- Memory
- Target
Converters transform text before it is sent, as buffs do.
3. What is the generator in garak?
- The plugin that reaches the model or endpoint under test — Certo.
- The attack content
- The report
- The judge
Generators give access to the target.
4. Why keep the origin identifier on each variant?
- So a result can be traced to the prompt it came from — Certo.
- To save disk space
- To speed up the model
- To hide the prompt
garak recommends it so derivative attempts stay linked to their source.
Praticar com o FireAI
Ponha esta lição em prática no seu próprio Mac.
Fontes
- Microsoft, AI Red Teaming 101, Episode 8: Automating AI red teaming with PyRIT
- Bullwinkel et al. (2025), Lessons From Red Teaming 100 Generative AI Products, arXiv:2501.07238
- NVIDIA garak (GitHub README)
- Praetorian Augustus (GitHub README)
- Derczynski et al. (2024), garak: A Framework for Security Probing Large Language Models, arXiv:2406.11036
- garak, buffs base class (source code)
- Wei, Haghtalab and Steinhardt (2023), Jailbroken, arXiv:2307.02483
- Yong, Menghini and Bach (2023), Low-Resource Languages Jailbreak GPT-4, arXiv:2310.02446
Ponha em prática no seu Mac
Experimente todas as funcionalidades grátis durante 17 dias, sem cartão.