# Training Data, Fine-Tuning and RLHF Explained

> Understand how LLMs learn. Explore pre-training, fine-tuning, and Reinforcement Learning from Human Feedback (RLHF) and their unique security implications.

Canonical: https://codelivly.com/rooms/training-data-fine-tuning-and-rlhf-explained
Last updated: 2026-10-02

| | |
|---|---|
| Level | Intermediate |
| Category | Cybersecurity |
| Lessons | 4 |
| Estimated time | 30 min |
| XP | 100 |

This module demystifies the training lifecycle of Large Language Models for cybersecurity professionals. You will learn the critical differences between pre-training on massive datasets, supervised fine-tuning for specific tasks, and Reinforcement Learning from Human Feedback (RLHF) for alignment. Crucially, you will explore how attackers can subvert this entire pipeline through data poisoning, reward hacking, and backdoor injection, and how defenders can secure the model's learning process.

## Lessons

1. What is Training Data and Why It Matters for Security (30 min)
2. Pre-Training vs Fine-Tuning Explained (30 min)
3. Reinforcement Learning from Human Feedback and How Guardrails Are Built (30 min)
4. Guided Lab: Identifying Training Data Artifacts in Model Outputs (30 min)

## Related

- [Learning path: AI and Machine Learning Fundamentals](https://codelivly.com/learning-paths/ai-and-machine-learning-fundamentals)
- [All rooms](https://codelivly.com/rooms)
