İçeriğe geç
← AI red teaming: techniques, open-source tools and automated pipelines

Ders 11 / 18 · 11 dk

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.

Bu sayfa şimdilik İngilizce.

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].

Animated diagram of a scanner pipeline from left to right: Probes, Buffs, Generator, Detectors and Evaluator. One prompt fans out into several variants at the Buffs stage, the generator is the system under test, detectors mark replies pass or fail, and the evaluator tallies a report. Below, an LLM judge supports the detectors, a human reviews a sample, and a dashed arrow shows that in multi-turn attacks the score steers the next prompt.
A scanner turns one idea into many attempts, judges each reply and writes a report.

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

Terms differ between projects and versions. Always read the documentation of the version you install.
RolegarakAugustusPyRIT (as presented in the series)
Attack contentProbesProbesDatasets and seed prompts
Prompt transformationBuffsBuffsConverters
Reaching the targetGeneratorsGeneratorsTargets
Deciding the verdictDetectorsDetectors, plus a judge modelScoring engines
End-to-end workflowThe run itselfThe scan, with a judge for multi-turn probesOrchestrators
Record keepingReport and hit logsJSONL and HTML outputMemory

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.

garak and Augustus, from their READMEs
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 --verbose

Akılda kalsın

  • 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.

Kendinizi sınayın

  1. 1. What does a buff do?

    • Transforms prompts into variants before they are sent — Doğru.
    • Judges replies
    • Stores the report
    • Starts the target

    Buffs rewrite attempts, for example by encoding, paraphrasing or translating.

  2. 2. Which PyRIT term corresponds to a garak buff?

    • Converter — Doğru.
    • Scorer
    • Memory
    • Target

    Converters transform text before it is sent, as buffs do.

  3. 3. What is the generator in garak?

    • The plugin that reaches the model or endpoint under test — Doğru.
    • The attack content
    • The report
    • The judge

    Generators give access to the target.

  4. 4. Why keep the origin identifier on each variant?

    • So a result can be traced to the prompt it came from — Doğru.
    • To save disk space
    • To speed up the model
    • To hide the prompt

    garak recommends it so derivative attempts stay linked to their source.

FireAI ile uygulayın

Bu dersi kendi Mac’inizde uygulamaya koyun.

Kaynaklar

Mac’inizde uygulayın

Tüm özellikleri 17 gün ücretsiz deneyin, kart gerekmez.

Mac için indir Belgeler