Reading the garak JSONL report

A practical guide to the garak JSONL report: what each entry type holds, how attempts, evals and digest entries link, how the hit log differs from the full report, and how to load it into your own tools.

On this page

Why teams need to read the garak JSONL report

When a garak scan finishes, the team has to turn raw output into findings, metrics and tickets, and the JSONL report is where that work starts. Each garak run writes a JSONL report of every attempt and its evaluation, and that file is the source for every other view of the results, including the HTML digest, Z-scores, hit rates and confidence intervals. If the team reads only a summary, it cannot check how a conclusion was reached, and it cannot rebuild a number when a reviewer asks where it came from. Reading the file directly is the step that makes later analysis defensible.

The starting facts matter for planning. garak, the Generative AI Red-teaming and Assessment Kit, is licensed under Apache 2.0 and is developed in the NVIDIA GitHub organization, so teams can inspect the code that writes the report. It is a command-line tool installed from PyPI, and the PyPI package requires Python 3.11 or newer, so the analysis environment should be set up on a supported interpreter before the first scan. By default garak makes 5 generations per prompt, and a probe is marked FAIL when any attempt produces undesirable output. That means the report holds several records for each prompt, and the team should expect the file to be larger and more granular than a single pass/fail list suggests.

Before the scan starts, decide who owns the report and what it must feed: a findings register, a metrics dashboard, a ticketing queue or an audit file. Confirm the garak version in use from your run configuration and your own install record, because the fields and summary entries you parse should match that version. Check the garak user guide for the current report layout before you write a parser, and keep a copy of the raw JSONL with each run so later comparisons can be traced back to the original attempts.

What each JSONL entry type contains

A garak JSONL report is a sequence of records, each tagged with a type. The run setup record, attempt records, evaluation records and digest records connect through shared identifiers, so a parser can rebuild any finding from the raw prompt and response back to the summary score.

Run setup record

The first records in a report describe the run: the garak version, the generator and its configuration, the probes and detectors selected, and the generation count. Read this record before anything else, because it tells you whether two reports are comparable. A changed probe set, generator setting or version means scores may not line up. Record the exact garak version and config file used for each run in your own pipeline, and confirm the field names against the user guide for the version you installed, since the format can change between releases.

Latest release cited
0.17.1
garak user guide

Attempt record

Each attempt record holds one prompt sent to the target, the target's output and the probe and detector context that produced it. Because garak generates several responses per prompt by default, one probe run produces many attempts. Store the prompt and response text as-is, since they are the evidence a reviewer will read. Expect long text fields and multi-turn content for some probes, and make your parser tolerant of missing or nested values.

Default generations per prompt
5

Evaluation record

Evaluation records attach detector results to attempts, scoring each output as passing or failing for the detector that judged it. A probe is marked FAIL with a failure rate when any attempt produces undesirable output, so the evaluation records are where you find the hits. Check which detector produced each score, because string-matching and model-based detectors differ in reliability. Confirm the exact score field names and value scales in the user guide before writing code that depends on them.

Digest record

The digest record summarizes the run by probe and detector, giving counts and rates that feed the HTML report and most dashboards. It is derived from the attempt and evaluation records, so it should agree with a recount from them. Recompute a few totals yourself after each run to confirm your parser and the digest match. Treat the digest as a convenience layer, and rebuild summaries from attempts when you need evidence for a ticket or audit.

Linking records by identifiers

Attempts, evaluations and digest entries must be joined on shared identifiers such as probe, detector and attempt keys. Build your join on the identifiers the report actually contains, not on record order, because the order of entries can vary. Keep the raw JSONL file unchanged after the run, and write any derived tables to separate files so that every finding can be traced back to the original line that produced it.

garak README

Each attempt's evaluation rolls up into the probe result and digest

