experiment: pluggable guardrails evaluation for Story 6 - #168
Merged
Conversation
ralphbean
approved these changes
Apr 3, 2026
ralphbean
left a comment
Member
There was a problem hiding this comment.
Much more promising results than Model Armor (and, simpler?)
Member
|
Also, the expanded attack corpus is helpful. Let's keep building that out. |
Member
Author
|
@ralphbean the llm-guard will pull down a model (400M) for evaluation, and run with it will take some time on Github Action VM but should be acceptable. |
waynesun09
force-pushed
the
experiment-guardrails-eval
branch
2 times, most recently
from
April 3, 2026 19:40
a5a3a12 to
d412e35
Compare
Evaluate LLM Guard, NeMo Guardrails, and Model Armor against 13 attack payloads (social engineering, unicode tricks, indirect injection) for Story 6 (#129). LLM Guard sentence mode achieves 83% detection with zero false positives vs Model Armor's 8%. Add AGENTS.md shim and pre-commit rule to CLAUDE.md. Signed-off-by: Wayne Sun <gsun@redhat.com>
waynesun09
force-pushed
the
experiment-guardrails-eval
branch
from
April 3, 2026 19:42
d412e35 to
2a80921
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Results
New Attack Payloads
Key Findings
Sentence-level splitting is critical. Both Model Armor and LLM Guard full mode suffer from signal dilution — social engineering text embedded in larger legitimate content scores below detection threshold. LLM Guard's
SENTENCEmatch type isolates each sentence for independent classification.Two fundamentally undetectable attack classes: Base64 encoding (classifier sees random alphanumeric) and multi-step delayed injection (each step individually benign). These require architectural mitigations — CODEOWNERS protection on config dirs, permission boundaries.
Model Armor adds no unique detection. Its only catch (obvious-injection) is already caught by LLM Guard. The signal dilution problem has no workaround in Model Armor's API.
Recommendation
Use LLM Guard with
match_type=SENTENCEas the default always-on local scanner infullsend scan. Cloud scanners remain configurable as optional parallel checks for defense-in-depth.Contributes to #129
Test plan
uv run python eval-llm-guard.py— verify original payload detection ratesuv run python eval-extended.py— verify extended payload detection ratesuv run python eval-model-armor.py— verify Model Armor results (requires GCP auth)