Standard Operating Procedure — [YOUR ORGANIZATION] EU AI Act Reference: Article 17(1)(f), Article 10
Define standards for collecting, annotating, storing, and governing training data for LLM fine-tuning.
All datasets used for model training, validation, and evaluation.
| Role | Responsibility |
|---|---|
| Data Steward | Data quality oversight, governance compliance |
| ML Engineer | Data preparation, preprocessing, format validation |
| DPO (Data Protection Officer) | Personal data assessment, DPIA review |
- Document data source and collection method in config:
data: governance: collection_method: "Manual curation from internal knowledge base"
- Assess representativeness: does the data reflect the intended deployment context?
- Check for geographical, demographic, and contextual balance
- Document known biases in config:
data: governance: known_biases: "Dataset skewed toward English-speaking customers in EU region"
- Determine if dataset contains personal data
- If yes: complete Data Protection Impact Assessment (DPIA)
- Document in config:
data: governance: personal_data_included: true dpia_completed: true
- Ensure data minimization — only include necessary personal data
- Apply anonymization/pseudonymization where possible
- Document annotation process:
data: governance: annotation_process: "Two annotators per sample, adjudication by senior annotator"
- Maintain inter-annotator agreement records
- Version control annotation guidelines
ForgeLM automated checks:
- Dataset fingerprinting (SHA-256 hash, size, timestamp)
- Format validation per trainer type (SFT, DPO, KTO, GRPO)
- Text cleaning (
clean_text: true) - ForgeLM audit pipeline (v0.5.0+,
forgelm audit <jsonl>; legacyforgelm --data-auditflag removed in v0.8.0) — producesdata_audit_report.jsonwith per-split sample counts, length distribution, top-3 language detection, near-duplicate rate (default 64-bit simhash, or MinHash LSH via--dedup-method minhashfor >50K-row corpora), cross-split leakage check, PII flag counts (email / phone / issuer-prefix + Luhn credit card / IBAN / TR–DE–FR–US national IDs) with severity tiers, always-on secrets/credentials scan (AWS / GitHub / Slack / OpenAI / Google / JWT / private-key headers), and an optional heuristic quality filter (--quality-filter) that adds aquality_summaryblock.forgelm audit --croissantemits a Google Croissant 1.0 dataset card alongside the report. The report is auto-inlined into the EU AI Act Article 10 governance artifact when present in the trainer'soutput_dir— operators must run the audit before training to keep the bundle self-contained. Phases 11 + 11.5 + 12 + 12.5 shipped together in thev0.5.0consolidation release (PyPI 2026-04-30); the per-feature list above describes the v0.5.0 surface. - ForgeLM ingestion pipeline (v0.5.0+,
forgelm ingest) — turns raw PDF / DOCX / EPUB / TXT / Markdown into SFT-ready JSONL with paragraph / sliding / markdown-aware chunking, DOCX→markdown table preservation, optional Presidio ML-NER adapter (--pii-ml,[ingestion-pii-ml]extra), and--pii-mask/--secrets-mask/--all-maskshorthands to redact detected PII / credential spans before chunks reach storage.
Manual checks:
- Run
forgelm auditand reviewdata_audit_report.jsonfor: cross-split leakage > 0%, near-duplicate rate, unexpected language mix, PII flag counts,secrets_summary(any non-zero count is a stop-the-line event; remediate before training), andquality_summaryif--quality-filterwas used. - Sample review: inspect 50+ random examples.
- Verify label correctness (for preference/KTO data).
- Training data stored in version-controlled or immutable storage
- SHA-256 fingerprint recorded in
data_provenance.jsonfor every training run - Retain training data alongside model artifacts only for the period your retention policy sets and justifies: personal data may be kept only as long as necessary (GDPR Article 5(1)(e)), and a documentation-retention duty such as EU AI Act Article 18 does not by itself justify keeping personal data. The SHA-256 fingerprint in
data_provenance.jsonholds no row content and can be kept longer than the corpus - Access restricted to authorized ML team members
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0 | [DATE] | [AUTHOR] | Initial version |