The diagram starts at a probe and its prompts. Each prompt produces attempts, and the detector for that probe scores each attempt in an eval entry. If any attempt shows undesirable output, the probe is marked FAIL with a failure rate. Otherwise it is marked PASS. Attempts and evals are written to the JSONL report, and the digest summarises the probe results for the whole run. When you read a result, check the eval entries behind it, since the probe-level mark is derived from them.

How probe prompts become attempts, evals, probe results and the digest.

How the hit log differs from the full report

The full garak report records every attempt a probe made and the evaluation each attempt received, including the attempts that passed. The hit log is a narrower view: it keeps only the attempts that a detector flagged as undesirable output. The distinction matters for triage. When a scan produces many findings, the hit log lets a security engineer open the failing outputs directly, decide which ones are genuine weaknesses and which are detector false positives, and route the confirmed items into a ticket without scrolling through thousands of passing attempts. Before relying on it, confirm in your installed version the exact file name and location of the hit log, since the naming has varied between releases and your report directory is the authoritative place to check.

The trade-off is that the hit log cannot show the denominator. A rate such as the share of attempts that broke the target needs both the failing attempts and the clean attempts that sat beside them for the same probe and detector. Those clean attempts exist only in the full report. If you review only the hit log, a probe where one attempt in five hit looks identical to one where one attempt in five hundred hit, and any statistic built on that count, including hit@k style reasoning or confidence intervals, will be wrong. The practical rule is to use the hit log to decide what to read and the full report to decide how often something happens. Keep both files from the same run together, because a hit log separated from its report cannot be reconciled later.

Loading the report for analysis or ticketing

Use this route when you want to load the report into pandas or a notebook and compute your own tables. Read the file line by line instead of as one JSON document, because each line is an independent record and one malformed line should not stop the whole load. Separate the record types first, then build the data frames and join them.

  • Parse line by line: Read each line with the standard json module, skip blank lines, and count the lines that fail to parse so you can report them.
  • Partition by record type: Split attempt, evaluation and digest records before building any data frame, since their fields differ.
  • Join on identifiers: Link attempts to their evaluations using identifiers that both records carry in the report, not row position or prompt text, which can repeat.
  • Pin the schema: Record the garak version and the field names your code depends on, so a later release that renames a field fails loudly instead of producing silent gaps.
  • Attach run metadata to every frame: Carry the run identifier and source file name into each table so combined analyses across runs stay traceable.

Before trusting any aggregate, confirm that the join gives one evaluation per attempt you expected and that no attempts are left unmatched. The garak user guide is the place to confirm the current record layout for your installed version.

Questions teams ask about reading garak reports

Is the garak report free to use and parse under Apache 2.0?

Yes. garak is licensed under Apache 2.0, so your organization can run it, read its output and build its own parser or dashboards on top of the JSONL report without a per-seat or per-report fee from the maintainers. The license governs the tool and its code, not the content of your results, which remain yours. The practical checks are internal: confirm with your legal team that the Apache 2.0 terms fit how you redistribute any scripts you write around the report, and keep the license notice if you ship modified garak code. The JSONL format itself is documented through the garak user guide at docs.garak.ai, and the format can change between releases, so treat the schema as a versioned input rather than a fixed contract.

How much effort does a custom garak report parser take?

Effort depends mostly on three drivers, and a small parser that reads one version and a few probes is far less work than a pipeline that handles many. The main drivers are:

  • Version pinning: a parser pinned to one garak release is simpler to build and test. Supporting several releases means mapping fields that may have moved or been renamed.
  • Probe count: a full scan produces many probe and detector entries, so aggregation logic, pagination and storage need more care as the set grows.
  • Custom fields: if you add your own metadata to runs, such as application name, model version or environment, every consumer must agree on where those fields live.

No effort figure is supplied for this work, so ask any vendor, including DeployOpen, to scope it against a sample report from your own runs.

Can our own engineers build the garak report parser in-house?

