A base model is knowledgeable but not aligned. RLHF: humans rank model outputs, those rankings train a reward model, and the LLM is then optimized (via RL, e.g. PPO) to produce responses the reward model scores highly. This is what turned raw text-predictors into helpful, harmless assistants. It's powerful but complex, and reward-model flaws can be gamed (reward hacking, sycophancy).