RL Training Notes (2): From SFT to RL — Data Selection and Adaptive Sampling
Finding valuable RL tasks in limited SFT data, and letting the sampling distribution move with the policy.
Contents
Ideally, agentic RL training should use tasks designed specifically for it: meaningful, challenging, and paired with interactive environments and reliable verifiers. In practice, however, such data is never abundant. In agentic settings especially, writing a question and a reference answer is far from enough — environments still need to be built, success criteria defined, and the evaluation has to be able to tell whether the agent actually completed the task.
So when the supply of RL-native data cannot keep up, a natural fallback is to look for reusable tasks in existing SFT data.
But there is an easily overlooked distinction here: SFT and RL have different data needs. SFT values scale and task diversity, aiming to cover as many task types and capability dimensions as possible — datasets can reach T-scale tokens. RL, by contrast, relies more on the quality and difficulty of individual tasks. A few thousand carefully designed, challenging tasks with reliable verifiers can provide more training signal than massive amounts of generic ones.
In other words, good SFT data is not necessarily good RL data. The real problem is not just picking a batch of tasks out of existing data, but judging which tasks can provide effective learning signals for the current RL run. This post documents some practice along that line: how SFT data gets filtered, why static filtering is not enough, and how task sampling can adapt as the policy changes.
1When High-Quality RL Data Is Not Available
First, what does an RL task actually require?
For RLVR, a usable task needs at minimum a clear instruction, an executable environment, and a verifier that can judge whether the task is complete. For coding agents, running tests often suffices; but in more complex agentic settings — multi-turn interaction, tool calls, changing environment state — verifying that a task was truly completed is itself an engineering problem.
This is also why high-quality RL data cannot simply be collected from existing questions. SFT data typically comes as "task + reference solution", which works well for teaching a model how to solve tasks, but that does not mean it is naturally suited for RL rollouts. A correct reference answer does not imply the task is challenging; an interesting task does not imply the model's correctness can be reliably judged.
So reusing SFT data is not just running the original samples through rollouts — every task has to be re-examined against RL's requirements.
In practice, after strict filtering, only about 1%–2% of the data survives. That ratio is certainly not universal, but it shows that finding genuinely usable RL tasks in SFT data is usually far stricter than expected.
2How to Filter: Five Dimensions, One Funnel
So how do we judge whether an SFT task is suitable for RL?
Five dimensions are checked:
| Dimension | What We Check | Typical Failure Modes |
|---|---|---|
| Task validity | Is the instruction clear, the goal well-defined, and the task executable in the target environment? | Vague instructions, unavailable dependencies, or bugs in the task itself |
| Verifier reliability | Does the verifier cover enough cases, and can the reward truly distinguish completion from failure? | The agent finds a shortcut that fools the verifier without actually completing the task |
| Data freshness | Could the model have seen the original task and answer during pretraining or earlier training? | Public repos or common benchmark items — rollout success may come from memorization rather than real problem-solving |
| Difficulty & coverage | Is it challenging enough, and does it cover different capability dimensions and difficulty levels? | Many similar easy tasks — large volume, but limited actual training signal |
| Human audit & downstream validation | Read tasks, sample trajectories, and verify through training whether the model truly improves and generalizes to OOD | Relying only on static data metrics while ignoring real training effects and distribution-level issues |
Verifier reliability and data freshness deserve special attention.
For an agent, the direct objective is obtaining reward, not necessarily completing the task the way we intend. If verifier coverage is insufficient, the agent may find solutions that look rewarded but actually bypass the task itself. Data contamination is another concern: if the model has already seen questions or answers from public repos, a successful rollout does not prove it can actually solve this class of problems.
Beyond automated checks, tasks and trajectories also get manual review. Many problems are not visible from the data alone — only by watching what the model actually does can we judge whether a task is reasonable and the verifier reliable. Finally, downstream training has to validate the result: did these tasks actually improve capability, especially on OOD evaluation?
The whole filtering process can be understood as a funnel:
However, filtering mainly answers whether individual tasks are qualified. Even if every surviving task looks fine, that does not mean they form a good training task pool. Once rollouts actually begin, it becomes clear: passing quality checks is only the first step — the difficulty distribution of the whole pool matters just as much.
3Why Static Filtering Is Not Enough: The Two 8s in k/8
To observe the pool's actual difficulty distribution, the setup runs 8 rollouts per task and records the number of successful rollouts as k/8 for the current policy.
There is also an algorithmic detail involved. Training uses CISPO with within-group relative learning signals. For a given task, if all 8 rollouts produce the same outcome, there is no relative difference within the group. As a result, both 0/8 and 8/8 tasks are filtered out before reaching the trainer.
Yet although neither can provide useful learning signal in the current rollout batch, the reasons are completely different:
- 8/8: the policy has likely already mastered this task. More sampling brings little marginal gain.
- 0/8: the task may simply exceed the current policy's capability, but that does not mean it is worthless — it can become solvable as the model improves.
- 2/8–4/8: mixed success and failure create within-group variation, usually providing the most informative learning signal.
Looking at the filtered task pool, a fairly clear pattern emerges: high-success-rate tasks are relatively common, while genuinely challenging coding tasks are scarce to begin with and even rarer after filtering. The difficulty distribution therefore drifts toward the easier side, leaving tasks in the middle learning zone as a minority.
One caveat needs care: observed success rate is not the same as true task difficulty. A task that shows mixed results like 2/8 or 4/8 does not necessarily have the right difficulty — environment instability or verifier flaws can make rollouts flaky. Success rate alone cannot be equated with task difficulty or learning value.
More troublesome than the initial skew is that a task's success rate is not fixed. As the policy strengthens, tasks that were once 2/8–4/8 gradually become 8/8. In other words, a task that is valuable early in training does not necessarily carry the same value later on.
If sampling always follows the initially filtered task pool uniformly, tasks the model has already mastered will occupy an ever-larger share of the rollout budget. This is especially costly in agentic RL: a single rollout can take tens of minutes or even hours, while a trainer update takes only seconds to a few minutes. Spending that much inference compute on tasks that are already solved reliably is expensive.
This means static filtering can only produce a reasonably good initial task pool — it cannot guarantee the pool stays suitable for a policy that keeps changing. Since a task's learning value shifts with model capability, the sampling strategy has to shift as well.
4Dynamic Curriculum Sampling: Letting the Distribution Follow the Policy
Building on this observation, a natural next step is to dynamically adjust task-level sampling weights instead of fixing the entire training distribution after filtering.
The idea is actually quite direct: for the current policy, whether a task can provide useful learning signal changes over the course of training. Sampling frequency therefore needs to track recent rollout outcomes.
Concretely, each task still gets 8 rollouts, and the recent k/8 result drives its sampling weight:
- 8/8: lower the sampling frequency. Tasks the model can already complete reliably do not need to keep consuming rollout budget.
- 0/8: also lower the frequency, but keep the chance of being resampled later. Failing now does not mean the model will never solve it.
- Mixed results: keep normal sampling. These tasks can still provide within-group relative learning signal.
The point is not simply to prioritize hard tasks, but to allocate training compute to tasks that can still provide useful learning signal at the current stage. Mastered tasks see less repeated investment; currently unsolvable ones are not abandoned forever either — they keep a chance to be revisited.
Compared with uniform task sampling, dynamic sampling produced better training reward and evaluation performance, and training loss was also lower. One possible explanation is that the model encountered more tasks that were still worth learning from at each stage of training. That said, this is only an interpretation of the observation — it does not establish direct causation.
Another interesting effect appeared at evaluation: average rollout length dropped by roughly 50%. Since no token penalty was added to the reward or loss, this was not achieved by explicitly penalizing long trajectories. A plausible explanation is that the model reduced repeated attempts, useless tool calls, and looping behavior, completing tasks with shorter trajectories. If that holds, the benefit of adapting the training distribution goes beyond solving more tasks — it may also encourage more efficient problem-solving behavior. Of course, this still needs further diagnosis to confirm.
5Beyond Filtering: Building High-Quality RL Data
At this point, a batch of RL tasks has been filtered out of existing SFT data, and dynamic sampling helps them keep up with the evolving policy. That does improve the utilization of existing data, but it does not solve the original problem: high-quality RL data is still scarce.
Both filtering and sampling operate on existing data; their ceiling is ultimately set by the source data. If certain capability dimensions are missing from the data source, or challenging-enough tasks are lacking, no amount of clever filtering or sampling can conjure them up.
So in the long run, resources still need to go into building RL-native data directly rather than relying indefinitely on SFT filtering — for example, acquiring tasks from professional domains like finance that have real business grounding and well-defined verification criteria; systematically constructing coding and agentic tasks; and investing enough people into task design, manual review, and environment and verifier construction.
This also means data construction should not chase sample count alone. What is needed is a set of tasks covering different capability dimensions at reasonable difficulty levels — tasks that can keep providing useful learning signals even as the model keeps improving. The future direction of RL data scaling should be quality-driven, not merely quantity-driven.
Better filtering and sampling let existing data be used more fully; but to truly raise the ceiling of model capability, the work ultimately has to go back to the source and build high-quality tasks.
6Insight: Filtering Is a Means, Learning Signal Is the Goal
Looking back at this body of work, three takeaways stand out.
- Good SFT data is not necessarily good RL data. Individual tasks need strict quality checks, and the distribution of the whole task pool matters just as much.
- Static filtering only provides an initial distribution. As the policy strengthens, both success rates and learning value shift, so sampling needs to adapt to rollout outcomes dynamically.
- Filtering and sampling are ultimately transitional. To keep pushing the capability ceiling of agentic models, high-quality RL tasks still have to be built from the source.
Stepping further back, the real bottleneck for high-quality RL data may not just be engineering — it is domain knowledge.
Vertical scenarios like financial risk control, legal compliance, scientific research, and industrial control contain plenty of real problems worth teaching a model. But what counts as challenging enough, what counts as a reasonable outcome, and when a reward should be given — these judgments typically require domain experts. Experts do not just propose tasks; they also define rewards and professional acceptance criteria. The source of high-quality RL data ultimately comes from this kind of real domain knowledge.
In this pipeline, the post-training researcher acts as the middle layer connecting domain tasks to model training. Domain experts propose problems, design tasks, and set professional standards; researchers integrate those tasks into a unified environment and RL training pipeline, and continuously monitor metrics and trajectories during training to judge whether the model has actually learned the intended capability.
But this division of labor may change. Unifying task formats, building environments and verifiers, organizing rollouts, and analyzing training metrics and model behavior — much of the work researchers currently do by hand may gradually be taken over by AI. The researcher's role may shift from hands-on executor to organizer and supervisor of the whole training process.
And there is a somewhat self-deprecating possibility here: post-training researchers are themselves experts in the AI domain — except that with the help of RL, they might become the first domain experts to be automated by AI. In a sense, that is already an early form of RSI.
Meanwhile, the importance of domain experts may rise further. No matter how automated the training pipeline becomes, the system still needs people who can pose worthwhile problems and judge whether the model's outputs hold up in the real domain.
Ultimately, the ceiling of RL training depends not only on algorithms and compute, but on whether we can continuously turn real domain knowledge and judgment into reliable learning signals.