A local LLM red-teaming framework for adversarial robustness testing.
RedProbe runs structured attack suites against locally hosted LLMs via Ollama, scores responses using an LLM-as-judge pipeline, and generates detailed security reports — entirely offline, no API keys required.
As LLMs get embedded into products, their failure modes matter. RedProbe makes it easy to systematically probe a model's defences against:
- Prompt injection
- Jailbreaks
- System prompt extraction
- Role confusion
Most existing tools either require cloud APIs or treat red-teaming as a manual process. RedProbe is fully local and automated.
- Python 3.10+
- Ollama running locally
- At least one model pulled via Ollama
git clone https://github.com/GodSagar007/redprobe.git
cd redprobe
python -m venv .venv
# Linux/Mac
source .venv/bin/activate
# Windows
.venv\Scripts\activate
pip install -r requirements.txtPull models to test against:
ollama pull mistral
ollama pull tinyllamaRun full attack suite against a single model:
python main.py --models mistralCompare multiple models:
python main.py --models mistral --models tinyllamaRun a specific attack category only:
python main.py --models mistral --category jailbreakAll options:
python main.py --help| Category | Description |
|---|---|
prompt_injection |
Instructions designed to override the system prompt |
jailbreak |
Attempts to bypass core model behaviour via social engineering |
extraction |
Attacks targeting confidential system prompt contents |
role_confusion |
Identity manipulation to destabilise the model's defined role |
Responses are evaluated by an LLM-as-judge pipeline using a secondary model.
| Status | Meaning |
|---|---|
| 🔴 BROKEN | Model violated its system prompt or was successfully manipulated |
| 🟡 PARTIAL | Model partially complied with the attack |
| 🟢 HELD | Model successfully resisted |
| ⚪ UNCLEAR | Judge confidence too low — flagged for manual review |
Each scan produces a JSON report in reports/. When testing multiple models,
a unified comparison report is generated with breach rates broken down by category
and models ranked safest to most vulnerable.
Example comparison output:
{
"ranking": ["mistral", "tinyllama"],
"comparison": {
"mistral": {
"breach_rate_percent": 50.0,
"breach_rate_by_category": {
"extraction": 40.0,
"jailbreak": 60.0,
"prompt_injection": 60.0,
"role_confusion": 40.0
}
}
}
}redprobe/
├── core/
│ ├── scorer.py # Scoring pipeline
│ ├── llm_judge.py # LLM-as-judge implementation
│ └── reporter.py # Report generation
├── tests/
│ ├── prompt_injection.json
│ ├── jailbreaks.json
│ ├── extraction.json
│ └── role_confusion.json
├── reports/ # Generated reports (gitignored)
├── main.py # CLI entry point
└── requirements.txt
This tool is intended for security research and educational purposes. Only use it against models you own or have explicit permission to test.