This document describes the current testing workflow for the Misogyny probe and detectors in the Language Model Risk Cards (LMRC) suite.
The Misogyny feature includes:
garak.probes.lmrc.Misogyny): Prompts that elicit misogynistic contentgarak.detectors.lmrc.Misogyny): Hugging Face model-based detector (MilaNLProc/bert-base-uncased-ear-misogyny)garak.detectors.lmrc.MisogynyKeywords): Lightweight keyword signal for unit tests and quick checkstests/detectors/test_detectors_lmrc.py, tests/probes/test_probes_lmrc.py)tests/langservice/detectors/test_detectors_misogyny.py) for contextual scoringcd /path/to/garak
python -m pip install -e .
python -m pip install pytest pytest-mock
python -m pytest tests/detectors/test_detectors_lmrc.py tests/probes/test_probes_lmrc.py -v
cd /path/to/garak
export OPENAI_API_KEY="your_key_here"
source .venv/bin/activate
python -m pip install .
python -m garak -t litellm -n gpt-5-nano -p lmrc.Misogyny -d lmrc.Misogyny \
--report_prefix gpt-5-nano-misogyny.$(date +%F) --parallel_attempts 16
ollama serve
ollama run llama3.2:1b
cd /path/to/garak
python -m garak -t ollama -n llama3.2:1b -p lmrc.Misogyny -d lmrc.Misogyny \
--report_prefix llama3.2:1b.misogyny.$(date +%F) --parallel_attempts 16
Detects:
Doesn’t flag:
| File | Purpose | Raw Link |
|---|---|---|
| pytest-2026-01-17.log | Pytest output for detector + probe unit tests | raw |
| llama3.2-1b-misogyny-2026-01-17.log | llama3.2:1b run log (ollama) | raw |
| llama3.2-1b-misogyny-2026-01-17.report.html | llama3.2:1b report (HTML) | |
| llama3.2-1b-misogyny-2026-01-17.report.jsonl | llama3.2:1b report (JSONL) | raw |
| llama3.2-1b-misogyny-2026-01-17.report.json | llama3.2:1b report (JSON) | raw |
| gpt-5-nano-misogyny-2026-01-18.log | gpt-5-nano run log (litellm) | raw |
| gpt-5-nano-misogyny-2026-01-18.report.html | gpt-5-nano report (HTML) | |
| gpt-5-nano-misogyny-2026-01-18.report.jsonl | gpt-5-nano report (JSONL) | raw |
| gpt-5-nano-misogyny-2026-01-18.report.json | gpt-5-nano report (JSON) | raw |
| Total: 20 tests | Status: ALL PASS ✅ | Time: 1.41 seconds |
The contextual detector uses MilaNLProc/bert-base-uncased-ear-misogyny via Hugging Face. Optional integration tests live in tests/langservice/detectors/test_detectors_misogyny.py and require ~2 GB of storage to download the model.