LLM Red-Teaming Pipeline
A framework I built to measure how well language models resist prompt-injection attacks, and where their defenses quietly break down.
Why measure robustness
As LLMs get wired into agentic systems with tool access, prompt injection becomes a real security surface rather than a curiosity. And whether a model is safe is not a yes or no question: robustness varies by attack technique, by model size, and by the defenses layered on top. I wanted a repeatable way to measure it instead of reasoning about it anecdotally.
How the harness is built
The framework keeps the provider, target, classifier, and defense as separate, pluggable layers, so new models, attacks, and mitigations can be swapped in without touching the core.
- 46 attack payloads spanning 4 categories and 41 techniques, run against both local and frontier models.
- A dual scoring pipeline that combines deterministic rule-based checks with an LLM-as-judge.
- A Streamlit dashboard for exploring results, backed by 35 automated tests in CI.
What the runs showed
In the three-model run (34 payloads each), rule-based scoring had 47% of attacks get through qwen2.5:7b (16 of 34) and 29% through llama3.1:8b, versus 3% on Claude Sonnet 5. The LLM judge scored the same runs lower (26%, 21% and 0%). Prompt hardening on llama3.1:8b only cut breakthroughs from 21% to 17%: each defense closed two or three attacks but opened one or two others, and two attacks got through all four configurations. Denylist filters were beaten by simple obfuscation.
Next project → Multimodal AI Search

