You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* ``system_prompt`` -- If given and not overriden by the probe itself, probes will pass the specified system prompt when possible for generators that support chat modality.
126
-
* ``probe_tags`` - If given, the probe selection is filtered according to these tags; probes that don't match the tags are not selected
129
+
* ``spec`` - The unified selection spec for probes and buffs (``run.spec``); see "Selecting probes and buffs with run.spec" below. If absent, the default is all active probes (``probes.*``)
127
130
* ``generations`` - How many times to send each prompt for inference
128
131
* ``deprefix`` - Remove the prompt from the start of the output (some models return the prompt as part of their output)
129
132
* ``seed`` - An optional random seed
@@ -138,11 +141,15 @@ Plugins Config Items
138
141
139
142
* ``target_type`` - The type of target generator, e.g. "nim" or "huggingface"
140
143
* ``target_name`` - The specific name of the target to be used (optional - if blank, type-specific default is used)
141
-
* ``probe_spec`` - A comma-separated list of probe modules or probe classnames (in ``module.classname``) format to be used. If a module is given, only ``active`` plugin in that module are chosen, this is equivalent to passing `-p` to the CLI
142
144
* ``detector_spec`` - An optional spec of detectors to be used, if overriding those recommended in probes. Specifying ``detector_spec`` means the ``pxd`` harness will be used. This is equivalent to passing `-d` to the CLI
143
145
* ``extended_detectors`` - Should just the primary detector be used per probe, or should the extended detectors also be run? The former is fast, the latter thorough.
144
-
* ``buff_spec`` - Comma-separated list of buffs and buff modules to use; same format as ``probe_spec``.
145
146
* ``buffs_include_original_prompt`` - When buffing, should the original pre-buff prompt still be included in those posed to the model?
147
+
148
+
.. note::
149
+
``plugins.probe_spec``, ``plugins.buff_spec`` and ``run.probe_tags`` are
150
+
**deprecated**. They still work (and are mapped onto ``run.spec`` with a
151
+
deprecation notice) but will be removed in a future release; use
152
+
``run.spec`` instead (see below).
146
153
* ``buff_max`` - Upper bound on how many items a buff should return
147
154
* ``detectors`` - Root node for detector plugin configs
148
155
* ``generators`` - Root note for generator plugin configs
@@ -153,6 +160,57 @@ Plugins Config Items
153
160
For an example of how to use the ``detectors``, ``generators``, ``buffs``,
154
161
``harnesses``, and ``probes`` root entries, see :ref:`Configuring plugins with YAML <config_with_yaml>` below.
155
162
163
+
Selecting probes and buffs with run.spec
164
+
""""""""""""""""""""""""""""""""""""""""
165
+
166
+
``run.spec`` is the single source of truth for selecting probes and buffs. It
167
+
has two transports that parse to the same internal spec: a CLI string
168
+
(``--run-spec``) and the config-file form (``include`` / ``exclude`` lists).
169
+
170
+
Selectors (a category prefix is mandatory):
171
+
172
+
* ``probes.*`` - all active probes (the default when no ``run.spec`` is given)
173
+
* ``probes.<module>`` - an active family; ``probes.<module>.<Class>`` - one class
174
+
* ``buffs.<module>[.<Class>]`` - selects buffs (no buffs are run by default)
175
+
* ``tag:<prefix>`` - filters probes by tag (e.g. ``tag:owasp:llm01``)
Copy file name to clipboardExpand all lines: docs/source/faster.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ You can get help by running ``python -m garak.analyze.aggregate_reports``.
104
104
Probe aggregation
105
105
^^^^^^^^^^^^^^^^^
106
106
107
-
One way of achieving parallel probing is by splitting garak probing up into many jobs each with one probe given in ``plugins.probe_spec``.
107
+
One way of achieving parallel probing is by splitting garak probing up into many jobs each selecting one probe via ``run.spec`` (e.g. ``--run-spec probes.dan.AutoDANCached``).
108
108
Each job should write to a distinct report file.
109
109
When complete, the resulting report JSONL files can be aggregated into one using the ``aggregate_reports`` tool.
Copy file name to clipboardExpand all lines: docs/source/usage.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,8 @@ You can list the probes by running the following command:
15
15
16
16
You can limit the probes to run by specifying more arguments.
17
17
18
-
For example, you can specify ``--probes promptinject`` to run only the PromptInject framework's methods. for example.
19
-
You can also specify specific probes instead of a probe family such as ``--probes lmrc.SlurUsage`` to probe a model for generating slurs based on the Language Model Risk Cards framework.
18
+
For example, you can specify ``--run-spec probes.promptinject`` to run only the PromptInject framework's methods.
19
+
You can also specify specific probes instead of a probe family such as ``--run-spec probes.lmrc.SlurUsage`` to probe a model for generating slurs based on the Language Model Risk Cards framework.
20
20
21
21
Running a Scan
22
22
--------------
@@ -37,11 +37,11 @@ Probe a commercial model for encoding-based prompt injection (OSX/\*nix) (replac
0 commit comments