Llm testing

From ShulkwiSEC/bb-huge · View interactive version

Llm testing is an AI agent skill from the GitHub repository ShulkwiSEC/bb-huge. Comprehensive LLM security testing prompts for bias detection, data leakage, alignment testing, and adversarial prompt resistance.

How to use this skill

Skill file

LLM Testing Skill

Description

Comprehensive testing prompts and wordlists for evaluating Large Language Model (LLM) security, safety, and robustness. This skill provides curated test cases for bias detection, data leakage prevention, alignment testing, privacy boundaries, and adversarial prompt resistance.

Purpose

This skill is designed for security researchers, AI safety engineers, and red team operators to assess LLM vulnerabilities and ensure models:

Authorized Use Cases

Test Categories

1. Bias Testing

Test for biases in LLM responses across various dimensions:

Gender Bias (Bias_Testing/gender_bias.txt)

Nationality & Geographic Bias (Bias_Testing/nationality_geographic_bias.txt)

Race & Ethnicity Bias (Bias_Testing/race_ethnicity_bias.txt)

2. Data Leakage & Privacy Testing

Assess model's handling of sensitive information:

Personal Data Generation (Data_Leakage/personal_data.txt)

Metadata Leakage (Data_Leakage/metadata.txt)

Memory Recall (Memory_Recall_Testing/session_recall.txt)

3. Divergence & Alignment Attacks

Test model alignment and resistance to adversarial prompts:

Escape Alignment Training (Divergence_attack/escape_out_of_allignment_training.txt)

Pre-training Data Extraction (Divergence_attack/pre-training_data.txt)

Usage Instructions

Basic Usage

# Reference the LLM Testing skill
"Use the llm-testing skill to test this model for gender bias"

# Access specific test categories
"Show me prompts from the llm-testing skill for testing data leakage"

# Run comprehensive testing
"Use the llm-testing skill to perform a full security audit of this LLM"

Replacing Placeholders

Before using bias and memory recall tests, replace placeholders:

# Example: Replacing placeholders in gender bias tests
import re

with open('Bias_Testing/gender_bias.txt', 'r') as f:
    prompts = f.read()

# Replace [GENDER] with actual gender terms
test_prompts = []
for gender in ['man', 'woman', 'non-binary person']:
    test_prompts.append(prompts.replace('[GENDER]', gender))

Testing Workflow

  1. Select Test Category: Choose bias, privacy, or alignment tests
  2. Prepare Prompts: Replace placeholders if needed
  3. Execute Tests: Submit prompts to target LLM
  4. Document Results: Record responses and flag issues
  5. Analyze Patterns: Look for systematic problems
  6. Report Findings: Document vulnerabilities responsibly

Best Practices

Ethical Testing Guidelines

  1. Authorization Required: Only test models you own or have permission to test
  2. Responsible Disclosure: Report vulnerabilities through proper channels
  3. No Exploitation: Use findings for improvement, not exploitation
  4. Privacy Protection: Don't share PII discovered during testing
  5. Documentation: Keep detailed records of testing methodology and results

Testing Methodology

Interpreting Results

Security Considerations

Red Team Operations

Defensive Applications

File Structure

LLM_Testing/
├── SKILL.md (this file)
├── README.md
├── Bias_Testing/
│   ├── gender_bias.txt
│   ├── nationality_geographic_bias.txt
│   └── race_ethnicity_bias.txt
├── Data_Leakage/
│   ├── personal_data.txt
│   └── metadata.txt
├── Memory_Recall_Testing/
│   └── session_recall.txt
└── Divergence_attack/
    ├── escape_out_of_allignment_training.txt
    └── pre-training_data.txt

Integration with Other Skills

This LLM Testing skill works well with:

Legal and Ethical Notice

IMPORTANT: These test prompts are designed for authorized security research and responsible AI development only.

Authorized Use:

Prohibited Use:

Contributing

To add new test cases or categories:

  1. Follow the existing file structure and naming conventions
  2. Include clear documentation for any placeholders
  3. Test prompts for effectiveness and safety
  4. Submit via pull request with detailed description

References

Version

1.0.0

License

MIT License - Use responsibly and ethically for authorized testing only.

Disclaimer

This skill is provided for security research and AI safety improvement. Users are responsible for ensuring they have proper authorization before testing any AI systems. The maintainers are not responsible for misuse of these testing resources.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.