ethanolivertroy commited on
Commit
47632d7
·
verified ·
1 Parent(s): f285271

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +259 -0
README.md ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc0-1.0
3
+ task_categories:
4
+ - text-generation
5
+ - question-answering
6
+ language:
7
+ - en
8
+ size_categories:
9
+ - 1K<n<10K
10
+ tags:
11
+ - cmmc
12
+ - nist
13
+ - cybersecurity
14
+ - compliance
15
+ - security-controls
16
+ - SP-800-171
17
+ pretty_name: CMMC Training Dataset - Core Variant
18
+ ---
19
+
20
+ # CMMC Training Dataset - Core Variant
21
+
22
+ ## Dataset Description
23
+
24
+ This is the **Core variant** of the CMMC (Cybersecurity Maturity Model Certification) training dataset, containing 1,244 high-quality training examples derived from the most essential NIST cybersecurity publications for CMMC compliance.
25
+
26
+ ### Dataset Characteristics
27
+
28
+ - **Total Examples**: 1,244 (995 train / 249 validation)
29
+ - **Source Documents**: 14 foundational NIST publications
30
+ - **CMMC Levels Covered**: Level 1, Level 2, Level 3
31
+ - **CMMC Domains**: All 17 domains
32
+ - **Format**: JSONL with chat-formatted messages
33
+ - **Embeddings**: 1536-dimensional vectors (OpenAI text-embedding-3-small)
34
+ - **License**: Public Domain (NIST documents are US Government works)
35
+
36
+ ## What Makes This "Core"?
37
+
38
+ The Core variant focuses on the **essential foundation** documents that form the basis of CMMC:
39
+
40
+ ### Foundation Documents (14 total)
41
+
42
+ **Primary CMMC Requirements:**
43
+ - **NIST SP 800-171 Rev 3**: Protecting Controlled Unclassified Information (CMMC Level 2)
44
+ - **NIST SP 800-171A Rev 3**: Assessment Procedures for SP 800-171
45
+ - **NIST SP 800-171B**: Protecting CUI in Nonfederal Systems and Organizations
46
+ - **NIST SP 800-172 Rev 3**: Enhanced Security for CUI (CMMC Level 3)
47
+ - **NIST SP 800-172A**: Assessment Procedures for SP 800-172
48
+
49
+ **Master Control Catalog:**
50
+ - **NIST SP 800-53 Rev 5**: Security and Privacy Controls
51
+
52
+ **Supplementary Guidance:**
53
+ - **NIST SP 800-37 Rev 2**: Risk Management Framework
54
+
55
+ This core set provides comprehensive coverage of CMMC requirements across all 17 domains and 3 maturity levels.
56
+
57
+ ## CMMC Level Distribution
58
+
59
+ ```
60
+ Level 3 (Advanced): 579 examples (46.5%)
61
+ All Levels: 561 examples (45.1%)
62
+ Level 2 (Advanced): 104 examples (8.4%)
63
+ ```
64
+
65
+ ## CMMC Domain Coverage
66
+
67
+ All 17 CMMC domains are represented (567 examples each):
68
+ - Access Control (AC)
69
+ - Awareness and Training (AT)
70
+ - Audit and Accountability (AU)
71
+ - Configuration Management (CM)
72
+ - Identification and Authentication (IA)
73
+ - Incident Response (IR)
74
+ - Maintenance (MA)
75
+ - Media Protection (MP)
76
+ - Personnel Security (PS)
77
+ - Physical Protection (PE)
78
+ - Risk Assessment (RA)
79
+ - Security Assessment (CA)
80
+ - System and Communications Protection (SC)
81
+ - System and Information Integrity (SI)
82
+ - System and Services Acquisition (SA)
83
+ - Planning (PL)
84
+ - Supply Chain Risk Management (SR)
85
+
86
+ **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 (9,639) exceeds the total number of examples (1,244).
87
+
88
+ ## Dataset Structure
89
+
90
+ ### JSONL Training Files
91
+
92
+ Each example follows the chat format:
93
+
94
+ ```json
95
+ {
96
+ "messages": [
97
+ {
98
+ "role": "system",
99
+ "content": "You are a cybersecurity expert specializing in CMMC (Cybersecurity Maturity Model Certification) and NIST frameworks..."
100
+ },
101
+ {
102
+ "role": "user",
103
+ "content": "What is the purpose of CMMC Level 2 requirement 3.1.1?"
104
+ },
105
+ {
106
+ "role": "assistant",
107
+ "content": "According to NIST SP 800-171 R3, control 3.1.1 (Access Control) requires..."
108
+ }
109
+ ],
110
+ "metadata": {
111
+ "source": "NIST SP 800-171 R3",
112
+ "cmmc_level": "2",
113
+ "cmmc_domain": "Access Control",
114
+ "cmmc_practice_id": "AC.L2-3.1.1",
115
+ "nist_control": "3.1.1",
116
+ "type": "cmmc_requirement"
117
+ }
118
+ }
119
+ ```
120
+
121
+ ### Vector Embeddings
122
+
123
+ Pre-computed embeddings using OpenAI's `text-embedding-3-small` model:
124
+
125
+ - **Format**: Parquet files with 1536-dimensional vectors
126
+ - **Files**: `embeddings_train.parquet`, `embeddings_valid.parquet`
127
+ - **Size**: 15.3 MB total (12.1 MB train + 3.2 MB validation)
128
+ - **Cost**: $0.01 (330,784 tokens processed)
129
+
130
+ ### FAISS Indexes
131
+
132
+ Ready-to-use vector similarity search indexes:
133
+
134
+ - **L2 distance indexes**: `faiss_train_l2.index`, `faiss_valid_l2.index`
135
+ - **Cosine similarity indexes**: `faiss_train_cosine.index`, `faiss_valid_cosine.index`
136
+
137
+ ## Q&A Generation Strategies
138
+
139
+ Examples were generated using 5 complementary strategies:
140
+
141
+ 1. **Section-based Q&A**: Questions from document sections
142
+ 2. **Control-based Q&A**: NIST control requirements (3.1.1 format)
143
+ 3. **CMMC-specific Q&A**: Level-focused questions (L1/L2/L3)
144
+ 4. **Domain-specific Q&A**: Questions per CMMC domain
145
+ 5. **Semantic chunking**: General content with context preservation
146
+
147
+ ## Use Cases
148
+
149
+ This Core dataset is ideal for:
150
+
151
+ - **Fine-tuning LLMs** on CMMC compliance requirements
152
+ - **Building CMMC chatbots** for compliance guidance
153
+ - **RAG systems** for CMMC documentation
154
+ - **Semantic search** across CMMC controls
155
+ - **Training materials** for CMMC assessors
156
+ - **Compliance automation** tools
157
+
158
+ ## Dataset Statistics
159
+
160
+ ```
161
+ Source Documents: 14
162
+ Total Examples: 1,244
163
+ Training Examples: 995 (80%)
164
+ Validation Examples: 249 (20%)
165
+ Avg Example Length: ~266 tokens
166
+ Total Tokens Embedded: 330,784
167
+ Embedding Cost: $0.01 USD
168
+ ```
169
+
170
+ ## Quick Start
171
+
172
+ ### Load JSONL Data
173
+
174
+ ```python
175
+ import json
176
+
177
+ # Load training data
178
+ with open('train.jsonl', 'r') as f:
179
+ train_data = [json.loads(line) for line in f]
180
+
181
+ # Example: Access first training example
182
+ print(train_data[0]['messages'])
183
+ print(train_data[0]['metadata'])
184
+ ```
185
+
186
+ ### Load Embeddings
187
+
188
+ ```python
189
+ import pandas as pd
190
+ import numpy as np
191
+
192
+ # Load embeddings
193
+ df = pd.read_parquet('embeddings_train.parquet')
194
+
195
+ # Access embeddings as numpy array
196
+ embeddings = np.vstack(df['embedding'].values)
197
+ texts = df['text'].tolist()
198
+
199
+ print(f"Embeddings shape: {embeddings.shape}") # (995, 1536)
200
+ ```
201
+
202
+ ### Use FAISS Index
203
+
204
+ ```python
205
+ import faiss
206
+
207
+ # Load FAISS index
208
+ index = faiss.read_index('faiss_train_cosine.index')
209
+
210
+ # Search for similar content
211
+ query_embedding = ... # your query vector (1536-dim)
212
+ k = 5 # number of results
213
+ distances, indices = index.search(query_embedding.reshape(1, -1), k)
214
+
215
+ # Get similar texts
216
+ for i, idx in enumerate(indices[0]):
217
+ print(f"{i+1}. {texts[idx][:100]}...")
218
+ ```
219
+
220
+ ## Related Datasets
221
+
222
+ This is part of a family of 3 CMMC datasets:
223
+
224
+ - **Core** (this dataset): 14 docs, 1.2K examples - Essential CMMC foundation
225
+ - **Balanced**: 71 docs, 2.8K examples - Domain-balanced coverage
226
+ - **Comprehensive**: 381 docs, 11.3K examples - Complete NIST CMMC library
227
+
228
+ ## Citation
229
+
230
+ If you use this dataset, please cite:
231
+
232
+ ```bibtex
233
+ @dataset{cmmc_core_2025,
234
+ title={CMMC Training Dataset - Core Variant},
235
+ author={Troy, Ethan Oliver},
236
+ year={2025},
237
+ publisher={HuggingFace},
238
+ note={Derived from NIST Special Publications (Public Domain)}
239
+ }
240
+ ```
241
+
242
+ ## License
243
+
244
+ **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.
245
+
246
+ ## Acknowledgments
247
+
248
+ This dataset is built from publications by the National Institute of Standards and Technology (NIST), Computer Security Resource Center.
249
+
250
+ ## Dataset Version
251
+
252
+ - **Version**: 1.0
253
+ - **Created**: 2025
254
+ - **Source**: NIST CSRC Publications
255
+ - **Processing**: Docling + custom CMMC-aware data preparation
256
+
257
+ ## Contact
258
+
259
+ For questions or issues, please open an issue on the GitHub repository.