Comparing garak scan results over time

Tracking an LLM model or application across repeated garak scans only means something when the probe set, configuration and garak version are held fixed. This page explains how to keep comparisons valid and when results need a fresh scan.

On this page

Comparing garak scan results over time: why it matters and when teams need it

A garak trend comparison answers one question: is this model or application getting safer or weaker after a change, and can you show that from two runs you trust? garak, the Generative AI Red-teaming and Assessment Kit, is free, licensed under Apache 2.0, and writes a JSONL report for every run. It does not keep a history, compare runs or flag regressions for you. Tracking the target across releases, prompt changes, model swaps and guardrail updates is work your security or platform team owns, and it starts the first time someone wants to put a second scan next to the first.

The main trap is that a falling score does not necessarily mean the target got worse. Newer garak releases can add or change probes, detectors and prompts, so the same target can fail more often on a stricter test set. Your own setup can also drift: a different system prompt, a new generator setting, a changed number of generations per prompt, or a different probe selection can move the numbers. Before you read a drop as a regression, confirm that the garak version, probe set, detectors and generator configuration match the earlier run, and record them alongside each report.

Teams usually need this comparison as soon as a model, prompt, retrieval source or guardrail changes and someone must sign off on the change. Ask the owner of each comparison which fields must match before two runs can be compared, and where those settings are stored. Results also go stale: a scan of a model from months ago says little about the deployed system today, so confirm how often you will rescan and which changes trigger an extra run.

Which factors to hold fixed and which to vary between scans

This table lists each setting that can change between two garak scans and says whether to pin it when you want a trend line. Read it before you schedule rescans, so that a score change points to the model or application rather than to a change in the test itself.

FactorPin for trend comparisons?Change deliberately when
garak versionYes, pin the exact releaseA planned upgrade, followed by a rescan of the old baseline on the new version
Probe selection (names, tags or spec)Yes, store the exact command or configA new probe family matters for your use case, and you start a new series
Generations per promptYes, keep the same countYour attack budget or rate limits change, and you note the break in the series
System prompt and buffsYes, record the exact text and buff listYour production system prompt changes, which is itself a finding worth tracking
Harness and detectorsYes, keep the default or the same explicit listA detector is replaced or a harness is changed after you confirm its accuracy
Generator configurationYes, keep endpoint, sampling settings and retriesTemperature, max tokens or routing changes, or the generator plugin changes
Target model or endpoint versionVary only when you are testing that changeA model update or new endpoint release, which is the change you want to measure
Scan date and environmentRecord, do not pinHosted provider behavior drifts over time, so note the date of each run

How to set up a repeatable baseline and comparison workflow

This sequence produces a pinned garak environment, a baseline scan, and a stored set of artifacts that later scans can be checked against before any scores are compared. Each step ends with a check so that a score change can be attributed to the target rather than to the tooling.

  1. Install garak from PyPI on Python 3.11 or newer

    Create a dedicated virtual environment on a Linux or macOS host and install garak from PyPI with pip, using a Python interpreter that is version 3.11 or newer. Keep this environment for the whole comparison series so that the installed packages do not drift between scans. The check is that the interpreter reports version 3.11 or newer before installation, and that garak installs without dependency errors. garak is developed on Linux and macOS, so confirm your host type before you begin.

  2. Record the exact garak version

    Run the garak version command inside the environment and copy the version string into your comparison record, along with the date and the name of the person who installed it. Compare the string against the release notes on the NVIDIA/garak releases page so you know which changes that version includes. The check is that the recorded string matches what pip reports for the installed package. Any later upgrade starts a new baseline series rather than extending the old one.

  3. Write a config file that pins probes, generations and generator

    Write a YAML config file that lists the probes or probe tags to run, the number of generations per prompt, and the generator settings for the target, including the REST endpoint or model identifier. Store the file under version control so that every change is visible. Pin the generations value explicitly, since the default is 5 generations per prompt, and do not rely on defaults for anything that affects the comparison. The check is a dry read of the config by a second person, confirming that no setting is implied rather than written down.

  4. Run the baseline scan against the target

    Run garak with the pinned config against the target in its current, known state, and record the target version, model identifier, system prompt and any guardrail settings alongside the run. Keep the target unchanged for the duration of the scan so that the result describes one state of the system. The check is that the run finishes and writes a JSONL report and a garak.log file to the output location. If the run is interrupted, discard it and rerun rather than mixing partial results into the baseline.

  5. Store the JSONL report, garak.log and config together

    Move the JSONL report, the garak.log debugging file and the exact config file into one dated baseline folder, and write a short manifest that lists the garak version, target identifier and run date. garak.log continues across runs, so copy it at the end of each run rather than relying on the file in place. The check is that the manifest lists all three artifacts and that each file opens without error. This folder is the reference that every later comparison will cite.

  6. Confirm the probe list matches the baseline before comparing

    Before reading any scores, run the second scan against the unchanged target with the same config and the same garak version. Compare the probe names and detector names in the new JSONL report with the baseline, and confirm that the set and the report structure are identical. If the probe list differs, stop and find the cause, since any score change would otherwise reflect the change in tests rather than in the target. The check is a written sign-off that the probe set, version and report structure match.

  7. Record the rerun outcome as the control for drift

    Compare the scores from the unchanged-target rerun with the baseline and note how far they differ, since generation randomness can move results even when nothing has changed. Keep this rerun record with the baseline folder as the reference for judging whether a later difference is meaningful. Ask your security team to confirm how much variation they will accept before a score change is treated as a finding. The check is a short written note stating the observed difference and the threshold agreed for future comparisons.

