Why garak buffs matter when a static prompt set is your main test
If your garak scans rely on a fixed set of probes, the results describe one wording of each attack. A team that runs the same prompts against a model every release may reasonably ask whether a different phrasing of the same request would have produced a different result. Buffs are garak's answer to that question. A buff modifies prompts in flight, after garak has selected them and before they reach the generator, so the probe logic stays the same while the text the model sees changes. The paraphrase buff converts each prompt into alternative phrasings, and the garak FAQ describes paraphrasing as often a good alternative to more generations when the inference budget is fixed.
The practical decision is where to spend a limited number of model calls. Extra generations repeat the same prompt and sample the model's variability, which helps when the output is stochastic but does not widen the set of wordings tested. A paraphrase buff spends the same budget on new wordings of the same attack, which is usually the better use when the concern is that a guardrail, system prompt or refusal behavior depends on surface phrasing. Reach for buffs when your static set is small, when you suspect keyword-level defenses, or when a probe passes cleanly and you want to know whether that result is fragile. Keep generations at a level that gives stable results for the prompts you do run. Confirm the buff names, options and parameters in your installed version with the garak user guide before you write them into a config, since the set of available buffs can change between releases.
Before you compare buffed and unbuffed runs, decide whether the original prompt stays in the scan alongside its paraphrases. That choice changes what a pass or fail means, so record it with the run. Apache 2.0 licensing and the garak v0.17.1 release matter here mainly as context: they tell you the tool is free to use and that buff behavior should be checked against the version you are running, not against older examples. Document the buff settings in version control with the rest of the scan configuration so a later rerun tests the same thing.
Buff options and when each fits
This table compares the buffs garak ships, plus the buff_max and include-original settings, by what each changes in a prompt, the case it fits and its cost in coverage, noise or run time. Read each row as a question to answer before enabling a buff, and confirm current names and defaults in the user guide and source before writing them into a config.
| Buff | What it changes | Use case it fits | Trade-off to plan for |
|---|---|---|---|
| Paraphrase (PegasusT5) | Rewrites each prompt into alternative phrasings using a PegasusT5 model | Static prompt sets where wording variation may matter more than another generation | Paraphrase model runs add time; confirm model download and hardware needs in the source |
| Paraphrase (Fast) | Rewrites each prompt with a lighter, faster paraphrase method | Larger scans where a quicker paraphrase pass is acceptable | May produce less varied phrasings than PegasusT5; check output quality on your probes |
| Encoding (Base64, CharCode) | Encodes the prompt text so the model receives an encoded form | Testing whether a model or guardrail decodes and acts on hidden instructions | Many models do not decode reliably, so a clean result may reflect low comprehension, not safety |
| Low-resource language | Translates prompts into lower-resource languages | Checking whether safeguards hold outside English | Translation quality varies by language; a failure may come from the translation itself |
| Lowercase | Converts the prompt to lowercase | Cheap check of case-sensitive filters or keyword matching | Small change in wording; usually adds little coverage over a paraphrase or encoding buff |
| buff_max | Caps how many buffed variants are produced from a prompt | Keeping a paraphrase or encoding buff within a planned inference budget | Lower caps reduce run time but may miss variants; confirm the current parameter and its default in the user guide |
| include-original | Keeps the unmodified prompt in the set alongside buffed versions | Comparing buffed results against the baseline prompt | Adds attempts to every run; reports must make clear which attempts were buffed |
When a paraphrase buff beats more generations
The choice is between spending a fixed inference budget on more generations per prompt, where garak makes 5 by default, and spending it on paraphrased versions of the same prompt. The garak FAQ describes the paraphrase buff as often a good alternative to more generations when the budget is fixed, so the question is which gap your scan actually has. Start by deciding what is limiting your result: the model's output varies from one attempt to the next on the same wording, or the model changes its behavior when the same request is worded differently.
More generations help when the main gap is stochastic variation. If a probe's failures appear on some attempts and not others with identical input, a single phrasing is undersampled, and extra generations will reveal more of the model's behavior. Paraphrasing helps when the model reacts to wording: a request refused in one form and answered in another points to phrasing sensitivity, and generations of the original prompt will keep repeating the same refusal. A short check is to look at the existing JSONL report from a baseline run and see whether the probe's failing attempts cluster on particular prompts or spread across generations of the same prompt.
To compare the two on a fixed budget, run a pilot against the same target and probe set twice with an equal number of total requests. One arm uses the default generations with no buff, and the other uses the paraphrase buff with fewer generations per prompt so the request count matches. Keep the system prompt, seed and detector settings identical, and record the garak version used, since results can shift between releases. Then compare the failure rates per probe and check whether the paraphrase arm surfaces failures the baseline missed. Confirm with your buff configuration how buff_max limits the number of paraphrases and whether include_original keeps the unmodified prompt in the run, because both change the request count you are budgeting.
How to add a buff to a garak scan
This sequence adds a garak buff to a scan with a baseline for comparison, so you can see whether transformed prompts change the results. Each step ends with a check, and the finished run leaves a versioned config and reports you can rerun.
Install garak from PyPI
Create a virtual environment on Python 3.11 or newer, then install garak with pip from PyPI. Your platform engineer or the person running the scan does this on a Linux or macOS host, since garak is developed on those platforms. Confirm the install by running garak with its help flag and noting the version it reports, because you will record that version in a later step. The step is done when the help output prints without errors.
Confirm the generator responds
Point garak at the model or application endpoint you plan to test, and run one small probe with the default settings. This shows that the generator connects, authenticates and returns text that garak can parse. If the target is a REST endpoint, check the short YAML description of the endpoint first. The step is done when the JSONL report lists attempts with model output and the garak.log file shows the connection without errors.
Choose the buff and its settings
Pick the buff that matches the change you want to test. The paraphrase buff rewrites each prompt into alternative phrasings and is the one the garak FAQ describes as often a good use of a fixed inference budget. Encoding buffs (Base64, CharCode), the lowercase buff and the low-resource language buff change prompts in other ways. Confirm the buff names and the settings for buff_max and whether original prompts are included with the buff's own help output, since exact keys can change between releases. Write the chosen values down before the next step.
Run a baseline without the buff
Run the chosen probes against the target with no buff applied, using the same probe selection, generation count and system prompt you plan to use for the buffed run. The baseline is the reference point, so keep every other setting fixed. Save the run's report directory name. The step is done when the report exists and the FAIL or PASS result for each probe is recorded, which gives you a number to compare against.
Run the same scan with the buff
Repeat the baseline run with the buff enabled and no other changes. Keep the probes, generations and endpoint identical so that any difference comes from the buff. Check the JSONL report for the transformed prompts: each attempt should show the rewritten or encoded text alongside the model output. Then confirm in garak.log that the buff loaded without warnings. The step is done when you can find at least one buffed prompt in the report that differs from its baseline counterpart.
Compare the two runs
Line up the baseline and buffed reports probe by probe. Note which probes changed status, how the failure rates moved and whether the buffed prompts that failed share a pattern, such as a particular phrasing style. Treat a single changed result with caution, because model output is stochastic and a few generations per prompt may not settle it. The step is done when you have a written comparison that says which probes shifted and by how much, and what you will rerun to confirm it.
Record version and config in version control
Commit the run configuration, the buff settings, the endpoint description and the garak version you recorded earlier to your version control system. Store the report paths or identifiers next to the commit so the baseline and buffed runs can be found later. Anyone who reruns the scan from that commit should get the same setup. The step is done when a fresh checkout of the commit lists the same garak version and the config reproduces both runs.
Security and operational considerations for buffed scans
Buffs change the prompts garak sends, and some buffs call out to external services, so the transformed text becomes a data handling question as well as a testing one. The cards below cover where test content travels, where it is written, how long it stays, and how to rerun a buffed scan and get the same answer.
Third-party paraphrase services
Some buffs produce their paraphrases with a model or service that runs outside your environment, so the original test prompts and their rewrites may leave your network. Before a scan, confirm which buff loads which model, where that model runs, and whether the provider retains inputs. Keep sensitive probe content, such as prompts that resemble your own customer data, away from any buff that sends text to an external endpoint, and prefer a locally hosted model where your policy requires it.
Paraphrase buff sourceTest content in logs
Each buffed prompt is an attack string, and it can appear in garak.log at debug level, in error messages from a failed generator, and in the prompt field of the report. A log shared with a ticket queue or a central logging system can therefore carry adversarial text outside the security team. Check the log level you run at, redact or restrict access to the log directory, and agree with the logging team which fields they may ingest.
Storing the JSONL report
The JSONL report records every attempt with its prompt, output and evaluation, so it holds both the transformed inputs and the model's responses to them. Treat it as sensitive: set file permissions, store it in the same access-controlled location as other security evidence, and decide who may copy it into dashboards or tickets. Set a retention period for reports and logs in your records policy, because each run writes its own file and they accumulate quickly.
Continuity of garak.log
garak continues one garak.log file across runs rather than starting a new one for each scan. A buffed scan run next to an unbuffed scan can therefore share a log with unrelated test traffic, which makes it hard to attribute entries to one run or to remove one run's content later. Record the run identifier and the configuration file for each scan, and rotate or archive the log at the end of each assessment so that its contents map to a single engagement.
Pinning buff and generation settings
A paraphrase buff produces different wording depending on the model, the version of garak, and the buff settings, so the same scan can yield different prompts on a rerun. Record the buff names, the buff_max value, whether original prompts are included, the seed and the garak version in your run configuration under version control. Without these, a change in results may reflect a change in the test rather than in the target model.
Confirming results before sharing
A buffed prompt that succeeds may be a rewording the target never sees in production, so a finding can overstate or understate real exposure. Before a result goes to a model owner or an auditor, check a sample of the transformed prompts in the report, confirm they read as plausible user input, and confirm the original prompt is still identifiable. Ask the team who owns the target to review the findings against their actual traffic.
Questions teams ask about garak buffs before scanning
Do garak buffs add cost to a scan?
Yes, buffs add cost because they change the number of prompts that reach your generator. A buff such as paraphrase turns each base prompt into alternative phrasings, so every phrasing becomes another request to the model under test. The cost you pay is the inference bill for the target endpoint, plus the time your team spends reviewing results. Garak itself is free and licensed under Apache 2.0. Ask your model provider or platform owner what each request costs on your contract, and calculate the total from your own prompt count and the buff settings you choose.
How does buff cost scale with the number of prompts?
Buff cost grows roughly with the product of base prompts, buff outputs and generations per prompt. The FAQ describes paraphrasing as often a good alternative to more generations when the inference budget is fixed, so the decision is about where the extra requests go. Doubling the base prompt set doubles the work for any buff. Raising the buff output cap multiplies it again. Before a large run, count your prompts with a dry run or the probe listing, then estimate requests as prompts times buffed variants times generations. Confirm the cap behavior in the buff settings for your garak version.
Does a buffed garak scan take longer than a plain scan?
A buffed scan takes longer because it sends more prompts to the target, and wall-clock time depends mostly on the endpoint's response time and any rate limits. Paraphrase buffers also run a local model to produce phrasings, which adds processing time on the scanning host. Lowercase and encoding buffs add little compute but still multiply requests. The practical way to plan is to time a small pilot with and without the buff, then scale by the request count. Your run time will also depend on parallelism and whether the endpoint can absorb concurrent requests.
What does my team need to provide for a buffed garak scan?
Your team needs four things: access to a generator that matches the production application, a pilot prompt set that reflects real misuse, reviewers who can judge flagged outputs, and a place to store reports. Generator access should use the same model, system prompt and guardrails users meet in production, or the results will not describe your exposure. The pilot set should contain prompts from your own threat model, not only generic samples. Reviewers should be named before the run, because a paraphrased prompt that produces a flagged answer still needs a human decision about severity.
Can our own engineers run garak buffs without outside help?
Yes, an engineer comfortable with Python and the command line can install garak from PyPI on Python 3.11 or newer, configure a generator and enable a buff. The buff option is a configuration choice, so the work is mostly deciding which buffs match your threats and reading the JSONL report. The harder parts are usually the endpoint wiring, the system prompt, and interpreting results against your policy. If your team has no one to own those, an implementation partner can scope the work in writing. Confirm your platform's support for the generator you plan to use.
Which buff choices create the most risk of a misleading result?
The main risk is treating a buffed result as proof that a model is safe when the buff never produced the attack variants that matter to you. A paraphrase buff depends on the phrasing model, so its outputs may not match how your users write. Encoding buffs can trigger refusals that do not reflect real attacks against your application. Keep the original prompts in the scan so you can compare plain and buffed hit rates, and record the buff settings in version control so a later rerun shows a true change. Review a sample of passing results as well as failures.
When should we bring in outside help for buffed scans?
Bring in outside help when the scan results will support a customer review, a regulator, or an internal risk decision, and your team cannot independently validate the setup. Outside help is also useful when the target is a guarded or agentic application, where the generator wiring and tool permissions change what a buff can reach. DeployOpen runs security testing of AI systems and agents and delivers findings with fixes and a retest. Scope and deliverables are agreed in writing before work begins, and the quote follows from that scope. DeployOpen does not issue audit reports or certifications.
Where should we start before adding buffs to a garak scan?
Start with a plain scan of a small, representative prompt set, then add one buff at a time and compare the reports. This shows whether a buff changes results for your application or only adds requests. Keep generations at a level you can afford, since the FAQ points to paraphrase as an alternative to extra generations on a fixed budget. Read the official garak user guide at docs.garak.ai for the current buff names and options, and confirm them against your installed version before you commit a configuration.
How a buffed probe prompt flows through garak
The flow starts at a probe that holds a static prompt. The buff stage rewrites that prompt in flight, either locally or through a paraphrase service, before the generator sends it to the target model. The detector then scores each response, and the attempt is written to the JSONL report. The trust boundary matters: when a paraphrase buff or a remote generator is used, prompt text leaves the scanning host, so check where that service runs and what it may retain before you enable it.
Buffed prompts cross the trust boundary when paraphrasing or generation runs remotely.
How DeployOpen scopes garak buff testing
DeployOpen treats garak buffs as one variable in a controlled test plan, not as a switch to flip on. We agree in writing which static prompts, buffs and generator settings are in scope, then build, run and document the scan so your team can rerun it and compare results.
How we scope
- Inventory the static prompt sets your team already uses and mark which ones matter for your application.
- Agree which buffs are in scope, such as paraphrase, lowercase or encoding, and why each one is included.
- Record the inference budget and generations per prompt, so buff results can be weighed against more generations.
- Confirm the target endpoint, its system prompt and the acceptance criteria in a written, fixed scope.
How we build
- Configure the garak run in version-controlled files so buff settings, buff_max and include-original choices are repeatable.
- Check the paraphrase buff output on sample prompts before the full run, to confirm the phrasings still test the intended risk.
- Compare buffed and unbuffed runs against the same target version, so differences reflect the buff rather than model drift.
- Test the generator connection and detectors with known-good and known-bad examples before results are trusted.
How we hand over
- Deliver the run configuration, the scan commands and the JSONL reports with a written summary of buff effects.
- Document which buffs were used, which prompts they changed and how the results should be read by your team.
- Walk your engineers through rerunning the scan, including what to record when the model or system prompt changes.
- Provide the findings with recommended next steps, such as where extra generations or a paraphrase buff is the better spend.
How we support
- Fixed-scope engagements are agreed in writing before work starts, with deliverables and timelines stated in the scope.
- Ongoing support, upgrades and continuous testing are available as a retainer when scans must repeat after releases.
- Ask for a quote based on the written scope, covering prompt set size, number of targets and rerun frequency.
- Confirm with DeployOpen which garak release and Python version your environment will use before the build starts.

