Module 1. Introduction: Reinforcement Learning for LLMs
Choose your answers and select “Check”. Numbers accept a decimal point, comma, or simple fraction. Answers and drafts are saved in this browser and shared between RU/EN.
Use the author’s worked answers to review open questions and code tasks yourself. Code does not run on this site.
Checked: 0 / 9 · Correct: 0
Question P01 · The limits of "an LLM is a policy"
Step 1.1.4 — An LLM as a policy: the exact correspondence and its boundary
single answer
In the token formulation , , and an LLM genuinely defines . What caveat does the module attach to that statement?
Question P02 · Four questions instead of a label
Step 1.1.5 — Reward, return, discounting, and the RL objective
single answer
The module rejects "supervised learning has a right answer, RL only has a reward". What does it offer instead?
Question P03 · What each abstraction hides
Step 1.2.1 — Three useful abstractions: response, token, and macro-action
multiple answers
The three formulations of an LLM task each hide something deliberately. Select every correct pairing.
Question P04 · What a denser signal does not do
Step 1.2.2 — Sparse reward, credit assignment, and rollout cost
single answer
A value function, a group baseline and process rewards all make a sparse signal more informative. What does none of them do?
Question P05 · Offline versus off-policy
Step 1.3.3 — Classical axes and their limits
single answer
Why are "offline" and "off-policy" not synonyms?
Question P06 · The method map
Step 1.3.5 — SFT, DPO, PPO-RLHF, GRPO/RLVR, and Best-of-N
multiple answers
From the table in step 1.3.5 — which statements are true? Select all that apply.
Question P07 · What the temperature formula describes
Step 1.4.2 — Temperature softmax: a first computable policy
single answer
The formula and the monotonicity of entropy in are proved for fixed finite logits. Why need the API's temperature parameter not behave the same way?
Question P08 · Entropy at a given temperature
Step 1.4.3 — Reproducible experiment:
numeric answer · tolerance ±0.01
Logits , temperature .
What is the policy entropy in nats?
Question P09 · The exact corridor value under a finite horizon
Step 1.4.4 — Return and Monte Carlo evaluation in a corridor
coding task
A symmetric walk over cells ; start at ; left and right are equally likely. The episode terminates at (reward ) or at (reward ), and is also cut off after max_steps actions.
Specification: compute exactly, by dynamic programming over the remaining step count — no simulation.
Input format: one line — max_steps.
Output format: one line — the value (6 decimals).
Starter code:
def exact_corridor_value(max_steps: int) -> float:
"""Probability of reaching state 4 from state 2 within max_steps actions."""
# YOUR CODE HERE
raise NotImplementedError
if __name__ == "__main__":
print(f"{exact_corridor_value(int(input())):.6f}")
Open tests:
| stdin | stdout |
|---|---|
2 | 0.250000 |
4 | 0.375000 |
6 | 0.437500 |
20 | 0.499512 |
Question P10 · Standard error of the Monte Carlo estimate
Step 1.4.4 — Return and Monte Carlo evaluation in a corridor
numeric answer · tolerance ±0.002
The corridor return is a Bernoulli variable with . The estimate uses independent episodes.
What is the approximate standard error ?