How a baseline and later scans feed one comparison

The flow starts with a versioned config file and a pinned garak install, which run against the target at each scan date. Each run writes a JSONL report and its metadata to storage. The comparison step checks that the probe set and garak version match the baseline before it reads any scores. If either differs, the comparison stops and the team rebaselines, so scores are only compared when the test itself is the same.

Comparisons proceed only when probe set and garak version match.

How quickly garak results go stale

A garak score describes the target as it was when the scan ran, using the probes, detectors and generator settings of that moment. Each card below names one change that can make an older result no longer comparable, along with what to confirm before trusting a trend line.

The target model or prompt changed

A new model version, a changed system prompt, a different temperature or a swapped provider alters what the target says, so the same probes now test a different system. Confirm the model identifier, the system prompt hash and generator settings in the config used for each scan, and record them next to every report. A score from before the change tells you about the old target only.

garak user guide

Retrieval data or tools changed

For RAG pipelines and tool-using agents, the knowledge base, document index, connected tools and their permissions shape the answers that garak sees. Adding a data source or enabling a new action can open paths that earlier scans never reached. Confirm the index version, tool manifest and permission set have not changed since the baseline, or rescan after they do.

A new garak release changed probes

New releases can add, rename, retire or retune probes and detectors, so the same command may run different tests after an upgrade. Pin the garak version in your scan environment and read the release notes before moving the pin. Confirm the version recorded in each report matches the baseline, or rerun the baseline on the new version before comparing.

Latest release noted
v0.17.1
garak releases

New attack techniques were added

When a new attack family enters the probe set, a flat pass rate can hide a drop, because the target now faces harder prompts than before. Scores that fall after such an addition may reflect a broader test rather than a weaker model. Confirm which probe families were added since the baseline and compare only the probes that existed in both runs.

Threat exposure changed

A scan can stop matching the risk the application carries once its users, data sensitivity or regulatory scope change. A tool that now handles payments or a chatbot opened to external customers needs probes that reflect that exposure, even if the model itself is unchanged. Confirm with the owner that the probe selection still reflects the current use case and threat model.

Detector behaviour shifted

Detectors decide what counts as a hit, so a change in detector logic, a new detector model or a different threshold changes the failure rate without any change in the target. Check the detector names and versions in each report, and spot-check a sample of hits from old and new runs against the same prompts before trusting a trend. Set a refresh interval from your own change rate, since no fixed interval is supplied.

Questions teams ask before tracking garak results over time

How much effort does a garak tracking pipeline take to build and run?

The build is usually modest, and the recurring work is what matters. A pipeline has four parts: a pinned garak install, a fixed config and probe list, a scheduled scan against the target, and a store that keeps each JSONL report with its metadata. Effort rises with the number of targets, the number of environments (staging and production, for example), and how often the target changes. The one-time cost is designing the pinned configuration and the comparison rules. The recurring cost is scan execution, reviewing changed results, and re-baselining after each deliberate change. Ask any partner to quote these parts separately so you can see what is one-time and what recurs.

Can our team track garak results internally using the JSONL report?

Yes, if you have engineers who can parse JSON and own a small scheduled job. Each garak run writes a JSONL report of every attempt and its evaluation, and a garak.log file that continues across runs, so the raw material for trend analysis is already there. What teams usually underestimate is the surrounding discipline: recording the garak version, probe list, generator settings and detector set for every run, storing reports immutably, and deciding how to compare runs whose inputs differ. Your team can build that in-house. An outside partner is most useful when you need the pipeline wired into your CI, identity and storage controls, or when you want the comparison logic reviewed before anyone acts on a drop.

How long does a garak scan take?

Scan duration depends on the target and environment, so measure it on your own setup before planning a schedule. The main drivers are the probes selected, the number of generations per prompt (garak defaults to 5 per prompt), the response latency of your endpoint, any rate limits, and whether the detectors run locally or call another model. A narrow probe set against a fast local model finishes far sooner than a broad run against a rate-limited hosted API. Run a small pilot with the exact config you plan to keep, time it, then multiply by the number of targets and scheduled runs. Confirm the timing with your own endpoint owner rather than relying on a general figure.

What should we do when a garak upgrade changes our scores?

