Replacing the LLM Guard Prompt Injection scanner starts with your own attack set
If your LLM application gets its prompt injection check from an archived LLM Guard deployment, the replacement is a measured selection, not a like-for-like swap. LLM Guard's Prompt Injection scanner runs the ProtectAI/deberta-v3-base-prompt-injection-v2 model, a fine-tuned microsoft/deberta-v3-base, and Protect AI models on Hugging Face are no longer maintained. That means the model you depend on will not receive fixes, and no new LLM Guard rollouts are recommended, so the decision is which maintained option fits your traffic and how much you can prove about it. Each option (NeMo Guardrails jailbreak and injection detection, classifier rails, or Llama Guard) detects different patterns, so none of them can be assumed to match the old scanner's coverage.
Start by listing every path that calls the scanner: the library call sites, the API server endpoints, batch jobs, and any agent or retrieval flow that sends untrusted text through it. Then confirm which of those paths block requests and which only log. The effort depends mainly on two things: how many traffic paths call the scanner, and how large your attack set is. A single chat endpoint with a few hundred labeled attacks is a small exercise. Several endpoints, tool-using agents and retrieval inputs multiply both the test cases and the integration work. Ask any partner to price the work against those two counts and to state which paths and which attack categories are in scope.
Build the attack set before you choose the replacement. Collect prompts your application has actually seen, add known injection and jailbreak patterns, include indirect injections in documents and tool outputs, and keep a separate benign set so you can measure false positives. Run the current LLM Guard scanner on both sets and record its decisions, thresholds and latency. That baseline is the bar the replacement must meet or beat on missed attacks. The OWASP LLM Top 10 treats prompt injection as LLM01, so use its categories as a checklist for coverage gaps. Confirm the license and model terms of each candidate with its publisher before you adopt it.
Which LLM Guard prompt injection behaviors map to each replacement
This table compares the LLM Guard Prompt Injection scanner with the NeMo Guardrails jailbreak and injection detection, NeMo input rails, classifier rails and Llama Guard. Read each row against your own scanner settings, since the replacements differ in what they detect and in what they require you to host and tune. The main takeaway is that no single option is a drop-in match for one score threshold, so you should expect to re-validate decisions on your own attack and benign sets.
| Behavior | LLM Guard Prompt Injection scanner | NeMo Guardrails jailbreak and injection detection | Classifier rails and Llama Guard |
|---|---|---|---|
| What it detects | Prompt injection inputs scored by a single fine-tuned classifier that returns a risk score for each prompt | Jailbreak and injection attempts through the library's built-in detection, which you enable and configure in config.yml | Classifier rails flag inputs by label or category, and Llama Guard classifies prompts against a safety taxonomy you select |
| Model or rule dependency | Depends on the ProtectAI/deberta-v3-base-prompt-injection-v2 model, a fine-tuned microsoft/deberta-v3-base, so model weights must be hosted and loaded | Depends on the detection setup you choose, which may call a model or service, so confirm which components run in your environment | Depends on the classifier or Llama Guard weights you host, and their license terms must be checked against your use |
| Threshold handling | Uses a single score threshold that decides block or allow, so the cutoff is the main tuning control | Decisions are expressed through rail configuration and flow logic rather than one global score, so thresholds do not carry over directly | Decisions depend on the label set or category policy, so a score cutoff from LLM Guard has no direct equivalent |
| Input rail placement | Runs as a scanner inside a Python call or API server, with the decision returned to your application | Runs as an input rail in the NeMo pipeline, so the check sits before the model call with rail order defined in configuration | Can run as a separate rail or service, so latency and failure behavior must be measured in your deployment |
| What does not map cleanly | A score from one model cannot be reproduced by a rule set, so exact block decisions will change | Colang rules and built-in checks catch different phrasings, so missed attacks and false positives must be counted again | Category coverage differs from a binary injection score, so some LLM Guard blocks may have no matching category |
| Items to confirm | Confirm the model license, the exact threshold in use and whether scanner output is enforced or only logged | Confirm the NeMo Guardrails version, supported detection components and any external services they call in your setup | Confirm the classifier or Llama Guard license, model size, hosting requirements and the label set with the vendor or maintainer |
Choosing between NeMo rails, classifier rails and Llama Guard
NeMo Guardrails jailbreak and injection detection runs as an input rail inside the framework's request flow, before the user message reaches the model. It is configured in a config.yml file and, where needed, Colang files, so the same configuration can also carry dialog, retrieval, execution and output rails. The checks are rule and pattern driven, which makes them easy to read and version, but they catch the phrasings they were built to recognize and little beyond that.
- What it detects: known jailbreak and injection patterns, such as instruction override attempts. Confirm the exact coverage of the version you pin.
- Where it runs: on the input side, before the LLM call. Output rails can be added in the same configuration.
- What it needs: Python 3.10 to 3.13, the
nemoguardrailspackage, aconfig.yml, and any Colang files (Colang 1.0 is the default). Check whether a given detector calls a model endpoint, since that changes your hardware plan. - Main trade-off: low operating cost and clear rules, but reworded, encoded or multi-step attacks can pass, and tuning can produce false positives on legitimate text.
Before relying on any heuristic, confirm which ones your pinned version enables and run them against your own attack set. The project is at NVIDIA-NeMo/Guardrails.
A classifier rail sends the input to a trained model that returns a score, and the rail blocks requests above a threshold you set. Classifiers generalize better than fixed patterns to paraphrased attacks, but their results depend on the training data, the threshold and the traffic they see. NeMo Guardrails includes jailbreak and injection detection and content safety models that can be wired in as rails. The Prompt Injection model used by LLM Guard is a fine-tuned DeBERTa model published by Protect AI, and those models are no longer maintained, so any classifier you choose must be assessed on its own merits.
- What it detects: injection and jailbreak intent inferred from the whole input, including many reworded attempts.
- Where it runs: on the input side, usually as a rail ahead of the model call, with the score compared against a threshold.
- What it needs: model weights stored and served inside your infrastructure, a CPU or GPU sized to your latency budget (confirm with the model card), and an inference runtime the rail can call.
- License and maintenance: confirm the model's license, training data and last update before adoption, and plan who retrains or replaces it.
- Main trade-off: better coverage of paraphrases, but threshold tuning, false positives, drift as attacks change, and weights you host and update yourself.
What to check: measure missed attacks and false positives at the threshold you intend to run, not at a default value.
Llama Guard is a separate safety classifier model that reviews a conversation and returns a verdict against a set of policy categories. It is not a dedicated prompt injection detector by design, so before using it you must confirm whether its categories cover the injection and jailbreak cases in your attack set for the version you deploy. It runs as its own call, either on the input before the application model or on the output after it, and is usually invoked from a NeMo rail or a custom action.
- What it detects: policy-category violations in the conversation, which may or may not include the injection patterns you care about. Test this directly.
- Where it runs: as a separate model call, typically before the application model, and optionally on outputs.
- What it needs: access to the model under its license terms (confirm these with the model publisher), a serving endpoint with GPU capacity sized to your traffic, and a custom action or rail that maps its verdict to your block decision.
- Operating cost: a second model to host, patch and monitor, plus added latency on every request that it checks.
- Main trade-off: broader policy coverage and a vendor-maintained model family, against extra infrastructure and a verdict mapping you have to design and test.
What to check: whether its verdicts on your own injection set match the decisions you need, and what the extra call adds to response times in your environment.
How a prompt passes through input rails during the parallel run
The parallel run starts when a user prompt reaches the application, which forwards a copy to both the existing LLM Guard Prompt Injection scanner and the candidate input rail. Each verdict goes to a decision logger that records the two results side by side, while only the live path decides whether the prompt reaches the model. Check that every prompt in your attack and benign sets produces both verdicts, and that the logger captures disagreements, since those drive the review.
Both input checks run on the same prompt, and only the live verdict controls the model call.
How the prompt injection scanner moves to a replacement in five phases
The sequence turns an archived LLM Guard Prompt Injection scanner into a tested replacement that is switched on in stages and then removed, with evidence at each gate. Each phase produces a record that the next phase depends on.
Inventory every prompt injection call site
List each place the application imports or calls the LLM Guard Prompt Injection scanner, whether through the Python library or the API server, and record the threshold, the model version and whether the scanner blocks requests or only logs them. The owning engineering team does this with the platform team, and it is done when every call site has a row in a shared map that names the traffic it sees. Log-only scanners should be flagged because they show what the scanner would have blocked without affecting users.
Build a labeled attack and benign set
Assemble prompts from the team's own traffic, logs and known abuse cases, and label each one as an injection attempt or a benign request. Include direct injections, indirect injections carried in retrieved documents and tool outputs, and jailbreak phrasing, along with ordinary requests that resemble them. Security and product owners both review the labels, and the set is done when it has been versioned and reviewed for sensitive content, since it will be stored and reused.
Test candidate scanners against both
Run the same labeled set through LLM Guard's Prompt Injection scanner and each candidate, such as NeMo Guardrails jailbreak and injection detection, a classifier rail or a Llama Guard based check. Record missed attacks, false positives and latency per candidate, and confirm each model's license and maintenance status before it is accepted. The phase closes when a candidate blocks at least the attacks LLM Guard blocked on your set, and the results are written down for approval.
Convert and review the rail configuration
If the replacement uses NeMo Guardrails, port the rail configuration into config.yml, Python actions and Colang files. Colang 1.0 is the default, and Colang 2.0 is also supported, so confirm which version the project uses before converting. NVIDIA documents a Colang 1.0 to 2.x conversion with the nemoguardrails convert tool and states that converted configurations still need manual review, so an engineer must check every converted flow against the labeled set before it moves on.
Run a shadow comparison in parallel
Send live traffic to both LLM Guard and the replacement, with only LLM Guard enforcing decisions. Log each pair of verdicts, review every disagreement and adjust thresholds or rails where the replacement is wrong. The phase is complete when disagreements are explained and the replacement's misses on live traffic are no worse than LLM Guard's, as measured on the labeled set. Confirm the logging does not store raw prompts beyond what your data policy allows.
Cut over in stages
Move enforcement to the replacement for one call site or a small share of traffic, watch block rates, false positives and latency, and widen the scope only when those hold. Keep LLM Guard available as a fallback until the replacement has run on all call sites. The step is finished when every call site enforces with the replacement and the rollback path has been exercised, with the cutover record signed off by the owning team.
Decommission the scanner and its model
Remove the LLM Guard Prompt Injection scanner from the application, pin or delete the dependency and retire the deployed API server if nothing else uses it. Remove the protectai/deberta-v3-base-prompt-injection-v2 model from caches, images and model storage, and record that the replacement is the only enforced control. Done means no call site, dependency or stored model file references LLM Guard, and the labeled set is kept for future regression testing.
Measuring the replacement against LLM Guard on your own attack set
Before any replacement takes over prompt injection blocking, measure it against the same traffic LLM Guard saw. The four items below form one test: an attack set, the misses it produces, the false positives on normal users, and the latency cost, all tied to a rule that decides cutover.
Build the attack set
Assemble prompts from the OWASP LLM01 Prompt Injection category, from the MITRE ATLAS techniques LLM Prompt Injection: Indirect (AML.T0051.001) and LLM Jailbreak (AML.T0054), and from your own incidents and red team findings. Tag each prompt with its source and technique so results can be read by category. Include direct and indirect injection, since the LLM Guard scanner was designed for user input and retrieved content may need its own cases. Ask your security team which of your past incidents involved injected instructions.
OWASP LLM Top 10 2026Record every missed attack
Run the same attack set through LLM Guard and each candidate, then log each prompt that passes unblocked. Keep the LLM Guard result as the baseline, not your own expectation of what it should catch. Group misses by technique so you can see whether a gap is a single weak category or a broad one. Store each miss with the scanner threshold used, so a later re-tune can be checked against it.
LLM Guard repositoryMeasure false positives on benign traffic
A replacement that blocks every attack by also blocking ordinary requests will fail in production. Build a benign set from real, anonymized traffic that resembles your users, including long pasted documents, code, and messages that discuss instructions or security topics. Count how many benign prompts each scanner blocks and review a sample of them by hand. Report false positives per category so product teams know which user workflows a stricter setting would affect.
Compare latency under real load
Time each candidate on the same prompts, measured at the point where your application calls it, not only inside a notebook. Model-based detectors add inference cost that depends on the hardware, batch size and input length, so test with the longest prompts you expect. Record p50 and p95 latency alongside LLM Guard. Confirm the hardware and runtime the candidate needs in your environment, since the models behind LLM Guard's Prompt Injection scanner are no longer maintained and may need to be re-hosted.
Set the cutover acceptance rule
Write the rule before the results come in: the replacement must block at least every attack that LLM Guard blocked in the same set, and any new false positive rate must be approved by the product owner. Define what happens when a candidate misses one previously blocked attack, such as keeping LLM Guard in place for that category or adding a second check. Record the approval, the test date and the versions tested, so the decision can be audited later.
What drives the cost and duration of the replacement
This table lists the components that set the cost and duration of replacing the LLM Guard Prompt Injection scanner, who is paid for each, and whether it is one-time or recurring. Read it as a checklist for scoping and for comparing quotes, since no figures are given here and each driver depends on your own environment.
| Driver | Why it changes cost or effort | One-time or recurring, and what to ask for |
|---|---|---|
| Number of call sites | Each place the LLM Guard library or API is called needs a rail or client change and its own test pass. Confirm the count in the scanner inventory first. | One-time. Ask the quote to list each call site and the change planned for it. |
| Input versus output paths | The Prompt Injection scanner is an input scanner, so the work centers on input rails. Output paths only change if you rely on other scanners that also need replacing. | One-time. Ask whether the quote covers input paths only or includes any output coverage. |
| Indirect injection through RAG and tools | Injected instructions in retrieved documents, web pages and tool results need retrieval or execution rails and separate test cases, which adds build and test effort. | One-time, with ongoing test cases. Ask which data sources and tools are in scope. |
| Size and labeling quality of the attack set | A small or unlabeled set of attacks and benign prompts takes longer to build and gives weaker evidence. Labeling is usually the slowest step. | One-time. Ask who writes, labels and owns the attack and benign sets after handover. |
| Model hosting on GPU or CPU | Classifier rails and Llama Guard style models need compute. GPU capacity, CPU latency tests and model storage change hosting cost and load testing effort. | Recurring infrastructure cost paid to your cloud or data center provider. Ask for the hardware assumed in the quote and the latency target used. |
| Colang migration | Moving Colang 1.0 configurations to Colang 2.x requires manual review after automated conversion, so effort depends on how many flows you have. | One-time. Ask the quote to state the Colang version chosen and the number of flows reviewed. |
| Threshold tuning and false positive review | Classifier scores need tuning on your own traffic, and each change may require another comparison against the attack set. | One-time for initial tuning, then recurring when traffic changes. Ask how many tuning rounds are included. |
| Retest cycle | Model updates, rail changes and new attack techniques require reruns of the full attack and benign sets before each release. | Recurring. Ask what the retest covers, how often it runs and whether a retainer is offered. |
| Cutover and parallel running | Running the old and new scanners side by side, comparing decisions and moving clients in stages adds operations work for a period. | One-time, with monitoring after cutover. Ask how long parallel running is planned and who watches the results. |
Questions teams ask before replacing the LLM Guard prompt injection scanner
What does it cost to replace the LLM Guard prompt injection scanner?
The cost depends on how many applications call the scanner, how much of your traffic you must test against, and how much of the replacement you build yourself. Cost components are the engineering time to choose and wire a detector, the work to build and run your own attack and benign test sets, the hosting for any classifier model, and the review that proves the result. Some of these costs are one-time, such as the test set and cutover, while model hosting and maintenance recur. The LLM Guard Prompt Injection scanner runs the ProtectAI/deberta-v3-base-prompt-injection-v2 model, and Protect AI models on Hugging Face are no longer maintained, so budget for ownership of whichever model you keep. Ask any quote to itemize scope, deliverables and the retest, since DeployOpen works from a written scope agreed before work starts.
How long does a prompt injection scanner replacement take?
Duration is set by the number of call sites, the size of your attack and benign sets, and whether you run the old and new detectors side by side before cutover. No supplied source gives a timeline for this work, so ask for a duration in the written scope rather than relying on a generic estimate. Plan the stages separately: inventory the places the scanner is called and the thresholds it uses, build the test sets, measure each candidate, tune the threshold on real traffic, then cut over in steps. Measurement often takes longer than the code change because it needs representative attacks that you have collected or licensed yourself.
What must our team provide before a replacement starts?
You need four inputs before any detector is chosen. First, a list of every application, endpoint and library call that uses the scanner, with the threshold and action each one applies. Second, traffic samples that reflect real prompts, with sensitive content removed under your data handling rules. Third, an attack set of known prompt injection and jailbreak cases from your threat model, and a benign set of normal prompts that must not be blocked. Fourth, a place to host any classifier model, whether that is your own GPU capacity or an approved private environment. Confirm with your security team which of these samples you are allowed to store and share with a partner.
Can our own engineers replace the scanner without a partner?
Yes, if your team has Python engineers, someone who can run models, and a person who owns the attack and benign test sets. The NeMo Guardrails library is Apache 2.0 licensed and supports Python 3.10 through 3.13, so the tooling itself is accessible. The harder parts are usually the evaluation work and the operational duties after cutover, such as tracking model updates and reviewing blocked traffic. Teams that build in-house often underestimate how long it takes to produce a defensible attack set. A partner can take on the scope, testing or evidence work while your team keeps ownership of the decisions.
Does NeMo Guardrails replace the LLM Guard prompt injection scanner one for one?
No. NeMo Guardrails is a different framework with its own configuration model, so it does not drop in as a like-for-like scanner. It provides input rails, output rails and other rail types, and its library includes jailbreak and injection detection along with other moderation features. Before you rely on it, confirm which detector NeMo uses for injection, which models it needs and whether those models are maintained. You will also need to map the LLM Guard threshold and action settings onto NeMo rail behavior, then re-test, because the outputs may differ on the same input. The NeMo Guardrails configuration uses a config.yml file with optional Python actions and Colang files, and Colang 1.0 is the default, so plan for that format from the start.
Does a passing attack test mean our application is secure?
No. A passing test shows that your detector blocked the cases in your attack set at the threshold you chose, and that it did not block the benign set you supplied. It does not show that the application is secure against prompt injection in general. OWASP lists LLM01 Prompt Injection as its top risk for LLM applications in the 2026 edition, and MITRE ATLAS tracks indirect prompt injection and jailbreak techniques that a fixed set may never cover. Detection is one control among several, alongside tool permissions, data access limits and output handling. Use the test to show that the replacement blocks at least what LLM Guard blocked on your traffic, and treat the rest of the attack surface as a separate review.
Which evidence should we keep for a compliance or security review?
Keep a record of the scanner inventory, the chosen detector and version, the threshold settings, the attack and benign test sets with their sources, the results before and after cutover, and the decision to accept any remaining misses. Reviewers of AI systems often ask how risk was identified and managed, and the NIST AI Risk Management Framework's Generative AI Profile, published as NIST AI 600-1 on 26 July 2024, is one reference for that structure. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports or certifications. Independent auditors and certification bodies make those determinations, so confirm with your assessor which evidence format they expect.
What usually goes wrong when prompt injection detection is replaced
Replacing LLM Guard's Prompt Injection scanner usually fails in predictable places: the test set, the thresholds, the content the model reads, and the cutover itself. Each card names one risk and the check that prevents it before traffic moves.
Small or biased attack set
A test set built from a handful of well-known jailbreak strings can make any replacement look accurate. Missed attacks stay hidden because the set never contains the phrasing, language, encoding or multi-turn pattern your users or attackers actually use. Build the set from your own application's prompts, logs from red teaming, and categories from OWASP LLM01 Prompt Injection, then count misses per category, not just an overall score.
OWASP LLM Top 10Thresholds copied without retuning
LLM Guard's Prompt Injection scanner uses a model-specific score cutoff, and a different detector returns scores on a different scale. Copying a threshold value across tools shifts both false positives and misses. Run the candidate detector over your benign and attack sets, plot the score distribution, and choose a cutoff from your own false positive tolerance. Record the chosen value and the reason in the change record.
Indirect injection left untested
Prompt injection often arrives inside retrieved documents, web pages, emails or tool output, not in the user's message. A scanner that only inspects user input misses these entirely. Add indirect cases to the attack set, such as instructions hidden in a knowledge base chunk, and test the retrieval path separately. For NeMo Guardrails, this means checking retrieval rails for RAG chunks and execution rails for tool results, not only the input rail.
NeMo Guardrails docsCutover without a parallel run
Switching all traffic from LLM Guard to a new detector in one step removes the evidence you need if the new one blocks too little or too much. Run both scanners on live or replayed traffic, log each decision with its score, and compare disagreements before any block action is enforced. Keep the LLM Guard decision as the enforced result until the disagreement review is signed off, and keep a rollback switch that returns the old path.
Official sources for the replacement options
Start with the LLM Guard Prompt Injection scanner documentation before you choose a replacement, because it defines the behavior you must match. The scanner uses the ProtectAI/deberta-v3-base-prompt-injection-v2 model, a fine-tuned version of microsoft/deberta-v3-base, so the first check is which model and threshold your current deployment loads. Read the LLM Guard Prompt Injection scanner docs and record the exact settings in your inventory, then confirm with your team that no other scanner in your pipeline depends on the same model files.
Next, read the NeMo Guardrails repository and documentation to see what the replacement options actually ship with. The NeMo Guardrails repository lists the jailbreak and injection detection capabilities and the Apache 2.0 license terms, and the NeMo Guardrails documentation explains how input rails and the self-check models are configured. Confirm the detection method, model and license for each rail your team plans to use, because a rail that exists as a configuration option may still depend on a model you must host yourself.
For the threat context that your attack set should cover, use the OWASP Top 10 for LLM Applications 2026, where LLM01 Prompt Injection is the first entry. Map each attack category in your own test set to this list so you can show reviewers which risks the replacement addresses. Then consult the MITRE ATLAS data release v2026.09, which lists LLM Prompt Injection: Indirect (AML.T0051.001) and LLM Jailbreak (AML.T0054) as techniques, so you can label test cases by technique ID and document coverage gaps in the same vocabulary.
How DeployOpen scopes and delivers the prompt injection replacement
DeployOpen approaches the replacement of the LLM Guard Prompt Injection scanner as a fixed-scope piece of work: the current scanner behavior is inventoried, a candidate detector is chosen and tested against your own attack set, and the result is handed over with runbooks. Work is planned for infrastructure you control, and no new LLM Guard rollout is recommended because the project is archived.
How we scope
- Inventory where the LLM Guard Prompt Injection scanner runs, its threshold settings and whether it blocks or only logs traffic
- Agree which candidates are in scope, such as NeMo Guardrails jailbreak and injection detection or a classifier rail with Llama Guard
- Define the attack set, benign set and pass criteria that the replacement must meet before cutover
- Record the scope, deliverables and timeline in writing before any work starts, since engagements are fixed-scope
How we build
- Stand up the candidate detector in your environment, pinning the Python version and model artifacts you approve
- Run the same attack and benign sets against LLM Guard and each candidate, recording missed attacks and false positives
- Wire the chosen rail into your input path, with the decision logic and thresholds documented as configuration
- Test the replacement for prompt injection variants, including indirect injection in retrieved content
How we hand over
- Deliver the attack set, benign set and comparison results so your team can rerun them after model or config changes
- Document the detector configuration, model sources and licenses, and the known gaps that remain after testing
- Provide operational runbooks covering logging, threshold changes, model updates and rollback to the previous path
- Walk your security and platform engineers through the evidence so they can review it independently
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after handover
- Retesting can be scheduled when NeMo Guardrails, Llama Guard or your attack set changes
- Confirm with your team which maintenance window, owner and escalation path will cover the detector after handover
- Ask for the support scope in the written quote so response expectations are stated before work begins