Usually yes, if you have engineers comfortable with Python and JSON handling and a clear use for the output. A parser that reads each line as JSON, filters on entry type and writes rows to a database or ticket is a bounded task. The work gets harder when you need to reconcile attempts with evaluations across runs, join results to asset inventories, or keep history stable through garak upgrades. Those tasks need someone who owns the schema over time. Before deciding, ask whether the team will maintain the parser after the first release, who reviews changes when garak updates, and whether the same people will handle the security questions that the reports raise.

What do we need to provide for a garak parser engagement?

A partner can only scope the parser accurately if you provide concrete inputs. Useful items include:

  • A sample run: one JSONL report from a scan that resembles your real configuration, with the garak version and command line recorded.
  • A schema review: a walkthrough of the entry types in that report, which fields your downstream systems need, and which fields can be ignored.
  • A ticket template: the fields your ticketing system expects, such as severity, affected application, probe name, owner and due date, and how hits should map onto them.
  • Access rules: where reports are stored, who may read them, and whether prompts or model outputs in the file contain data that must be redacted.

With these inputs, the work can be written as a fixed scope with deliverables and acceptance tests.

How should we handle garak reports from different versions?

Record the garak version in every report, and keep parsing logic keyed to that version. Maintain a small set of tests built from sample reports for each release you run, so a new version fails a test before it breaks a dashboard. Do not compare scores across versions without reading the release notes first, because probes, detectors and scoring can change between releases and shift results. The garak releases page on GitHub lists each release, and the garak user guide describes the report output. If you plan an upgrade, run the old and new versions against the same target and keep both reports until the differences are explained.

What does a garak JSONL parser cost to run after launch?

The recurring cost is mostly engineering time spent on maintenance, storage and the compute used by downstream jobs. One-time costs cover design, the first build and test fixtures. Recurring costs rise with the number of scheduled scans, the number of applications covered and the frequency of garak upgrades. Ask any quote to separate the initial build from a maintenance allowance, to state which garak versions are covered, and to say who fixes parsing breaks after an upgrade. No recurring figure is supplied here, so compare quotes on the same written scope.

Does the report contain sensitive data we must protect?

It can. A garak report records prompts sent to the target and the outputs it returned, so it may hold personal data, internal instructions or fragments of proprietary content, depending on the probes and the application under test. Treat the JSONL file as sensitive output. Restrict access, set retention rules, and decide whether downstream tickets carry full text or only identifiers and links to the protected file. Confirm these controls with your security and privacy teams before loading reports into shared systems.

Handling sensitive content in JSONL reports

A garak JSONL report records the prompts sent to the target and the outputs it returned, so it can carry sensitive data from your application. The cards below cover what that content contains, how the log file behaves across runs, and the controls to confirm before any report leaves the team that ran the scan.

Prompts and outputs are the data

Each attempt entry in the JSONL report holds the prompt garak sent and the output the target returned. If the target is a RAG pipeline, an agent or a chat application, those outputs can include customer records, internal documents, system prompt text or credentials the model echoed back. Treat every attempt entry as potentially sensitive data, not as test metadata, and classify the file before anyone copies it.

Access to report files

Confirm who can read the report directory on the machine or CI runner that produced it. Restrict read permissions to the people running the scan and the reviewers who triage hits, and check that shared CI artifacts or build logs are not readable by a wider group. Record where the files live in your own environment, because the location is set by your run configuration and your host, not by garak.

Retention of report files

Decide how long attempt-level reports are kept and who deletes them. Reports can accumulate across many scheduled scans, so an unmanaged directory becomes a growing store of model outputs. Set a retention rule that matches your data policy, and apply it to backups and object storage copies as well as the primary disk.

garak.log across runs

garak writes a garak.log debugging file that continues across runs rather than starting fresh each time. That means earlier scans can leave traces in the same log, and log lines may include prompt or response fragments depending on the verbosity you choose. Check what the log records in your version, rotate it on a schedule, and review it before attaching it to a support request.

Sharing outside the team