Treat the change as a measurement event, not a security event, until you have checked it. Scores can shift after a garak upgrade because probes, detectors or defaults changed, not because the model or application changed. Before comparing, rerun the baseline configuration on the new version, record both results side by side, and identify which probes or detectors moved. Then decide whether to start a new comparison series for the new version and keep the old series for history. Pin the version in your scheduled job so upgrades are deliberate. Check the release notes for the version you are moving to, and confirm the behavior with the maintainers' user guide at docs.garak.ai before you update the baseline.

Can results from different garak configurations be compared at all?

Only partly, and only when you control what changed. A fair comparison needs the same garak version, the same probe set, the same generator and target settings, the same system prompt, and the same detectors and generations. If one input changes, the difference you see may come from the change in the input rather than from the target. Probes also get harder over time as new attacks are added, so a falling pass rate can reflect a tougher probe set rather than a weaker model. The practical approach is to keep one fixed configuration as the trend line and run any experimental configuration as a separate series, clearly labeled, with its own baseline.

What does the work need from our team to get started?

Three things before any scan runs: access to the target, a stable configuration, and storage for reports. Access means an endpoint or test account that behaves like production, with credentials held in your secrets store. A stable configuration means a versioned config file that names the garak version, probes, generations and detectors, and that someone owns when it changes. Storage means a place to keep every JSONL report, its log and its config for as long as your review process needs them. Your team will also need to name an owner who approves baseline changes and receives alerts. Confirm these requirements with your endpoint and security owners early, since access approvals often set the schedule.

Security and operational considerations for stored scan history

Every stored garak scan is a record of attack prompts, model outputs and target configuration, and the history builds up with each rerun. The cards below cover what to protect, what to agree with the target owner, and what to keep, so that a comparison over time does not create a new exposure.

Restrict access to JSONL reports

Each JSONL report holds every attempt, its prompt and the model's output. Outputs can echo sensitive data from system prompts, retrieval sources or tool results, so the report carries the same classification as that data. Restrict read access to the people who run comparisons, store reports in a location with audit logging, and check whether any copy has been shared outside that group before it is attached to a ticket or chat thread.

Agree scope and rate limits first

Scans send attack prompts to the target at a volume the target owner may not expect. Before a rescan is scheduled, confirm with the owner which endpoints, environments and hours are in scope, and what request rate the service can absorb. Record the agreed limits alongside the scan configuration so every later comparison runs under the same conditions.

Manage the growing garak.log

garak.log is continued across runs rather than replaced, so it grows with every scan and can contain prompt fragments and error output. Decide where it lives, how large it may grow before rotation, and whether it is archived with the reports it describes. Without a rotation rule, the log may outlive the reports it refers to and become harder to interpret.

Keep API keys out of version control

Generator configuration files for hosted models or REST endpoints often include API keys or bearer tokens. Those files should be kept in a secrets store or injected at runtime from environment variables, and the repository that holds scan configurations should exclude credential fields. Check the commit history as well as the current files, because a key removed later still remains in earlier commits.

Set retention for historical reports

Scan history is useful for trend analysis, but older reports may refer to models, prompts or endpoints that no longer exist and still hold sensitive outputs. Write a retention rule that states how long each class of report is kept, who may extend it, and how deletion is recorded. Apply the rule to the report store, the digests generated from it and any exported copies.

Record who approved each scan

A comparison is only as trustworthy as the record of what was run, against which target, and under whose authority. For each scan, log the requester, the approver from the target owner, the configuration version and the garak version. This record shows that a score change reflects the system rather than an unapproved change in testing, and it answers audit questions about who tested what and when.

How DeployOpen scopes and supports garak comparison work

DeployOpen approaches comparing garak scan results over time as a scoped engineering task: fixing the probe set, generator settings and garak version so each run can be read against the last. The work is planned in writing before any scan runs, then delivered as repeatable runs, documented baselines and a handover your team can operate.

How we scope

  • Written scope names the target model or application, the endpoints and the probe families to be tracked.
  • The scope fixes the garak version, probe selection and generation count that every baseline will use.
  • Scope states which report views, such as the digest or Z-scores, your reviewers need for each comparison.

How we build

  • We pin the garak installation and record the exact probe and detector configuration in version-controlled files.
  • We run an initial baseline scan and check that repeat runs against unchanged targets produce consistent results.
  • We record when a garak upgrade or a probe change breaks comparability, so trend lines are not read across that break.

How we hand over

  • You receive the run configuration, baseline reports and a short guide for comparing new scans against them.
  • Documentation explains how to read score drops that come from harder probes rather than from model regressions.
  • Your team receives a rescan procedure with a stated staleness rule for when results should be run again.

How we support

  • Ongoing support covers scheduled rescans, garak upgrades and rebaselining, available as a retainer.
  • Continuous testing can be added so trend reports stay current as the model or application changes.
  • Confirm with DeployOpen during scoping which support terms, reporting cadence and response arrangements apply.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.