Dissecting AI
From the paper: Teaching NVIDIA's Nemotron 3.5 Super-VL ML Engineering

Retrospective Lessons and Action Replay

Reflection-only training can lose concrete behavior; pair self-written lessons with replayed reasoning-and-action examples to keep advice grounded in what an agent actually does.

Read the paper ↗
The short version

What it is

  • Retrospective lessons After an attempt, the agent reviews its run and writes advice about what it should do differently next time.
  • Action replay Alongside those lessons, training reuses examples of the agent's earlier reasoning and next actions.

Why it matters

Advice about a past failure can be useful, but it is not the same as demonstrating behavior. Pairing reviews with action examples keeps both kinds of learning present; the reported comparison supports the combined recipe without proving which ingredient helped on its own.

Before getting into the details, here is the short version: the agent reviews its own past work and writes a lesson, but training does not replace action examples with those lessons. It mixes the new reflections with replayed examples of reasoning and actions. That matters because knowing what went wrong and knowing how to behave are related, but they are not the same skill.

  1. Lessons from failures: A run can reveal a recurring mistake that a successful final answer hides. The canonical example here is a planner that failed all 16 local tests, each with a four-minute limit. It switched to a simpler method, fixed the implementation, and one later simulation finished in about a minute. The retained lesson was to fix runtime before making further model changes, then check that the solution still finishes when several tests run together. More generally, a reflection turns a particular attempt into advice for future attempts. It is not a guarantee that the advice will transfer.

  2. Advice needs behavioral examples: If training shows only reflections, the model sees what it should learn from a run but gets fewer reminders of how reasoning and actions unfold. Think of a reflection as a note in a notebook: it can point out what to change, but it does not replay the steps that got you there. The analogy breaks because the model learns from token sequences rather than consulting a human notebook. So the real question is not simply whether the agent can write a good lesson; it is whether that lesson can be added without crowding out concrete behavior.

  3. Two kinds of examples, two targets: In the mixture, a reflection example gives the model the run transcript and asks it to produce the retrospective response. A replay example gives it the earlier action context and trains the original reasoning and next action. In the reported recipe, 972 reflection examples were combined with 500 replayed action examples, starting from the SCD checkpoint; training ran for one epoch, at a learning rate of 3e-5, over 184 steps. In the reported 22-task comparison, the combined recipe had the highest score, while reflection-only variants regressed relative to their SCD parent in a diagnostic evaluation. But learning rate and mixture changed together, and there was no matched replay-only control. What can we actually credit to reflection, rather than to the combination or its training setup?

Read the deep dive

Why People Wanted It

A capable agent can finish a task and still fail to learn the lesson that would help on the next one. Reviewing a past attempt can produce useful advice—fix the runtime bottleneck before changing the model, for example—but advice alone is not an example of how to act. The real question is whether an agent can learn from its own retrospective lessons without losing the concrete reasoning and actions that made its earlier behavior trainable.

The Core Move

Train on self-written reviews of past attempts while replaying examples of the reasoning and actions those attempts contained. The training mixture has two targets: a retrospective response conditioned on a transcript, and the original reasoning-plus-next-action target conditioned on its context.

Why a Lesson Needs a Transcript

Now the version for readers who want more of the machinery: a reflection example is not just a free-standing rule; its transcript is the context that makes the retrospective response about a specific run. Let a run be τ=(o1,a1,…,oT,aT)\tau=(o_1,a_1,\ldots,o_T,a_T), with observations oto_t and agent responses ata_t. The reflection target rr is trained conditionally as p(r∣τ)p(r\mid\tau): the model sees what happened, then learns to produce the lesson about that attempt.

This pairing matters because advice such as “fix runtime first” is only useful when grounded in the actual failure and subsequent change. In the reported process, the model reviewed its runs, lessons were checked for format and consistency with the run, and an LLM judge rated them. The lesson is therefore supervision about interpreting a trajectory, not a replacement for the trajectory itself.

Why Replay Keeps Behavior in the Mix

Here is the part that gets technical: the mixture assigns different supervised targets to the two example types. For reflection examples, the transcript supplies context and the retrospective response is the target; for replay examples, the original reasoning and next action are the target. In shorthand, the objective can be written as L=Lreflect+Lreplay\mathcal{L}=\mathcal{L}_{reflect}+\mathcal{L}_{replay}, where the terms denote losses over their respective examples—not a claim that their weights or contributions are equal.

The reported recipe combined 972 reflection examples with 500 replayed action examples from the first-stage SCD dataset, starting from the SCD checkpoint. It trained for one epoch at a learning rate of 3×10−53\times10^{-5} over 184 steps. Reflection-only variants regressed relative to their SCD parent in the diagnostic evaluation; the combined recipe did better than those variants and had the highest score in the reported 22-task comparison. That comparison does not isolate the ingredients: learning rate and mixture changed together, and there was no matched replay-only control. So what can the result tell us about the value of reflection by itself?

Minimal Causal Code

This sketch makes the distinct targets visible. It leaves batching, masking, and loss weighting to the surrounding training code.

for example in examples:
    if example.kind == "reflection":
        context = example.transcript
        target = example.retrospective_response
    else:  # replay
        context = example.action_context
        target = example.reasoning_and_next_action

    logits = model(context)
    loss = token_loss(logits, target)
    loss.backward()
    optimizer.step()
    optimizer.zero_grad()

What You Gain, and What You Lose

The gain is a training signal for turning an agent's own attempt into a reusable lesson while retaining examples of concrete agent behavior in the mixture. Reflection is incorporated during training; evaluation uses the same Terminus-2 harness without an additional reflection loop.

The tradeoff is attribution. The combined recipe performed better than reflection-only variants in the reported comparison, but the changing learning rate and mixture and the missing matched replay-only control leave the individual contribution of reflection unresolved. This is a recipe-level result, not proof that either ingredient alone caused the improvement.

Quiz
In the reflection-and-replay mixture, what is the supervised target for a reflection example versus a replay example?
Reflection targets an action; replay targets a lesson without its context.
Reflection targets a retrospective response; replay targets original reasoning and the next action.
Both example types target only the retrospective response.
Reflection targets only a final score; replay targets the transcript verbatim.
Quiz
What conclusion is supported by the reported comparison of reflection-only variants and the combined recipe?
The result establishes that an extra reflection loop was used at evaluation.
The combined recipe outperformed reflection-only variants in the reported comparison, but the individual contribution of reflection or replay is not isolated.
Replay alone is proven to be unnecessary.
Reflection alone is proven to cause the highest score.
Core Takeaway

A lesson can teach the model what to notice, but replay keeps examples of what to do in the training mix.