Comparing guardrail products with promptfoo before you buy
You have a shortlist of guardrail services or filters, and each vendor demo shows a different set of cases. promptfoo can run one shared attack set and one shared benign set through every candidate, so detection, false positives and latency are measured on the same inputs and the results can be compared directly. The open-source tool is licensed under the MIT license, and it runs locally on your machine, talking directly to each candidate's API, so the test data does not pass through a promptfoo-hosted service.
Teams need this comparison most at three points: a first purchase, a replacement of a filter already in production, and a contract renewal where the current vendor's detection rate has not been measured against anything else. Build the attack set from the threats your application actually faces, such as prompt injection through documents and jailbreak attempts against your system prompt, and build the benign set from real request types your users send, including unusual but legitimate ones that a filter might wrongly block. Keep the two sets fixed so every candidate sees the same inputs, and record the guardrail's decision, its latency and any errors separately so an outage is not mistaken for a detection miss.
The results do not decide the purchase on their own. Pricing, contract terms, support commitments, data residency and where guardrail inputs are processed are separate questions, and a cheaper filter with weaker detection may still be the right choice for a low-risk workflow. Ask each vendor in writing which regions process your prompts, how long they retain them and whether logs can be excluded, and confirm the answers against the vendor's current documentation before you sign. Also confirm how each product's API reports blocks, because the same decision can appear in different fields, and a comparison that misreads one vendor's response will reach the wrong conclusion. Use the promptfoo results to narrow the shortlist and to set questions for procurement, not as a substitute for them.
Which candidates you can compare and how each is wired
Managed guardrail services run as an API in the vendor's cloud and return a block, allow or severity signal for a given input or output. Because they are hosted, you do not install the detection logic yourself, but you do depend on the vendor's API shape, regional availability and the way each service reports its decision. promptfoo can call these services through built-in provider settings where they exist, or through a small wrapper where the API does not match what promptfoo expects. The details differ by vendor, so the sibling topics on Azure, AWS Bedrock, NVIDIA NeMo Guardrails and Google Cloud Model Armor are the right next reads.
- Built-in provider settings: Some services can be configured directly in the promptfoo provider or test settings, which keeps the comparison config short.
- Direct API calls: Where a service exposes a separate check endpoint, a custom HTTP or Python provider can call it and map its response to a guardrail flag.
- Per-service signal differences: Each service reports a decision differently, such as a category, a severity level or a status field, so the mapping must be written per vendor.
- Recurring usage charges: Each test run calls the vendor's API, so cost grows with dataset size and rerun frequency. Ask each vendor for its current per-call pricing in writing.
- Regional and version variance: Confirm which regions, API versions and model or policy configurations you are testing, since results can change when a vendor updates its service.
Before starting, confirm with each vendor the exact API version, the configuration you will test and the data residency terms that apply to your test prompts.
Open-source scanner libraries run inside your own environment as code or as a service you deploy. They give you control over the scanner version and the data path, but the comparison depends on how you run them, since a library imported into a script behaves differently from a scanner deployed behind an API. promptfoo does not ship a built-in connector for every library, so most comparisons wrap the scanner in a Python or HTTP provider. The NeMo Guardrails and LLM Guard topics cover those two cases in detail, and you should check each project's current maintenance status before choosing it as a candidate.
- Python provider wrapper: When the scanner is a Python library, a Python provider can call its scan function directly and return a guardrail flag.
- HTTP provider wrapper: When the scanner runs as a service, an HTTP provider can post the prompt to its endpoint and read the verdict.
- Version pinning: Record the exact library or container version in the test report, because scanner behavior changes between releases.
- Maintenance status: Confirm the project is actively maintained before you base a purchase or replacement decision on it.
- Infrastructure you run: Your team pays for hosting, patching and capacity, which recurs alongside the test runs.
Before starting, confirm the scanner's license terms, its maintenance status and the minimum runtime it requires in your environment.
In-house filters include regular expressions, classifiers your team trained or tuned, rule engines and filters placed in front of or behind your own application. They are often the baseline a team should measure first, because they show how much a commercial or open-source product adds. Wiring them into promptfoo is usually the simplest path, since the filter already sits in your code and can be called from a local script or service. The main risk is that the filter is tested only on the data it was built around, so the suite must include inputs you did not write the filter for.
- Application-level wrapping: Call the filter from the same code path your application uses, so the test reflects what users actually reach.
- Service-level wrapping: If the filter runs as its own service, use an HTTP provider to test it on its own, which isolates its decisions.
- Same dataset, same mapping: Apply the identical attack and benign sets and the same flag mapping used for the other candidates.
- Ownership of results: Your team owns the maintenance of the filter and of the tests, which is an ongoing internal cost.
- Baseline value: Measuring the in-house filter first gives you a reference point for judging whether a product is worth buying.
Before starting, confirm which layer of your stack the filter sits in and whether the test should cover the application path or the filter alone.
Comparison options and when each fits
This table compares the three choices that shape a guardrail bake-off: how far the test reaches into the application, whether vendors share one dataset, and whether the run is one-off or scheduled. Read each row as a trade-off, since the same suite can be configured several ways and each setting answers a different buying question.
| Option | What it measures and hides | When it fits |
|---|---|---|
| Application-level tests | Measures the full application with the guardrail in the request path, including prompts, tools and output handling. Hides which vendor caused a block, and results change when the app changes. | Choosing a guardrail for a specific application where end-to-end user impact matters most. |
| Service-level tests | Measures the guardrail call alone, so detection and false positives are attributed to the product. Hides application context that may reduce or increase real-world blocks. | Comparing vendors fairly on detection and false positives before any application integration exists. |
| Single shared dataset | Gives every guardrail the same attack and benign prompts, so scores are directly comparable. Hides vendor-specific strengths on categories the shared set does not cover. | Head-to-head comparisons where a buying decision depends on a like-for-like ranking. |
| Per-vendor datasets | Lets each product be tested on the categories its documentation targets. Hides differences in test difficulty, which makes raw scores hard to compare. | Checking whether a product covers a specific language, format or domain your users need. |
| One-off CLI run | Produces a snapshot of results for one configuration and one date. Hides drift when vendors update models, thresholds or service behavior. | Early evaluation, proof-of-concept work or a single procurement decision. |
| Scheduled run in CI | Tracks results over time and flags regressions after configuration or vendor changes. Hides nothing about change, but adds ongoing run cost and maintenance of the suite. | Replacement planning, or ongoing assurance after a guardrail is in production. |
| Confirm before relying on a mode | Support for a given test mode depends on each vendor's API and the promptfoo provider you use. Confirm the exact guardrail call, response fields and rate limits for each product in your own environment before running the comparison. | Before committing to a comparison design across more than one vendor. |
Setting up a side-by-side guardrail run in promptfoo
This sequence produces one eval in which every guardrail sees the same attack and benign cases, so each product's block decisions, misses, false positives and errors can be compared from a single exported results file.
Install promptfoo on a supported Node.js version
The engineer running the comparison installs the promptfoo npm package on a workstation or CI runner that has Node.js 22.22.0 or newer, which the current npm release requires. Check the install by running the promptfoo version command and confirming it reports the release you intend to test. Record that version in your test notes, because results from different releases are not guaranteed to be identical. The npm package page and the install documentation are the next read.
Define each guardrail as a provider
In one promptfoo configuration file, list each guardrail under test as its own provider: for example, one entry for each cloud service and one for each self-hosted filter. Use the same configuration structure for every entry so that any difference in results comes from the guardrail and not from how it was wired. Keep credentials in environment variables and not in the file. Check the setup by running a single known test case against each provider and confirming that each returns a decision (allow or block) rather than a connection or authentication error.
Load the shared attack and benign sets
Point the configuration at one attack dataset and one benign dataset, and make sure every provider receives exactly the same cases in the same order. Tag each case with its expected outcome, block for attacks and allow for benign inputs, so the assertions can grade it. Keep the sets in version-controlled files so the comparison can be repeated after a vendor update. Check the load by confirming the case counts in the run summary match the counts in your source files for both sets.
Write assertions that record block or pass
Add assertions that convert each provider response into a recorded outcome: a blocked attack counts as a detection, an allowed attack counts as a miss, a blocked benign case counts as a false positive, and an allowed benign case counts as a pass. Use the guardrail assertion types in promptfoo for the expected decision on each case, and keep errors separate from both outcomes. Check the assertions by running a handful of cases you have labeled by hand and confirming each lands in the category you expect.
Report errors separately from decisions
Configure the run so that timeouts, rate limit responses, authentication failures and malformed responses are reported as errors and not as passes or blocks. Without this separation, a guardrail that fails under load can look more accurate than it is. Review the error count for each provider before reading any detection or false positive figure. Check this step by deliberately sending one invalid credential to a provider and confirming the failure appears as an error in the output.
Run the eval across all providers
Run the evaluation once with every provider and the shared datasets, and keep the run output for the record. Repeat the run if you plan to compare results over time, because cloud guardrails can change behavior without notice. Confirm the run completed for every provider and that the number of result rows equals the number of cases multiplied by the number of providers. Any gap in that count means a case was skipped and the comparison is incomplete.
Export results for side-by-side comparison
Export the results to a file format your analysis tools can read, such as the JSON or CSV output that promptfoo produces, and build a table with one row per guardrail and columns for detections, misses, false positives, errors and latency. Compute each rate from the counts and keep the denominators visible. Check the export by confirming the totals in the table match the totals in the run summary. The result is a single comparison that a security, product and procurement team can review together.
Reading detection, false positives and latency side by side
Reduce each guardrail to three comparable figures from the same runs: the detection rate on the attack set (the share of attack prompts the guardrail flagged), the wrongly blocked rate on the benign set (the share of legitimate prompts it flagged), and the per-call latency. Record the latency from the same network position for every product, ideally from the machine where promptfoo runs, and state whether each figure includes network round trips. A guardrail hosted in a different region or reached through a gateway will look slower for reasons that have nothing to do with its detection logic. Keep the attack and benign sets identical across products, and store the raw per-prompt results so a reviewer can trace every figure back to a specific prompt.
These three numbers pull against each other. Most guardrails expose a sensitivity or severity setting, and raising sensitivity catches more attacks while also blocking more legitimate requests. A product that looks better on detection may simply be set more aggressively, so a fair comparison fixes thresholds at matched operating points or plots detection against false positives across a range of thresholds. Ask each vendor which settings are comparable, and confirm the default values in your own configuration before you read anything into a headline number. Where a product offers no threshold control, say so in your notes, because that limits how you can tune it later.
Treat any single run on a small set as a starting point, not a verdict. A handful of misses can swing a detection rate sharply, and latency varies between calls and across time of day. Repeat runs, widen the sets with cases that reflect your own traffic and language mix, and report a spread for latency rather than one average. Before a purchase or replacement decision, have the people who will own the guardrail review the misses and the false positives themselves, since a blocked request that matters to your business weighs more than a count suggests. The promptfoo introduction explains how evals are run locally against the models under test, which makes it practical to repeat these runs under identical conditions.
Security and data handling risks in a guardrail bake-off
A guardrail bake-off sends attack prompts, benign prompts and vendor credentials through several services at once. The four risks below connect because each one moves sensitive material to a place the team did not plan for, so the test plan should settle data, secrets, output and tooling before the first run.
Real customer prompts sent to vendors
Every prompt in the test set goes to the guardrail service under evaluation, and that service is a third party in most comparisons. Production prompts often contain personal data, account details or internal context, so copying them into a benign set can move regulated data outside your control. Use synthetic prompts or data your privacy and legal teams have approved for each vendor. Confirm each vendor's data retention and training terms in writing before you send anything.
API keys for several vendors
A bake-off usually needs credentials for each cloud guardrail, plus model keys for the application under test. Keeping them in one config file means a single leaked file exposes every account. Reference keys through environment variables loaded from your secret store, and scope each key to the minimum permissions the test needs. Rotate keys after the comparison and confirm that CI logs do not print them.
Eval output holding sensitive prompts
Promptfoo results record the prompts, model responses and guardrail decisions for every test case, so the output file is as sensitive as the test data itself. Decide where results are written, who can read them and how long they are kept before the first run. Keep output in an approved location with restricted access, and delete or redact files that contain sample data you were not allowed to store. Check the output path in every CI job.
Self-hosted app limits for shared comparisons
The self-hosted promptfoo app stores data in a local SQLite database that cannot be shared across replicas. It has no RBAC, horizontal scaling, or built-in authentication or SSO, and the documentation does not recommend it for production use. If the team shares a comparison through this app, anyone who can reach it may see the results, and a single instance cannot serve a group reliably. Put it behind your own access controls, or keep results in files under the team's governed storage until a multi-user setup is approved.
Self-hosting docsQuestions buyers ask before comparing guardrails with promptfoo
What does it cost to run promptfoo for a guardrail comparison?
The promptfoo Community edition is free, and the software is released under the MIT license, so the tool itself adds no license fee for a comparison. The costs you will actually pay are the model and guardrail API calls your test runs generate, which are billed by each cloud provider under your own accounts, plus the engineering time to wire each candidate into a provider. The Community edition includes all LLM evaluation features, all model providers and integrations, and red teaming with 10k probes per month (see the promptfoo pricing page). Enterprise, which adds team sharing, SSO, a centralized guardrail dashboard and priority support, is priced on a custom basis, so you only need a quote if you want those features. Ask any partner for a quote that separates one-time setup effort from recurring test-run and API charges.
How long does a guardrail comparison take, and what drives that time?
No fixed duration applies, because the work depends on your environment. The main drivers are the size of your attack and benign datasets, the number of candidate guardrails, the call rate limits each API enforces, and how much effort it takes to wrap each service in a promptfoo provider. A small set of candidates with clean APIs and a modest dataset can be run quickly, while several candidates with different request formats, image checks or per-request quotas take longer, especially if you need to rerun tests after changing thresholds. Rate limits also stretch run time because a large suite may need throttling or retries. Ask for a written scope that lists each candidate, the dataset sizes, the provider wrappers to build and the number of rerun cycles included.
What does my team need to provide before the comparison starts?
You need three things. First, working access to every guardrail API under evaluation, including credentials with permission to call the guardrail endpoints, the correct regions or endpoints, and any guardrail or template identifiers already configured. Second, test data that your legal, privacy and security teams have approved for use, since attack prompts may contain sensitive content and benign prompts often come from real traffic. Third, someone who can read eval output, understand what a pass, fail or error means, and decide which thresholds matter for your business. Without the third item, the results will be numbers nobody can act on. Confirm in advance where test logs will be stored, because promptfoo runs locally and results stay wherever you write them.
Can our own engineers run the comparison without outside help?
Yes, if your engineers are comfortable with Node.js (promptfoo requires Node.js 22.22.0 or newer for the 0.124.1 npm release) and with the APIs of each guardrail you plan to test. The CLI setup, dataset files and assertions are approachable for an engineer who has written API integrations before. The harder part is building a fair comparison: writing a consistent provider for each candidate, mapping each vendor's block signal to the same flag, and separating errors from genuine passes. A team that does this in-house usually needs a clear test plan and a second reviewer to check the results before anyone uses them in a purchase decision.
When is outside help worth paying for in a guardrail comparison?
Outside help is usually worth considering in three situations. The first is unfamiliar APIs, such as a vendor whose metadata differs across endpoints or whose response format your team has never parsed. The second is a large number of candidates, where consistent wrappers and repeatable runs save more time than the work costs to set up. The third is a need for defensible evidence, for example when results will go to a risk committee, an auditor or a customer's security review. In that last case, the comparison must be reproducible, documented and reviewed. DeployOpen plans, implements and documents self-hosted open-source platforms and runs security testing, including AI security testing, but it does not issue audit reports or certifications, so any independent assurance must come from an assessor you engage separately. Ask for a fixed-scope written agreement before work begins.
Why do the guardrails disagree on the same prompt, and how should I read that?
Disagreement is expected because each guardrail uses its own categories, severity scales, thresholds and default actions. One service may flag a prompt as a prompt attack while another flags the same text only as harmful content, and a third may return a blocked status without a category at all. Before you draw conclusions, check that the guardrail was configured with comparable settings, that errors and timeouts are counted separately from passes and blocks, and that each candidate received identical input. Then compare the results on two axes: missed attacks on the adversarial set and wrongly blocked requests on the benign set. For example, a candidate that blocks more attacks but also blocks many benign prompts may be a poorer fit than one with slightly lower detection and far fewer false positives. Record the threshold you chose for each candidate so the comparison can be repeated.
Which data should we avoid putting into the comparison?
Avoid putting live customer data, credentials or regulated personal information into attack or benign sets unless your privacy and security owners have approved that use and the storage location. Synthetic or anonymized prompts usually cover the same detection patterns. Also check whether each vendor's API retains request content under the terms of your account, since that affects what you can send. Keep the datasets in version-controlled storage with restricted access, and delete any intermediate logs that contain sensitive content once the results are recorded. Ask your partner or internal reviewer to document these decisions as part of the test plan.
Turning comparison results into a purchase or replacement decision
The comparison only helps a purchase decision if its results can be traced, explained and repeated. Before anyone reads the numbers, record the scope of the run: which guardrail products and configurations were tested, which versions or API endpoints were called, the date of each run, and the exact version of the attack and benign datasets used. Store the promptfoo configuration file alongside those records so the run can be reproduced. Without this record, a vendor who ships a model or policy update can make last quarter's results meaningless, and the organization will have no way to show what it compared.
Then share the results with the people who will live with the decision. Security owners need the missed-attack rates by category and the severity of what got through. Product owners need the wrongly blocked benign requests, because those are the failures their users will report. Write down which failures matter most for your application before you look at the totals. A customer support assistant that refuses ordinary account questions has a different tolerance for false positives than an internal tool with no public input. Agree on those thresholds in writing so the chosen product is judged against your priorities, not against whichever table looked best.
Keep the suite after the decision. Guardrail vendors change detection models and policies over time, and your own application will change too, so the same datasets and assertions should be rerun after each upgrade or configuration change. Ask vendors what notice they give before changing detection behavior and whether they publish version history. Treat the comparison as input to the decision only. Legal, privacy and procurement review still apply, including data processing terms, where prompts are sent and stored, and contract terms, and none of these are settled by a test score.
How DeployOpen scopes and delivers a guardrail comparison
DeployOpen approaches a guardrail comparison as a written, fixed-scope engagement. We agree which guardrails, attack and benign sets, and decision criteria apply before any test runs, then deliver a promptfoo test suite and a findings report your team can rerun. Ongoing support and continuous testing are available as a retainer.
How we scope
- Agree in writing which guardrail products, versions and your own filters are included in the comparison.
- Define the attack and benign datasets, and which categories of legitimate traffic must not be blocked.
- Set the metrics to report: detection, false positives, latency and errors, with the thresholds your team will use.
How we build
- Wrap each guardrail behind a consistent promptfoo provider so every product runs the same test cases.
- Run identical attack and benign sets against each candidate and record blocks as guardrail flags.
- Keep provider errors and timeouts separate from passes and failures so vendor outages do not skew the results.
How we hand over
- Deliver the promptfoo configuration, datasets and provider code in your repository for your team to own.
- Provide a findings report that compares detection, false positives and latency side by side, with method notes.
- Document how to rerun the comparison against a replacement guardrail, and what to confirm with each vendor.
How we support
- Retest after vendor updates, threshold changes or configuration edits, using the same written scope.
- Continue maintaining the test suite as new attack and benign cases are added by your team.
- Offer ongoing support, upgrades and continuous testing as a retainer if your team wants them after handover.

