You cannot ship an LLM proxy without evals

Baseline versus protected profile, 17/17 PASS, and the limits of that number.

Marcos MartínMarcos Martín
Evaluation summary: 17 of 17 cases passed on the protected profile

A dashboard that “blocks jailbreaks” is a demo. A gateway you would put in front of production traffic needs a battery you can rerun: the same cases, with controls off and on, and a pass/fail that is not a screenshot of a chat.

That is what the Streamlit evaluation tab in the AI Security Gateway does. It replays a fixed suite against the running proxy — legitimate prompts (anti-false-positive), threat layers L2–L4, inbound and outbound DLP, and extraction-style cases — and writes a report: layer hit, HTTP status, latency, block reason.

What 17/17 actually means

On the protected profile the suite is 17/17 PASS. That is not “the model is aligned”. It is: for this catalog, the gateway did what the case specified (block, mask, or allow). The unprotected baseline is there to show that the victim model would otherwise answer. Without that contrast you cannot tell a control from a model that simply refused.

Case-by-case comparison without vs with controls
Per case: layer, status and latency with controls off versus on. Inbound blocks short-circuit the LLM call.

Latency is part of the security story

The expensive AI layers — LLM-as-judge (L3.5) and DistilBERT (L4) — run concurrently with asyncio.gather. Added latency is the slower of the two, not the sum. Heuristic blocks (length, regex) fail closed in milliseconds and never reach the provider. That shows up in the metrics view: overall latency mixes fast denials with full LLM round-trips, so you have to split by outcome.

Operational metrics: requests, latency, defense rate
Operational counters on live traffic through the gateway, separate from the batch evaluation report.

What the number does not prove

The catalog is finite and known to the author. Regex plus a classifier will not cover every jailbreak. There is no enterprise authentication in front of the MVP, and SQLite is not a SIEM. The unit tests (~175 pytest) protect regressions in parsing, DLP token round-trips and routing; they are not a red-team engagement.

The useful claim is smaller and, I think, more honest: if you put LLM security on the wire, you can measure it the same way you measure any other control — with a suite, a baseline, and a report you can export. That is the same habit as SSDLC scanners in CI, applied to prompts.

Architecture note: why the client only changes a Base URL. Repository: github.com/r4fik1/ai-security-gateway.