Glossary

Every term used in this course, what it means, and what it looks like when the agent is a language model.

Hover over a term, or tap it, for a real-world example and an LLM example.

The basics

TermSymbolMeaningFor a language model
The learner that makes decisionsThe model
Everything outside the agentPrompt, tools, sandbox and checker
ssWhat the agent observes right nowPrompt plus the tokens generated so far
aaOne choice the agent makesThe next token. Zoomed out, the whole answer.
π(a∣s)\pi(a \mid s)Probability of each action in each stateThe model's softmax over its vocabulary
rrNumber the environment returns after an actionA score, usually once at the end
τ\tauOne run from start to finishOne full response
An episode generated to train onOne sampled answer and its score
GGTotal (discounted) reward of an episodeThe final score
γ\gammaHow much less a reward counts per step of delayUsually 1
RL with one decision and no next stateScoring one answer to one prompt
ε\varepsilonTrying actions that don't currently look bestSampling temperature, several samples per prompt

Values and gradients

TermSymbolMeaningFor a language model
V(s)V(s)Expected return from state ssExpected final score of a half-written answer
Q(s,a)Q(s, a)Expected return after action aa in state ssValue of one particular next token
VϕV_\phiA learned network that estimates VVUsed by PPO, not by GRPO
AAHow much better than expected an action turned outHow much better than average an answer scored
bbThe expected reward subtracted to get the advantageThe group's mean score in GRPO
Data from the policy being updatedAnswers from the current weights
Data from a different policyAnswers from older weights, or another model
π/μ\pi / \muCorrects for data from another policyPer-token probability now ÷ when sampled
ρ\rhoPPO's importance weightComputed per token
εhigh\varepsilon_\text{high}Upper clip larger than lower clipDAPO's 0.28 vs 0.2

Rewards and preferences

TermSymbolMeaningFor a language model
rϕr_\phiLearned scorer trained on comparisonsScores chat answers
SFT → reward model → RLThe original ChatGPT recipe
πref\pi_\text{ref}A frozen copy of the starting policyThe model before RL training
Preference training without a reward modelChosen vs rejected answer pairs
Rewards computed by a programAnswer checkers and unit tests
Scores each step, not just the outcomeStep-by-step solution grading
Per-prompt checklist scored by a judgeOpen-ended tasks with no answer key
Scoring well without doing the intended taskPadding answers, editing tests

Training dynamics and systems

TermSymbolMeaningFor a language model
Several samples for the same inputSeveral answers to one prompt in GRPO
HHHow spread out the policy's choices areFalls during RL; when it's gone, learning stalls
Solved by at least one of kk attemptsMeasures what the model can do at all
Updates between generating and trainingVersions behind in asynchronous RL
Sampler and trainer disagree on probabilitiesvLLM vs the training code
Which tokens count in the lossTool outputs are masked
Student imitates teacherFine-tuning on a bigger model's answers
Teacher scores the student's own tokensMerging specialist models

Related

  • rl-loop - An agent acts, the world responds with a new state and a reward, and the agent learns to collect more reward. Every later page builds on these five parts.
  • papers - Every paper and method cited in this course, with one line on what it changed and where it's explained. Use it while reading new papers.