Manage Audit Configurations
An AuditConfig selects which garak probes and detectors run during an audit, how many generations to make per probe, and where the reports land. Configurations are persisted in NeMo Helix entity store and referenced by name from garak.run(...).
Initialize the SDK
These examples use the default workspace. If your current CLI context uses a different workspace, run nemo config set --workspace default first. To check, run nemo config view.
What an AuditConfig Holds
A configuration has four sub-blocks plus a free-form description. Each sub-block has sensible defaults, so a minimal configuration only needs a workspace and a name.
The full field reference is in Configuration Schema.
The Seeded Default
The plugin seeds a default configuration in the system workspace at install time. Retrieve it to see a reasonable starting point:
You can pass "system/default" directly to garak.run(config=..., ...) to run an audit with the seeded configuration without creating your own.
Create a Configuration
Build a configuration by populating any of the four sub-blocks. Omitted sub-blocks fall back to their pydantic defaults.
The probe_spec field takes a comma-separated list of probe categories or fully-qualified probe classes. See Selecting Probes for the syntax and worked examples.
List Configurations
list() returns the standard envelope (data, pagination, sort); pass page, page_size, and sort keyword arguments for pagination.
Retrieve a Configuration
Update a Configuration
update() replaces every sub-block — any sub-block you omit resets to its default. Pass each block you want to keep.