Insight IT Solutions PrismGuard - Prompt-injection firewall for prod LLM apps
by•
PrismGuard is an open-source firewall for LLM apps. Block prompt injection before it hits your model — every allow/block returns resolution_gate (which rule decided), not a probability score your team argues about in Slack.
Rules-first: pip install prismguard. Optional local ONNX. Apache-2.0. Cold holdout: 14/14 vs LLM Guard 9/14.
Wire at agent entry, RAG chunks, or sidecar. v0.1.6 on PyPI — alpha, feedback welcome.

Replies
Love that the benchmark numbers are spelled out right in the description instead of buried in a marketing page—makes it easy to trust the claim about fewer LLM calls.
@tahaawrj @taha Thanks — we put the holdout numbers in the open because “trust us” doesn’t survive an incident review. If you run the harness on your stack, would love to hear where it disagrees with your current guard.
How does the semantic cache actually decide when to reuse a previous response versus triggering a fresh LLM call?
@melis4234740829 How we learn from your app (all opt-in — nothing phones home):
Wire check() at agent entry / RAG / sidecar
Set PRISMGUARD_FEEDBACK_PERSIST=1 — near-misses + blocks land in a local review queue
You approve labels (human gate — stops corpus poisoning)
prismguard feedback export -o customer.jsonl
prismguard-model train --feedback-jsonl customer.jsonl → your own ONNX artifact
Point PRISMGUARD_GUARD_MODEL_PATH / PRISMGUARD_ARTIFACT_ID at it
What you can consume today:
Audit trail — every decision: blocked + resolution_gate (which rule/layer fired)
Training JSONL — reviewed labels from your traffic
Custom ONNX — domain-tuned guard model you own and run locally
Calibration rows — near-miss allows for threshold tuning (export opt-in)
Default path stays rules-first. Learning is offline + reviewed — not silent auto-adapt on live traffic.
@melis4234740829 @melis4234740829 — quick correction on your cache question (my earlier reply was about the optional train loop, not cache reuse):
PrismGuard’s cache stores prior judge verdicts (allow/block), not your app’s LLM completions.
On each check:
1. Exact hit — normalized prompt hash matches → reuse verdict, no new judge call
2. Semantic hit — embedding cosine ≥ 0.97 (default) to a prior judged prompt → reuse verdict
3. Miss — run rules / ONNX / optional judge, then cache that verdict
Cache keys are prompt text only today — not agent session context. So it’s near-duplicate prompt similarity, not “learning from agent context” for reuse.
Happy to go deeper on thresholds or where you’d wire this (entry vs RAG).
The semantic cache is a nice touch, cuts down on repeat LLM calls without me having to wire it up myself. Pip install was painless and I was running a benchmark against my existing setup in under ten minutes.
@esranldf Thanks — that’s exactly the install path we wanted: pip install → running against your own setup in minutes.
Quick note on the cache: it skips repeat judge calls on exact/near-duplicate prompts (cosine ≥ 0.97), not your app’s generation calls. Glad it helped on the benchmark side.
If anything looked off vs your existing guard (false positives, latency, miss patterns), drop the details — that’s the feedback that moves v0.1.x.
Curious how the semantic cache decides when to reuse prior responses versus triggering a fresh LLM call, does it learn from agent context or just exact prompt similarity?
@sedatbykme390x Great question — and a useful clarification: PrismGuard’s semantic cache is for judge verdicts (allow/block), not for replaying your app’s LLM answers.
Decision order:
Exact — normalized prompt hash hit → reuse prior verdict
Semantic — embed the normalized prompt; reuse if cosine ≥ 0.97 (default) to a prior judged prompt
Otherwise → fresh judge call, then store that verdict
It does not learn from agent/session context for reuse. Cache keys are prompt text only (exact + near-duplicate similarity). Optional context is passed into the judge on a miss, but it is not part of the cache key today.
So: near-identical prompt similarity, not agent-context learning.