Keep raw report files out of public issue trackers, shared chat channels and external support tickets unless they have been redacted. A redacted copy should remove or replace prompts, outputs and any identifiers before sharing, and the team should keep the unredacted original under its own access controls. Agree this rule in writing before the first scan, so every person who triages hits follows it.

Confirm storage in your environment

Before the first run against a production or customer-facing endpoint, confirm the report storage location, the permission model, the encryption at rest, the backup scope and the deletion procedure in your own infrastructure. Ask your security and compliance leads to sign off on these settings. The answers belong in your scan runbook, because garak does not set them for you.

garak user guide

Set up a reliable JSONL parsing workflow

This sequence takes a team from a clean garak install to a tested parser that reads the JSONL report and feeds it into a ticket or analysis store. Each step ends with a check so parsing errors surface before anyone relies on the numbers.

  1. 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 into that environment. Record the Python version and the exact garak version reported by the installed package, because the report format belongs to a specific release. Developers can confirm the release history on the NVIDIA garak GitHub releases page before choosing a version. The step is done when the garak command runs and prints its version without errors.

  2. Run a small scan to produce a report

    Run a deliberately small probe set against a target you are authorized to test, such as a local model or a test endpoint, so the report stays short enough to read by hand. Keep the default generation count so the attempt numbers are predictable. Note the report path that garak prints at the end of the run, and keep the garak.log file that continues across runs. The step is done when a JSONL report file exists in the output directory and its path is recorded with the run.

  3. Inspect the entry types on a sample

    Open the report and read the first several lines, noting each entry type, its key fields and how the entries reference one another. Look for attempt entries, evaluation entries and the digest entry at the end, and check that the probe and detector names match the run configuration. Save two or three representative lines as a fixture for later tests. The step is done when you can describe, for each entry type, which fields hold the prompt, the output and the verdict.

  4. Write and test the parser

    Write a short parser that streams the file line by line, decodes each JSON object, and groups entries by type rather than by line position. Test it against the saved fixtures and against a deliberately malformed line to confirm it fails loudly or logs and skips, as your team decides. Keep the parser in version control next to the scan configuration it reads. The step is done when the tests pass and the parser handles an unknown entry type without crashing.

  5. Verify attempt and evaluation counts

    Count the attempt entries and the evaluation entries your parser produces, then compare those totals with the probe, generation and prompt counts implied by the run configuration. Check that every attempt that has an evaluation maps to one, and list any that do not. Investigate mismatches before trusting any rate, since a missing evaluation changes the result. The step is done when the counts reconcile and the reconciliation is written into the run notes.

  6. Pin the garak version in your pipeline

    Pin the exact garak version in your requirements file or lock file, and store the version string alongside every report your parser ingests. Re-run the small scan after pinning to confirm the entry structure is unchanged. When you plan an upgrade, rerun the fixtures before accepting the new version in production pipelines. The step is done when a fresh environment built from the lock file reproduces the same entry types and counts on the test scan.

  7. Connect output to a ticket or analysis store

    Map the fields you need, such as probe name, detector, failure status and the attempt identifier, to the columns of your analysis database or the fields of your ticketing system. Load the reconciled records through the parser and attach the source report path and garak version to each record. Review one ticket by hand against the raw attempt line before automating the rest. The step is done when a sample finding in the store or ticket traces back to the exact JSONL line that produced it.

Limits to confirm in your environment

The JSONL report is the foundation for every downstream view, so its exact shape has to be checked against the version you run. The cards below cover the points we would confirm on your own install before writing a parser, a ticketing integration or a retention policy.

Field names for your version

Confirm the exact keys and entry type labels in the report your installed garak writes. Do not rely on field names copied from documentation or older examples. Run a small probe scan, then inspect the first entries of each type and record the keys in your parser's test fixtures. Treat any key you have not seen in your own output as unconfirmed until you do.

garak user guide

Output file names and locations

Confirm where the report and the garak.log file are written, how file names are formed, and whether a new run creates a new report or appends to an existing one. Check this on the host where scans actually run, including containers and CI runners, because working directories often differ from a developer laptop.

