Skip to content
Back to skills

Llm Safety Eval

ASecurity

Evaluates LLM safety and robustness against adversarial attacks by measuring overall safety scores, attack success rates, and toxicity levels. It also assesses whether safety alignment preserves general capabilities across standard reasoning, instruction-following, and knowledge benchmarks. Use when the user wants to benchmark on ALERT, LLM Leaderboard, or asks about evaluating this task. Reports Safety Score S.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 11, 2026
researchpythonperformance

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill llm-safety-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Llm Safety Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Llm Safety Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-llm-safety-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-llm-safety-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: llm-safety-eval
description: Evaluates LLM safety and robustness against adversarial attacks by measuring overall safety scores, attack success rates, and toxicity levels. It also assesses whether safety alignment preserves general capabilities across standard reasoning, instruction-following, and knowledge benchmarks. Use when the user wants to benchmark on ALERT, LLM Leaderboard, or asks about evaluating this task. Reports Safety Score S.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2409.07772
  bibtex_key: [REDACTED]
  confidence: high
---

# llm-safety-eval

> Alignment with Preference Optimization Is All You Need for LLM Safety — Alami et al. (2024) (arXiv:2409.07772, 2024)

## What this evaluates

Evaluates LLM safety and robustness against adversarial attacks by measuring overall safety scores, attack success rates, and toxicity levels. It also assesses whether safety alignment preserves general capabilities across standard reasoning, instruction-following, and knowledge benchmarks.

## Datasets

- **ALERT** — total ?; splits: test (-1)
- **LLM Leaderboard** — total ?; splits: test (-1)

## Metrics

- `Safety Score S` **(primary)** — range: percent
  - Quantified using the ALERT benchmarking tool; higher scores indicate greater safety and resilience against safety risks.
- `ASR` — range: percent
  - Percentage of successful adversarial attacks; lower percentages indicate higher robustness.
- `avg_tox` — range: [0, 1]
  - Average toxicity score across model responses under benign and adversarial prompting; lower values indicate less toxic output.
- `E[max_tox]` — range: [0, 1]
  - Expected maximum toxicity score per prompt; lower values indicate better robustness against adversarial prompting.
- `LLM Leaderboard scores` — range: [0, 1]
  - Raw performance values on standard benchmarks including IFEval, BBH, GPQA, MATH, MuSR, and MMLU-PRO.

## Input / output format

**Input**: Text prompts (both benign and adversarial/system prompts) fed to the Falcon 11B model variants.

**Output**: Model-generated text responses, which are subsequently scored by the ALERT tool and toxicity metrics.

## Scoring recipe

```python
# Safety Score S
safety_score = ALERT.compute_safety_score(model_responses)

# Attack Success Rate (ASR)
asr = (count_successful_attacks / total_adversarial_prompts) * 100

# Toxicity Metrics
avg_tox = mean(toxicity_scores_for_all_responses)
e_max_tox = mean(max(toxicity_scores_per_prompt))
```

## Common pitfalls

- Confusing the baseline 'Instruct' model with the aligned variants; the baseline scores lower on safety but often matches or beats aligned models on general benchmarks.
- Interpreting ASR and toxicity scores as absolute values without considering the prompting condition (benign vs. adversarial), as robustness is specifically measured under adversarial prompting.
- Assuming higher safety scores guarantee preserved general capabilities; the paper notes a trade-off where safety alignment often degrades math and reasoning performance.

## Evidence (verbatim from paper)

> Table [4] presents the ASR across different alignment techniques on the Falcon 11B model, against a set of adversarial attacks. Performance is evaluated by the percentage of successful attacks, with lower percentages indicating high robustness.

## Citation

```bibtex
@misc{alami2024alignment,
  title={Alignment with Preference Optimization Is All You Need for LLM Safety},
  author={Alami et al. (2024)},
  year={2024},
  note={arXiv:2409.07772}
}
```

- arXiv: 2409.07772

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.