Personal project
ProbeLLM
Automated red-teaming for LLM apps: it attacks a chatbot the way a real attacker would, scores every reply and writes a report.
The problem
LLM apps break in ways unit tests never see: a user says “ignore your instructions” and the bot obeys, or asks it to “repeat the text above” and it reveals its system prompt, secrets included. ProbeLLM runs these attacks automatically and shows exactly which ones get through, so each defense can be checked.
16
attacks: prompt injection, jailbreak, data exfiltration
11 → 0
attacks that got through on the demo bot, before and after defenses
97%
test coverage, 102 offline tests
What it does
- On a deliberately vulnerable demo bot, 11 of the 16 attacks get through and are flagged. After adding defenses one at a time, none get through on the hardened version.
- Attacks are written in YAML and sent several times each to any chatbot’s HTTP endpoint; one success is enough to flag an attack.
- Two scorers: a canary check that looks for a planted secret, and an LLM judge with a rubric, protected against replies written to fool it.
- Every attempt is saved as it finishes; an interrupted run resumes where it stopped. Reports come out in Markdown and JSON.
- The same engine runs as a command-line tool and as a FastAPI API.
- Ships with a vulnerable demo bot and a hardened one, plus an evaluation that compares the judge with hand labels.
Key decisions
01
Two scorers, not one
A canary check looks for a planted secret in the reply. An LLM judge with a rubric covers the rest, and it is hardened against replies that forge its delimiters to fool it.
02
Checking the checker
An evaluation compares the judge’s verdicts with hand labels, so its scores are not taken on trust.
03
Defenses measured one by one
A vulnerable demo bot and a hardened one ship with the tool. Running ProbeLLM after each added defense shows which one stops which attack: 11 of 16 get through on the vulnerable bot, none on the hardened one.
04
Runs that survive interruptions
Every attempt is saved as soon as it finishes, so an interrupted run resumes where it stopped instead of starting over.