Reinforcement learning
Reinforcement learning is a way of training a model by letting it act, scoring the outcome, and favoring the actions that scored well.
In reinforcement learning, a model learns by acting and by being scored on the outcome. No one shows the model the right answer. It learns from a reward, a number that says how well an attempt went. Over many attempts, actions that led to high rewards become more likely, and the rest become less likely.
The model being trained is called the policy, because it decides what to do in each situation. It acts in an environment, which responds to each action and reports the new state. One pass through a task, from start to finish, is a rollout. Training repeats rollouts, scores them, and updates the policy from the results.
For language models, reinforcement learning usually follows an earlier stage of training on examples. That stage teaches the model to produce useful text, and reinforcement learning then improves how it performs whole tasks. An AI agent trained this way learns from the outcome of a task, such as whether the code it wrote passes its tests. It does not need a written example of every step. Each attempt at such a task runs code, so it usually runs in a sandbox of its own.