Hit log behavior across releases

The hit log is a separate, smaller file that lists only the attempts that produced a hit. Confirm its name, its fields and whether it is written for every run in your version. Do not assume the hit log and the full report carry the same identifiers, and check the release notes for the version you run before changing any hit-log consumer.

garak release notes

Aggregated and split run storage

When a scan is split across probe groups or parallel jobs and then combined, confirm how the combined report records its source runs, which entries keep their original run identifiers and whether digest entries are regenerated. Test the combination on a small sample and compare counts against the separate reports before relying on totals.

Custom detector fields

If you add custom detectors or evaluators, confirm whether they append extra fields to attempt or evaluation entries. Extra fields can break strict schema checks in downstream pipelines. Write a test that loads a report produced with your custom plugin and fails on unexpected keys, so schema drift is caught when the plugin changes.

Retention and access to reports

Confirm how long reports and logs stay on disk, whether any cleanup runs automatically, and who can read files that contain prompts and model outputs. Reports can hold sensitive test content, so set retention and access rules in your own environment instead of assuming defaults.

When an outside team helps read garak output

The first decision is whether your own engineers should write and maintain a parser for the garak JSONL report, or whether an outside team should build it with you. A parser for the attempt, eval and digest entries is not large work on its own. The recurring cost sits elsewhere: keeping the parser correct when garak changes its output, mapping each failing probe to a ticket with the right owner and severity, and deciding which hits are worth raising before anyone outside the security team sees them. Ask whether your team has someone who will own that loop after the first report, and whether the people who triage findings can explain why a given entry was counted.

DeployOpen can take on the parts of that work that sit inside your infrastructure: planning which probes and generators a scan will use, building the report pipeline that reads the JSONL output and writes to your ticketing system, and reviewing findings with your team before anything is escalated. The pipeline runs in cloud accounts, data centers or air-gapped networks you control, and the ticket mapping follows your own severity and ownership rules. DeployOpen does not issue audit reports, attestations or certifications. If you need evidence for an external assessment, the independent auditor or certification body decides what it accepts, and the work here prepares the scan records and controls that such a review examines.

Before any work starts, agree the scope in writing. The document should name the garak version to be pinned, the report fields the pipeline depends on, the ticketing system and its fields, who reviews hits before escalation, and what is handed over at the end, including the parser code and runbook. Confirm the garak release you plan to pin against the garak releases page and record it in the scope so later upgrades are a planned change. DeployOpen quotes from that written scope, so the more precisely you define the report consumers and the ticket volume you expect, the more accurate the quote will be.

How DeployOpen works on this

DeployOpen is a Chainscore Labs company that plans, implements and supports self-hosted open-source platforms in infrastructure you control. For garak reporting, we start from the report files your team already produces, agree the analysis you need in writing, and build a pipeline that reads the JSONL report reliably inside your environment.

How we scope

  • We confirm which garak version and report files your scans produce before any parsing work starts.
  • We agree in writing which entry types, fields and downstream systems the engagement covers, such as a ticketing tool or analysis notebook.
  • We record how your team will identify attempts, probes and detectors so the scope matches how you review findings.

How we build

  • We write a loader that reads each entry type separately and joins attempts, eval and digest records by their shared identifiers.
  • We separate the hit log from the full report in the pipeline so reviewers see confirmed failures without losing the complete record.
  • We test the loader against sample reports from your own scans and check that field counts match the source file.

How we hand over

  • We deliver the loader code, a field reference for your version of garak, and a short guide to each entry type.
  • We document the ticket mapping, including which fields become titles, severity, evidence and reproduction steps.
  • We walk your engineers through the pipeline so they can change it when a later garak release changes the report format.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work begins.
  • Ongoing support, upgrades and continuous testing are available as a retainer, including updates when garak releases change report fields.
  • We confirm with you, before any upgrade, how report changes will affect existing dashboards and historical comparisons.

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.