cd /news/ai-safety/why-i-don-t-use-an-llm-to-secure-my-… · home topics ai-safety article
[ARTICLE · art-81110] src=dev.to ↗ pub= topic=ai-safety verified=true sentiment=· neutral

Why I don't use an LLM to secure my LLM

A developer argues against using an LLM as a security judge for every request, calling it 'lazy architecture.' Instead, they propose a tiered detection system: regex, classical ML, a transformer, and finally an LLM only for ambiguous cases. The approach is designed to be cost-effective and air-gapped, with the demo available online.

read2 min views2 publishedJul 30, 2026

"So you're anti-LLM for security?"

No. I'm anti-lazy-architecture. Let me explain the distinction, because it's the core design decision behind the tool I'm building.

The common pattern for AI security right now is: for every request, call an LLM and ask "is this malicious?" It feels right because models understand nuance. But making a frontier model judge every single request is like making your staff engineer review every line of every commit by hand. Expensive, slow, and they burn out by lunch.

Concretely, an LLM-as-judge on the hot path gives you: Instead of one expensive judge, structure detection as tiers, cheapest first, and only climb when a case earns it:

Tier 1 — Regex. Known attack patterns die in under a millisecond.

Tier 2 — Classical ML. TF-IDF + logistic regression over tens of thousands of attack patterns. Deterministic, ~7ms, $0 per call. Most traffic never gets past here.

Tier 3 — Transformer (opt-in). A heavier model for when you want deeper analysis on a subset.

Tier 4 — Your LLM (bring your own). For the genuinely ambiguous cases, escalate to a model you choose, with your keys, under your budget cap. Cost-gated so it only fires when escalation is warranted.

The economics flip completely. Instead of paying LLM prices on 100% of requests, you pay them on the tiny fraction that actually needs a judgment call, and that judgment runs on a model you picked, in your own environment.

That's the whole idea. It's not anti-LLM. It's how you'd actually staff a security team: fast automated checks handle the volume, and the expensive expert only gets pulled in for the hard cases.

There's a bonus: because the always-on tiers are deterministic and local, the whole thing can run air-gapped in your own VPC with zero calls to any hosted model. Nothing needs to phone home, so nothing does.

I put this behind a demo where you can watch the fast tiers block attacks in real time, no signup:

The honest tradeoff: deterministic tiers are weaker on novel, subtle attacks than a big model would be, which is exactly why the escalation path exists. How does your stack decide when a request deserves the expensive check? Genuinely curious.

── more in #ai-safety 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/why-i-don-t-use-an-l…] indexed:0 read:2min 2026-07-30 ·