Reinforcement learning is a training method where an AI system learns by trial and error, taking actions and receiving rewards or penalties that guide it toward better behavior over time.
What is reinforcement learning?
Reinforcement learning, or RL, trains a model by letting it take actions in an environment and rewarding or penalizing the outcomes, rather than showing it labeled correct answers directly. Over many attempts, the model, often called an agent in this context, learns a strategy, or policy, that maximizes the reward it receives.
How reinforcement learning works
An RL system typically consists of an agent, an environment it acts within, and a reward signal. The agent takes an action, the environment responds with a new state and a reward, and the agent adjusts its policy to favor actions that led to higher rewards in the past. This trial-and-error loop is what let RL systems famously master games like Go and chess beyond human ability.
Reinforcement learning in language models
In modern LLMs, reinforcement learning is most commonly used through reinforcement learning from human feedback, where the "reward" comes from human raters judging which of several model responses is better. This is a key step in turning a raw pretrained model into an assistant that reliably follows instructions and avoids harmful outputs.
Why reinforcement learning matters
Unlike standard supervised training, which needs a labeled correct answer for every example, reinforcement learning can optimize for goals that are hard to specify directly, like "be helpful and honest," by learning from relative feedback about what's better or worse. That flexibility is why it plays a central role in aligning today's AI assistants with what people actually want.