LLM Safety, Red-Teaming & Capability Evaluation Framework
Evaluate, benchmark, and compare Large Language Models across safety and capability dimensions using automated red-team pipelines and interactive analytics dashboards.
ModelGuard is a comprehensive evaluation framework designed to benchmark Large Language Models (LLMs) on:
- 🔐 Safety robustness
- 🎯 Capability performance
⚠️ Jailbreak resistance- 📊 Hallucination analysis
- 🤖 LLM-as-a-Judge scoring
- 📈 Interactive evaluation dashboards
The framework combines:
- capability benchmarks
- adversarial attack datasets
- automated judging pipelines
- metric aggregation
- Streamlit-based visualization
to provide end-to-end LLM evaluation workflows.
Capability Benchmarks + Red-Team Attack Sets
↓
Target LLM(s)
↓
LLM-as-a-Judge Layer
↓
Safety Metrics | Capability Metrics
↓
Interactive Analytics Dashboard
- Multi-model evaluation support
- Automated red-team attack testing
- LLM-as-a-judge evaluation layer
- Capability benchmarking pipelines
- Safety metric computation
- Hallucination tracking
- Interactive Streamlit dashboard
- Model comparison analytics
- Config-driven architecture
- Mock evaluation support for testing
| Category | Benchmarks |
|---|---|
| Capability | TruthfulQA, GSM8K, MMLU, HellaSwag |
| Safety | HarmBench, AdvBench |
| Jailbreaks | DAN, Dev Mode, Base64 prompts |
- Capability benchmark datasets
- Adversarial attack datasets
- Jailbreak prompts/templates
Supports configurable evaluation across:
- GPT-4o
- Claude Sonnet
- Mistral-7B
- Llama-3
Automated scoring for:
- Harmfulness
- Truthfulness
- Refusal quality
| Safety Metrics | Capability Metrics |
|---|---|
| Attack Success Rate (ASR) | Accuracy |
| Refusal Rate | BLEU |
| False Positive Rate | BERTScore |
| Per-category ASR | Hallucination Rate |
| Module | Description |
|---|---|
| Observe | Live evaluation monitoring |
| Run Evaluation | Launch evaluation runs |
| Safety Analysis | ASR and jailbreak analytics |
| Capability Analysis | Benchmark performance tracking |
| Model Comparison | Multi-model score comparison |
ModelGuard/
├── config/
│ ├── models.yaml
│ ├── benchmarks.yaml
│ └── attack_sets.yaml
│
├── data/
│ ├── capability_benchmarks/
│ ├── attack_sets/
│ └── results/
│
├── safeeval/
│ ├── models/
│ ├── benchmarks/
│ ├── attacks/
│ ├── judge/
│ ├── metrics/
│ └── pipeline.py
│
├── dashboard/
│ ├── app.py
│ ├── charts/
│ └── data_loader.py
│
├── scripts/
│ └── run_eval.py
│
└── tests/
└── test_pipeline.py
git clone https://github.com/maynkxx/ModelGuard.git
cd ModelGuardpython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtexport OPENAI_API_KEY=your_key
export ANTHROPIC_API_KEY=your_keyDemo mode works without API keys.
streamlit run dashboard/app.pypython scripts/run_eval.py \
--models gpt-4o \
--models claude-sonnet \
--num-bench 20 \
--num-attack 20pytest tests/ -vAll tests use mock responses and mock judge scores.
- Additional red-team attack datasets
- Latency benchmarking support
- PDF evaluation report export
- Distributed benchmark execution
- Cost estimation dashboard
- Real-time evaluation monitoring
Contributions, feature requests, and improvements are welcome.
Feel free to fork the repository and submit pull requests.
This project is intended for research and educational purposes.
Mayank Choudhary
AI/ML • LLM Systems • RAG • AI Safety • Evaluation Frameworks