How aggregate_reports turns split garak runs into one result
When a garak scan against a model or application takes too long as one pass, the fix is to split it and combine the results afterwards. garak runs probes serially, with parallelism only inside each probe, so a single long run cannot spread its probes across several workers on its own. The documented workaround, described in the garak acceleration guide, is to run probes in separate jobs and aggregate the reports. The function that does the combining is garak.analyze.aggregate_reports, which takes multiple garak reports produced against the same generator and assembles them into one report you can review as a single result.
Teams usually need this when a full scan no longer fits the time window they have. Typical cases include CI pipelines with a maximum job duration, a set of hosts or endpoints that can take probes in parallel, or a scheduled rescan that must finish before a review meeting. The same generator configuration must be used for every split, because aggregation only makes sense when the pieces describe one target. Confirm that each split run points at the same model or endpoint, with the same generator settings, before you combine them, and check the garak version used for each piece against the release notes at the garak releases page.
Splitting is not free. Each extra job adds configuration to maintain, a place where a run can fail silently, and a merge step that must be rerun whenever one piece is repeated. If the scan finishes comfortably in a single run, or the target is a rate-limited hosted endpoint where parallel jobs only add throttling, a single serial scan with a longer window is usually the simpler choice. Read the garak user guide before you commit to a split design, and confirm with your own test run that the combined report contains every probe you intended to run.
When splitting a garak scan is worth the effort
garak runs probes one after another, with parallelism only inside each probe, so a long scan can take a long time on a single host. Splitting the work and merging the reports with aggregate_reports helps in some situations and adds bookkeeping in others, and the cards below describe where the trade-off tips each way.
Isolating failures probe by probe
Run one probe family per invocation when you need to know which weakness produced a failure, or when a full scan crashes partway and you want to rerun only the probes that did not finish. Each probe writes its own JSONL report, so a failing probe is easy to trace. The trade-off is more invocations to manage and a need to keep the generator, configuration and garak version identical across every piece, or the merged result will not describe one target.
Accelerating garak runsParallel runs across endpoints
Split the probe list across several hosts or model endpoints when you have capacity to call the target in parallel and the target's rate limits allow it. This shortens wall-clock time because garak itself does not run probes concurrently. Check that every shard hits the same model version, system prompt and generator settings. Rate limits on a shared API key can erase the gain, so confirm the limit with the provider before you add workers.
Scheduled rescans in fixed windows
Use split runs when a scan must finish inside a maintenance or change window, such as a nightly job that has to end before a deployment gate. Divide the probes into batches that each fit the window, then aggregate them into one report for the scheduled result. Record which batches ran, and treat a batch that did not finish as an incomplete result rather than a clean pass.
Keeping probes aligned across shards
Splitting pays off only when the shards cover the planned probe set exactly once. Overlap inflates attempt counts, and gaps leave untested weaknesses that look like passes. Before you merge, list the probes in each report and compare them with the planned list, and keep the list in version control so a later comparison uses the same coverage.
When a single serial run is simpler
A single serial run is the better choice for a first baseline, for a small probe set, or for a target with strict rate limits that split workers would exceed. It produces one JSONL file and one garak.log with no merge step to verify. If the run finishes within the time your team can wait, the extra orchestration is not worth the maintenance it adds to the scan pipeline.
Splitting strategies and when each fits
This table compares three ways to divide a garak scan: one probe at a time, grouped probes in parallel batches, and splits by generator or endpoint. Read each row for when the split fits and what to check before calling aggregate_reports on the outputs. The main takeaway is that every split must target the same generator and configuration, or the combined report will not describe one result.
| Strategy | How the run is divided | When it fits | What to watch when combining reports |
|---|---|---|---|
| Probe-by-probe | One garak run per probe or probe family, each writing its own JSONL report | Long scans where you want a separate result per probe and can run them in sequence or on several hosts | Confirm every run used the same generator name, config and generations setting; check no probe is missing or duplicated |
| Parallel probe batches | Probes grouped into several sets, each set run as one job on a separate worker | Scans with many probes where batches have similar expected runtime and you want fewer, larger jobs | Batch membership must not overlap; verify the union of probes matches the intended scan list before aggregating |
| Split by generator or endpoint | The same probe set run against different instances, replicas or routes of one target | Load-balanced or multi-replica deployments where each replica should be scanned under the same settings | Reports from different endpoints do not describe one generator; aggregate only when the endpoints are meant to be treated as one target |
| Mixed split | Probe batches run again on each generator variant, then combined per variant | Comparing a model before and after a change where each variant needs its own combined report | Keep variants in separate aggregates so scores from different configurations are not pooled |
| Single run (baseline) | One process runs all probes serially, with parallelism only inside each probe | Small scans, or when a single JSONL file is needed without any post-processing step | No aggregation step is needed, so there is no merge risk, but total elapsed time can be long |
How to split, run and aggregate garak reports
This sequence turns one large garak scan into several smaller probe-by-probe or parallel runs, then merges their reports into a single result that covers the full planned probe set.
Install garak from PyPI
Create a dedicated virtual environment on a Linux or macOS host running Python 3.11 or newer, then install garak with pip from PyPI. Your platform engineer or the person running the scans does this once per host. Confirm the install by running the garak help command and checking that it prints the option list without errors, and record the installed version so every split run uses the same release.
Confirm the generator config is identical
Write one YAML configuration for the target generator, including endpoint details, credentials supplied through environment variables, and generation settings, and reuse that exact file for every split run. The lead engineer or scan owner does this before any run starts. Check that the configuration file hash or a diff against the master copy shows no changes, because aggregate_reports combines reports on the same generator and mixed settings make the combined result hard to defend.
Choose the probe split
List the probes you plan to run with garak's probe listing, then divide them into groups, either one probe per run or several probe families per run. Keep a written manifest that names each group and its probes. The scan owner does this. Confirm the manifest covers the full planned probe set with no overlaps or gaps, and note the total probe count, since you will compare it against the combined report at the end.
Run each part with its own report output
Start each split run as a separate garak process with its own probe selection and its own report prefix or output location, so no two runs write to the same JSONL file. Garak runs probes in serial and parallelizes only within each probe, which is why splitting the probe list is how you shorten the total run. Confirm each run finishes and that its JSONL report and garak.log entry exist before you move on.
Verify each report before combining
Open each JSONL report and check that every attempt line names the same generator and that the probes listed match that run's manifest group. Discard or rerun any part that errored, timed out or shows a different generator name. The scan owner does this check. A part is ready only when its probe count matches the manifest and its generator matches the master configuration.
Call aggregate_reports on the set
Pass the list of verified JSONL reports to garak.analyze.aggregate_reports, which combines multiple reports on the same generator into one report. Review the source file analyze/aggregate_reports.py to confirm the function's input and output expectations for your garak version before you script the call. The engineer running the aggregation does this. Confirm the command produces one combined report file without errors.
Verify the combined report covers every probe
Compare the probe names and counts in the combined report against the manifest from the split step, and confirm the generator name and garak version match across the set. Any missing probe means a part must be rerun before results are shared. Record the check output with the manifest so a reviewer can trace each probe back to its source run. Read the garak acceleration guide before you finalize the process, since it describes the probe splitting and aggregation approach this sequence depends on.
What must match across split runs before you combine them
Combined results only mean something when the generator, probe set, detectors and garak version stay identical across every part of the split. If one part ran against a different model snapshot, a different endpoint configuration, a different probe selection or a different garak release, the merged report blends measurements that were never taken on the same target. A version change matters in particular, because a newer release can change probe prompts, detector logic or scoring, so a part run on one version and a part run on another will not share a baseline. Before you split a scan, record the generator name and its configuration file, the exact probe list, the detectors in use and the output of the installed garak version, then hold all four fixed for every part.
A mismatch rarely fails loudly. The merged report will still contain every probe you expected, but a few sections may show scores that disagree with a single-run baseline, or the same probe may appear with different detector names or attempt counts across parts. Check the run metadata in each part's JSONL report and the generator details it records, and compare the probe and detector lists side by side before calling garak.analyze.aggregate_reports. Treat any difference you cannot explain as a stop condition. Rerunning the affected part is usually cheaper than publishing a combined result that a reviewer later cannot reproduce.
This page does not explain how far scores move after an upgrade or how to judge drift between scans. The garak upgrades topic covers what changed between recent releases and why scores shift, and the comparing scan results over time topic covers keeping probe sets fixed across repeated scans. Read those before you decide that a version gap is small enough to accept for a combined report, and confirm the exact version you run against the garak release notes.
Security and operational considerations for split scans
Splitting a scan multiplies the places where secrets, reports and endpoint traffic live. The cards below cover the controls to check before parallel runs start and before the combined report leaves the team that produced it.
Scope credentials per generator run
Each split run usually points at the same target with the same API key or token, so every worker holds a copy of the secret. Pass credentials through environment variables or your secrets manager rather than writing them into shared YAML config files. Check that each worker reads only the key it needs and that the key can be rotated without editing every config. Confirm that none of the generator configs end up inside the JSONL or garak.log output.
Set a home for intermediate reports
Every probe-by-probe run writes its own JSONL report and appends to a garak.log file, so a split scan produces many files before aggregation. Choose one output directory per split run, name it after the probe or worker, and keep those paths in the same job record as the combined report. Check that the log files do not get overwritten when two workers share a working directory, because the log is continued across runs.
Restrict access to the combined output
The aggregated report records prompts, model responses and detector verdicts, which can include sensitive text the target produced. Store the combined file on an access-controlled volume and limit read access to the people reviewing findings. Confirm who can open the intermediate files, since they often hold the same content as the final report. Apply the same retention rules to both the parts and the combined result.
Cap concurrency against the target endpoint
Parallel runs send requests to one endpoint at the same time, so the total request rate is the sum of all workers, not the rate of one. Agree a maximum number of concurrent workers with the owner of the target and the rate limits in front of it, including any gateway or provider quota. Watch for throttled or failed requests in the logs, because a throttled attempt can be recorded as a miss and skew the result. Rerun the affected probe rather than aggregating an incomplete part.
Verify parts are complete before combining
Aggregation combines whatever reports it finds, so a missing or truncated part silently reduces coverage. Before calling the aggregate step, list the probes you planned, confirm each one has a finished report from the same generator and garak version, and check that the attempt counts look plausible. Record which parts were combined so a later reader can tell a full scan from a partial one.
- Latest garak release
- v0.17.1
Confirm the license and audit trail
garak is licensed under Apache 2.0, so internal use and modification are governed by that license, and your own policy decides who may run scans against which systems. Keep a record of which operator ran each split job, which configuration and garak version were used, and when the parts were combined. Ask your security team whether that record must be retained alongside the findings.
garak READMERunning split scans on your own infrastructure
A single workstation is the simplest place to split a scan. One operator runs each probe or probe group as a separate command, one after another, and combines the parts on the same machine. Nothing needs to be copied between hosts, but the batches still share one network connection and any rate limits on the target endpoint, so long runs can take a while.
- Scheduling: Put each probe group in its own line of a shell script so a failure in one part does not stop the others.
- Report location: Give every batch its own output folder, because each run writes its JSONL report and garak.log continues across runs.
- Aggregation: Call
garak.analyze.aggregate_reportsfrom a short Python script after every part has finished. - Traceability: Keep the parts beside the combined file, so anyone can trace a score back to the run that produced it.
Check that every part used the same generator configuration and that the combined report lists the probes you expected before you read the scores.
On a shared CI runner, each probe group becomes a job in a pipeline. Jobs can land on different runners, and workspaces are usually discarded when a job ends, so each report must be published as an artifact before the aggregation job starts. The pipeline then becomes the record of which parts ran and which failed.
- Scheduling: Fan out one job per probe group with a parallel or matrix stage, then add a final job that depends on all of them.
- Report location: Declare each JSONL report as an artifact in its job so it is kept after the workspace is cleared.
- Copying: The aggregation job downloads the artifacts into one directory; confirm the artifact paths match exactly.
- Secrets: Load generator credentials from the CI secret store and keep them out of artifacts and logs.
- Concurrency: Confirm the runner's job limits and any rate limit on the target, because many parallel jobs can trigger throttling and retries.
Check that artifact retention lasts from the first job until the aggregation step, and that a failed job stays visible in the pipeline so no part goes missing from the combined report.
A self-managed server, such as a virtual machine or host that your team operates, suits long scans that must run on a fixed schedule. Your existing scheduler or service manager starts each part, and reports land in directories that the aggregation step reads on the same host or a shared volume. This model gives the most control over timing and retention.
- Scheduling: Use cron, systemd timers or your job scheduler, and stagger the start times so parts do not all reach the target endpoint at once.
- Report location: Name each output directory after its probe group and date so the aggregation script can find the parts without guessing.
- Logs: Parts that share one working directory write to the same garak.log, so give each part its own directory if you need clean per-part logs.
- Copying: If parts run on more than one host, copy each JSONL report to the aggregation host and compare checksums before combining.
- Retention: Decide how long raw parts are kept, since the combined file is only as traceable as the parts behind it.
Check that every scheduled part finished and that the file count and probe list in the aggregate match the schedule before anyone reads the result.
On an air-gapped host, no part can reach the aggregation host over the network, so every transfer is a controlled file movement under your own procedure. Parts run on a host that can reach the model endpoint, and the reports cross the boundary before aggregation. The transfer process becomes part of the evidence, so record it as carefully as the scan itself.
- Scheduling: Run parts in sequence, or in parallel only as far as the isolated endpoint allows, and record the order so the aggregate can be explained later.
- Report location: Keep reports in a staging directory on the isolated side, separate from the working directory that holds garak.log.
- Copying: Move the JSONL files themselves through the approved transfer route, and include the garak version and the generator configuration used for each part.
- Integrity: Record a checksum for each file before transfer and verify it on arrival, so a partial or altered file is caught.
- Installation: Install the same garak version and dependencies on the aggregation host through your own offline process.
Confirm with your security team which transfer route is approved, and check that the aggregation host runs the same garak version as the scan host before you combine the files.
Limits to confirm in your environment
Splitting a scan and merging the reports only works if the merged file is complete, consistent and readable by the steps that follow. The cards below are questions to answer against the garak source and your own test runs before you build a pipeline on aggregate_reports.
Cross-version report compatibility
Ask whether aggregate_reports accepts reports written by different garak versions, and whether it rejects or silently mixes them. Split runs often span a long period, so one part may run on an older release. Check the report header and version fields in the source, then combine two small reports from different versions in a test environment and compare the output. Do not merge across versions until this is confirmed.
aggregate_reports sourceDuplicate and partial run handling
Ask what happens when the same probe appears in two reports, for example after a retried job, and when one part of a split stopped early. Confirm whether duplicate attempts are counted twice, whether the function deduplicates by probe, generator or attempt identifier, and whether an incomplete probe is flagged or quietly included. Either outcome changes failure rates, so test both cases with a deliberately repeated and a truncated report.
Fields the function reads
List the exact report fields aggregate_reports reads and writes, such as entry types, probe and detector names, attempt status and generator metadata. Any field it ignores is lost in the combined file, and any field it requires must exist in every part. Compare the field list against the JSONL report your own version produces, and confirm which entry types the merged output keeps.
Generator consistency across parts
Ask whether the function checks that every part used the same generator, model name, configuration and system prompt. Splitting across machines or endpoints can quietly change the target, so the combined result would describe a mix of systems. Record the generator configuration for each part, then confirm whether aggregate_reports warns or fails when these values differ.
Compatibility with HTML and OWASP or AVID steps
Confirm that the combined report loads in the HTML digest, the OWASP grouping and the AVID export without manual edits. Those later steps may expect entries in a particular order or with particular summary records that a merge does not regenerate. Run each downstream step on the merged file and on a single full run, then diff the outputs for the same probes.
Parallel jobs and run ordering
Confirm whether the merge depends on the order of input files, and whether parallel jobs write to one shared log or report path. Concurrent writes to garak.log or to a report file can interleave entries, which the merge may not detect. Give each split job its own output directory, then check that the aggregated result is identical regardless of input order.
Questions teams ask before splitting garak scans
How much effort does a split and merge pipeline take to build?
The effort depends mostly on how many probes you split, how many generators you run against, and how much automation you need around the scan. A single split by probe family is a small scripting task. A pipeline that schedules dozens of probe runs, retries failed chunks, collects each JSONL report into a shared store and calls garak.analyze.aggregate_reports at the end is a larger engineering job. The main drivers are the number of chunks, how you launch them (a shell loop, a CI matrix or a job scheduler), how you handle partial failures, and how much logging you need to explain the final result to an auditor. Ask any partner for a written scope that lists each of these items before agreeing a fee or timeline.
Can an in-house team split and merge garak scans without outside help?
Yes, a team with Python and command-line experience can do it, because garak is installed from PyPI, requires Python 3.11 or newer, and the aggregation step is a documented function in the garak.analyze package. The harder part is operational discipline: keeping the garak version, probe list and generator configuration identical across every chunk, and recording which chunk failed. Teams that already run scheduled jobs or CI pipelines usually find the work fits their existing tooling. Teams without that experience, or without an engineer who can own the pipeline after handover, often find that the scan results are the easy part and the pipeline upkeep is the cost that recurs.
What does the split pipeline need from our team in access and infrastructure?
The pipeline needs four things: access to the generator under test with credentials that can make the number of requests your scan plans, a host or runner that can reach that generator, storage for the per-chunk JSONL reports and the garak.log file, and a place where the merge step can read every chunk. Ask the model or application owner about endpoint rate limits and quotas before starting, because parallel chunks multiply request volume. If the target is a REST endpoint, the YAML file describing it must be shared across all chunks. If the host is air-gapped, the garak installation and any detector models must be staged in advance.
How do we know the combined result is complete?
Completeness means every planned probe ran against the same generator with the same settings and produced a report that the merge step accepted. Check this by comparing the list of probes in the plan with the probes present in the combined report, and by confirming that each chunk recorded the same garak version and generator configuration. Do not treat a clean merge as proof of completeness, because a chunk that crashed early can still produce a valid but short report. Keep the per-chunk reports and garak.log together so a reviewer can trace each probe back to its run. A written checklist, kept with the output, is what most reviewers will ask to see.
Do split runs change the scores compared with one long scan?
They can, if the chunks do not match. The probes themselves are the same, but generation outcomes are stochastic, and settings such as the number of generations per prompt, the detectors and the generator configuration all shape the failure rate. By default garak makes 5 generations per prompt and marks a probe as FAIL when any attempt produces undesirable output, so a chunk run with different settings will not be comparable to the others. Also note that aggregated reports combine results on the same generator, so mixing different models or endpoints in one merge produces numbers that mean nothing. Record the exact configuration for each chunk and rerun a small baseline on a single run to confirm the merged results are consistent with it.
What does DeployOpen do compared with doing the split internally?
DeployOpen plans and builds the pipeline in your environment as part of a fixed-scope engagement, with the scope, deliverables and timeline agreed in writing before work starts. The work typically covers the chunking plan, the launch mechanism, failure handling, storage, the aggregation step, completeness checks and handover documentation. Your team keeps ownership of the generator access, the endpoint and the decisions about which probes matter for your application. Ongoing runs, upgrades and continuous testing are available as retainers. DeployOpen does not publish a price list, so ask for a quote that lists each of these components so you can compare it with your internal estimate.
When should we keep a single long scan instead of splitting?
Keep one scan when the run time is acceptable, when the target has tight rate limits that parallel chunks would breach, or when you need the simplest possible audit trail. Splitting helps when a serial run is too slow for your release or review cycle, because garak runs probes in serial and only parallelizes within each probe, so probe-level splitting is the documented route around that limit. The trade-off is that splitting adds moving parts, so the saving has to outweigh the pipeline effort and the upkeep it creates. Compare both options on one representative probe set before committing to a pipeline.
Which parts of the split pipeline are most likely to break?
The most common failures are version drift between chunks, a generator endpoint that starts rate limiting halfway through, storage paths that collide when two chunks write the same file name, and merge steps that run before the last chunk finishes. Each of these produces a result that looks normal but is incomplete or inconsistent. Protect against them by pinning the garak version, using unique output paths per chunk, adding retries with backoff, and making the merge step refuse to run until every expected chunk has reported success. Test the failure paths on a small target before the first full run.
How split runs flow into one combined report
The flow starts with one planned probe set on a single generator, which is divided into part runs. Each part run writes its own JSONL report, and garak.analyze.aggregate_reports combines those files into one report for the same generator. Before the combined file goes to a digest or human review, check that every planned probe appears exactly once and that the generator settings match across parts.
Split part runs merge into one JSONL report only after a verification gate.
How DeployOpen scopes and delivers garak scan pipelines
DeployOpen treats split garak runs as a pipeline to design, not a one-off script. We scope which probes run in which jobs, build the runs and the aggregation step together, and document how the combined report is produced so your team can repeat it. Engagements are fixed-scope, with the deliverables agreed in writing before work starts.
How we scope
- Agree which probes and generators each split run covers, and confirm every part uses the same garak version and generator settings
- Define the written scope for the split plan, the aggregation step, the hosting of the runs and the handover documentation
- Confirm where the runs execute, including your own infrastructure, air-gapped hosts or hosted model endpoints you already approve
- Record the success criteria for the combined report so the scope states what a finished pipeline produces
How we build
- Configure split runs as repeatable jobs with fixed probe lists, generator settings and output locations for each part
- Build the aggregation step with garak.analyze.aggregate_reports and check that the combined report matches the expected probe coverage
- Test the pipeline end to end on a reduced probe set, including failed jobs, partial output and re-runs of a single part
- Set up storage for JSONL reports and garak.log files so each part and the combined result stay traceable
How we hand over
- Deliver the job definitions, aggregation scripts and configuration files in your own repositories under your control
- Document the run order, the aggregation command, the expected inputs and the checks that confirm a complete combined report
- Walk your engineers through a full run and a rerun of one failed part so the team can operate the pipeline without us
- Provide written notes on which garak version the pipeline was tested against and what to confirm before upgrading
How we support
- Offer ongoing support and scheduled rescans as a retainer when your team wants us to keep the pipeline running
- Review pipeline changes when garak releases, probe sets or generator endpoints change, and retest the aggregation step
- Continue testing and documentation updates through a retainer, with the scope for each period agreed in writing
- Confirm with us what support covers before signing so ownership of each job and report is clear

