|
|
--- |
|
|
license: cc0-1.0 |
|
|
task_categories: |
|
|
- text-generation |
|
|
- question-answering |
|
|
language: |
|
|
- en |
|
|
size_categories: |
|
|
- 1K<n<10K |
|
|
tags: |
|
|
- cmmc |
|
|
- nist |
|
|
- cybersecurity |
|
|
- compliance |
|
|
- security-controls |
|
|
- SP-800-171 |
|
|
pretty_name: CMMC Training Dataset - Balanced Variant |
|
|
--- |
|
|
|
|
|
# CMMC Training Dataset - Balanced Variant |
|
|
|
|
|
## Dataset Description |
|
|
|
|
|
This is the **Balanced variant** of the CMMC (Cybersecurity Maturity Model Certification) training dataset, containing 2,790 high-quality training examples with **balanced coverage across all 17 CMMC domains**. |
|
|
|
|
|
### Dataset Characteristics |
|
|
|
|
|
- **Total Examples**: 2,790 (2,232 train / 558 validation) |
|
|
- **Source Documents**: 71 NIST publications |
|
|
- **CMMC Levels Covered**: Level 1, Level 2, Level 3 |
|
|
- **CMMC Domains**: All 17 domains (evenly distributed) |
|
|
- **Format**: JSONL with chat-formatted messages |
|
|
- **Embeddings**: 1536-dimensional vectors (OpenAI text-embedding-3-small) |
|
|
- **License**: Public Domain (NIST documents are US Government works) |
|
|
|
|
|
## What Makes This "Balanced"? |
|
|
|
|
|
The Balanced variant provides **equal representation across all 17 CMMC domains**, ensuring comprehensive coverage without bias toward any particular security area. |
|
|
|
|
|
### Domain Distribution (Perfectly Balanced) |
|
|
|
|
|
Each of the 17 CMMC domains has approximately **840 examples**: |
|
|
|
|
|
- **Access Control (AC)**: 840 examples |
|
|
- **Audit and Accountability (AU)**: 840 examples |
|
|
- **Awareness and Training (AT)**: 840 examples |
|
|
- **Configuration Management (CM)**: 823 examples |
|
|
- **Identification and Authentication (IA)**: 840 examples |
|
|
- **Incident Response (IR)**: 840 examples |
|
|
- **Maintenance (MA)**: 840 examples |
|
|
- **Media Protection (MP)**: 840 examples |
|
|
- **Personnel Security (PS)**: 840 examples |
|
|
- **Physical Protection (PE)**: 840 examples |
|
|
- **Planning (PL)**: 840 examples |
|
|
- **Risk Assessment (RA)**: 840 examples |
|
|
- **Security Assessment (CA)**: 840 examples |
|
|
- **Supply Chain Risk Management (SR)**: 825 examples |
|
|
- **System and Communications Protection (SC)**: 840 examples |
|
|
- **System and Information Integrity (SI)**: 840 examples |
|
|
- **System and Services Acquisition (SA)**: 840 examples |
|
|
|
|
|
**Note**: Domain counts represent the number of examples tagged with each domain. Since examples can be tagged with multiple domains, the sum of domain counts exceeds the total number of examples (2,790). |
|
|
|
|
|
This balanced distribution ensures your model learns all CMMC domains equally well. |
|
|
|
|
|
## CMMC Level Distribution |
|
|
|
|
|
``` |
|
|
All Levels: 2,247 examples (80.5%) |
|
|
Level 3 (Advanced): 301 examples (10.8%) |
|
|
Level 2 (Advanced): 124 examples (4.4%) |
|
|
Level 1 (Foundational): 118 examples (4.2%) |
|
|
``` |
|
|
|
|
|
## Source Documents (71 total) |
|
|
|
|
|
The Balanced variant includes: |
|
|
|
|
|
**Core Foundation** (14 documents): |
|
|
- NIST SP 800-171 R3 (CMMC Level 2) |
|
|
- NIST SP 800-172 R3 (CMMC Level 3) |
|
|
- NIST SP 800-53 R5 (Master controls) |
|
|
- Assessment procedures and supplementary guidance |
|
|
|
|
|
**Domain-Specific Publications** (57 additional documents): |
|
|
- Selected from 596 NIST publications using domain keyword matching |
|
|
- Covers emerging topics: cloud security, IoT, supply chain, incident response |
|
|
- Includes practical implementation guides and case studies |
|
|
|
|
|
Examples: |
|
|
- SP 800-61 (Incident Response) |
|
|
- SP 800-92 (Audit Log Management) |
|
|
- SP 800-115 (Security Testing) |
|
|
- SP 800-137 (Continuous Monitoring) |
|
|
- SP 800-161 (Supply Chain Risk Management) |
|
|
|
|
|
## Dataset Structure |
|
|
|
|
|
### JSONL Training Files |
|
|
|
|
|
Each example follows the chat format: |
|
|
|
|
|
```json |
|
|
{ |
|
|
"messages": [ |
|
|
{ |
|
|
"role": "system", |
|
|
"content": "You are a cybersecurity expert specializing in CMMC..." |
|
|
}, |
|
|
{ |
|
|
"role": "user", |
|
|
"content": "How should incident response be implemented for CMMC Level 2?" |
|
|
}, |
|
|
{ |
|
|
"role": "assistant", |
|
|
"content": "According to NIST SP 800-61 R2, incident response for CMMC Level 2..." |
|
|
} |
|
|
], |
|
|
"metadata": { |
|
|
"source": "NIST SP 800-61 R2", |
|
|
"cmmc_level": "2", |
|
|
"cmmc_domain": "Incident Response", |
|
|
"type": "domain_specific" |
|
|
} |
|
|
} |
|
|
``` |
|
|
|
|
|
### Vector Embeddings |
|
|
|
|
|
Pre-computed embeddings using OpenAI's `text-embedding-3-small` model: |
|
|
|
|
|
- **Format**: Parquet files with 1536-dimensional vectors |
|
|
- **Files**: `embeddings_train.parquet`, `embeddings_valid.parquet` |
|
|
- **Size**: 34.5 MB total (27.5 MB train + 7.0 MB validation) |
|
|
- **Cost**: $0.01 (674,102 tokens processed) |
|
|
|
|
|
### FAISS Indexes |
|
|
|
|
|
Ready-to-use vector similarity search indexes: |
|
|
|
|
|
- **L2 distance indexes**: `faiss_train_l2.index`, `faiss_valid_l2.index` |
|
|
- **Cosine similarity indexes**: `faiss_train_cosine.index`, `faiss_valid_cosine.index` |
|
|
|
|
|
## Q&A Generation Strategies |
|
|
|
|
|
Examples were generated using 5 complementary strategies: |
|
|
|
|
|
1. **Section-based Q&A**: Questions from document sections |
|
|
2. **Control-based Q&A**: NIST control requirements (3.1.1 format) |
|
|
3. **CMMC-specific Q&A**: Level-focused questions (L1/L2/L3) |
|
|
4. **Domain-specific Q&A**: Questions per CMMC domain (balanced sampling) |
|
|
5. **Semantic chunking**: General content with context preservation |
|
|
|
|
|
## Use Cases |
|
|
|
|
|
The Balanced dataset is ideal for: |
|
|
|
|
|
- **Comprehensive CMMC training**: Equal coverage of all 17 domains |
|
|
- **Domain-agnostic models**: No bias toward specific security areas |
|
|
- **Full compliance coverage**: Suitable for general CMMC consulting |
|
|
- **RAG systems**: Balanced retrieval across all domains |
|
|
- **Security assessment tools**: Complete domain coverage |
|
|
- **Training multiple specialists**: Each domain well-represented |
|
|
|
|
|
## Dataset Statistics |
|
|
|
|
|
``` |
|
|
Source Documents: 71 |
|
|
Total Examples: 2,790 |
|
|
Training Examples: 2,232 (80%) |
|
|
Validation Examples: 558 (20%) |
|
|
Avg Example Length: ~242 tokens |
|
|
Total Tokens Embedded: 674,102 |
|
|
Embedding Cost: $0.01 USD |
|
|
Domain Balance: 99.8% (within 2% variance) |
|
|
``` |
|
|
|
|
|
## Advantages Over Other Variants |
|
|
|
|
|
**vs. Core (14 docs, 1.2K examples)**: |
|
|
- 2.2x more examples |
|
|
- 5x more source documents |
|
|
- Better domain balance (Core is weighted toward SP 800-171/172) |
|
|
- More diverse use cases and scenarios |
|
|
|
|
|
**vs. Comprehensive (381 docs, 11.3K examples)**: |
|
|
- Faster training (75% fewer examples) |
|
|
- Better signal-to-noise ratio (curated selection) |
|
|
- Equal domain representation (Comprehensive may be imbalanced) |
|
|
- Lower computational cost |
|
|
|
|
|
## Quick Start |
|
|
|
|
|
### Load JSONL Data |
|
|
|
|
|
```python |
|
|
import json |
|
|
|
|
|
# Load training data |
|
|
with open('train.jsonl', 'r') as f: |
|
|
train_data = [json.loads(line) for line in f] |
|
|
|
|
|
# Example: Check domain distribution |
|
|
from collections import Counter |
|
|
domains = [ex['metadata'].get('cmmc_domain', 'Unknown') |
|
|
for ex in train_data if 'metadata' in ex] |
|
|
print(Counter(domains)) |
|
|
``` |
|
|
|
|
|
### Load Embeddings |
|
|
|
|
|
```python |
|
|
import pandas as pd |
|
|
import numpy as np |
|
|
|
|
|
# Load embeddings |
|
|
df = pd.read_parquet('embeddings_train.parquet') |
|
|
|
|
|
# Access embeddings as numpy array |
|
|
embeddings = np.vstack(df['embedding'].values) |
|
|
texts = df['text'].tolist() |
|
|
|
|
|
print(f"Embeddings shape: {embeddings.shape}") # (2232, 1536) |
|
|
``` |
|
|
|
|
|
### Use FAISS Index |
|
|
|
|
|
```python |
|
|
import faiss |
|
|
|
|
|
# Load FAISS index |
|
|
index = faiss.read_index('faiss_train_cosine.index') |
|
|
|
|
|
# Search for similar content |
|
|
query_embedding = ... # your query vector (1536-dim) |
|
|
k = 5 # number of results |
|
|
distances, indices = index.search(query_embedding.reshape(1, -1), k) |
|
|
|
|
|
# Get similar texts |
|
|
for i, idx in enumerate(indices[0]): |
|
|
print(f"{i+1}. {texts[idx][:100]}...") |
|
|
``` |
|
|
|
|
|
## Related Datasets |
|
|
|
|
|
This is part of a family of 3 CMMC datasets: |
|
|
|
|
|
- **Core**: 14 docs, 1.2K examples - Essential CMMC foundation |
|
|
- **Balanced** (this dataset): 71 docs, 2.8K examples - Domain-balanced coverage |
|
|
- **Comprehensive**: 381 docs, 11.3K examples - Complete NIST CMMC library |
|
|
|
|
|
## When to Use Balanced vs. Others |
|
|
|
|
|
**Choose Balanced if**: |
|
|
- You need equal representation across all 17 CMMC domains |
|
|
- You want comprehensive coverage without excessive examples |
|
|
- You're building a general-purpose CMMC assistant |
|
|
- You want faster training than Comprehensive |
|
|
- You need more diversity than Core |
|
|
|
|
|
**Choose Core if**: |
|
|
- You only care about SP 800-171/172 fundamentals |
|
|
- You want the fastest training possible |
|
|
- You're focused on core CMMC requirements only |
|
|
|
|
|
**Choose Comprehensive if**: |
|
|
- You need maximum context and coverage |
|
|
- You're building an exhaustive knowledge base |
|
|
- Training time/cost is not a constraint |
|
|
- You want every NIST CMMC-related publication |
|
|
|
|
|
## Citation |
|
|
|
|
|
If you use this dataset, please cite: |
|
|
|
|
|
```bibtex |
|
|
@dataset{cmmc_balanced_2025, |
|
|
title={CMMC Training Dataset - Balanced Variant}, |
|
|
author={Troy, Ethan Oliver}, |
|
|
year={2025}, |
|
|
publisher={HuggingFace}, |
|
|
note={Derived from NIST Special Publications (Public Domain)} |
|
|
} |
|
|
``` |
|
|
|
|
|
## License |
|
|
|
|
|
**Public Domain** - This dataset is derived from NIST Special Publications, which are works of the US Government and not subject to copyright protection in the United States. |
|
|
|
|
|
## Acknowledgments |
|
|
|
|
|
This dataset is built from publications by the National Institute of Standards and Technology (NIST), Computer Security Resource Center. |
|
|
|
|
|
## Dataset Version |
|
|
|
|
|
- **Version**: 1.0 |
|
|
- **Created**: 2025 |
|
|
- **Source**: NIST CSRC Publications |
|
|
- **Processing**: Docling + custom CMMC-aware data preparation |
|
|
- **Balancing**: Domain-based keyword matching with weighted sampling |
|
|
|
|
|
## Contact |
|
|
|
|
|
For questions or issues, please open an issue on the GitHub repository. |
|
|
|