Reinforcement studying (RL) is central to aligning language fashions, from reinforcement studying with human suggestions (RLHF) inside AI assistants to newer reinforcement studying with verifiable rewards (RLVR) workflows for reasoning and agent duties.
RL is now turning into a sensible method for specialised AI the place enterprises want extra correct brokers for domain-specific workflows. Open fashions present extra management over information, IP, and deployment, whereas RL turns area success standards into coaching alerts.
Frontier labs have proven RL can enhance normal mannequin capabilities. OpenAI educated their o-series fashions with large-scale RL, and DeepSeek-R1 confirmed how group relative coverage optimization (GRPO) and verifiable rewards enhance math, code, and reasoning habits.
NVIDIA Nemotron 3 Tremendous was post-trained utilizing multi-environment RL throughout 21 NVIDIA NeMo Health club verifiers and 37 datasets, producing about 1.2 million surroundings rollouts.
This information helps model-builders, analysis groups, and agent builders resolve when to make use of RL and the right way to run a primary verifiable RL coaching loop for long-running brokers.
Why RL issues for brokers
Organizations want specialised brokers for workflows comparable to safety triage, scientific discovery, CLI automation, buyer assist, information evaluation, and inner device use. Customizing open fashions like Nemotron makes this sensible. Groups can specialize for accuracy and velocity whereas conserving management over information, IP, and deployment.
Prompting, RAG, and instruments can get you far. Consider the mannequin because the agent’s mind, the agent harness as its physique, and instruments because the workspace it might act in. Bettering the harness or including instruments may also help, nevertheless it doesn’t at all times change mannequin habits. If the agent repeats tool-call errors, fails in lengthy workflows, codecs outputs incorrectly, or chooses the improper technique, you want a coaching sign. That’s the place RL matches.
RL helps you to outline success, generate makes an attempt, rating them, and replace mannequin weights so profitable habits turns into extra seemingly. In agentic techniques, that reward can come from a verifier: code that scores outputs or trajectories utilizing exams, device execution, schema validation, simulators, reward fashions, LLM-as-judge evaluation, human choice labels, or different task-specific suggestions.


Nemotron, NVIDIA NeMo RL, and NVIDIA NeMo Health club present open fashions, post-training workflows, and surroundings infrastructure that work with ecosystem instruments comparable to OpenRLHF, PrimeIntellect, SGLang, Unsloth, veRL, and vLLM.
RAG, prompting, SFT, and RL: When to make use of what
Keep away from beginning with: “Which algorithm ought to I take advantage of?”
Begin with: “What habits do I need to improve, and the way will I measure it?”
Right here is an instance choice matrix:
SFT vs DPO vs RLVR vs RLHF
Use SFT when you’ve got demonstrations of desired habits, comparable to instruction following, multi-turn conversations, output schemas, tool-call codecs, or area workflows.
Use DPO when you’ve got choice pairs, the place one reply is healthier than one other.
Use RLHF when nuanced human preferences can’t be captured by guidelines and you may assist choice information, reward fashions, and cautious coaching infrastructure.
Use RLVR when correctness could be checked algorithmically, comparable to legitimate JSON, appropriate CLI instructions, passing exams, precise math solutions, profitable device calls, or simulator outcomes.
The most effective technique relies on the sign you’ve got. For verifiable tool-use and agent workflows, a standard beginning path is: SFT if wanted → GRPO with verifiable rewards → consider → examine failures → repeat.
GRPO is an efficient default for RLVR or verifiable duties
For RLVR workflows, GRPO is usually sensible to begin with. It generates a number of completions per immediate, scores them with a verifier, and updates the mannequin primarily based on relative efficiency throughout the group. In contrast with PPO-style RLHF, GRPO has fewer shifting components and works naturally with rule-based rewards, turning into a default for a lot of agentic RL examples.
Newer variants proceed to emerge as RL coaching techniques mature. For instance, dynamic sampling coverage optimization (DAPO) builds on GRPO with dynamic sampling and uneven clipping to protect helpful studying sign and exploration variety, whereas group sequence coverage optimization (GSPO) optimizes on the sequence degree as a substitute of the token degree to enhance coaching stability, particularly for Combination-of-Consultants (MoE) fashions.
The remainder of this information focuses on a sensible RLVR workflow utilizing GRPO and environment-based analysis.
The minimal RL loop
An RL coaching run for LLMs or brokers has seven components:
Coverage mannequin: the mannequin you might be coaching
Job: the enter the mannequin receives
Motion: the mannequin output, device name, code patch, command, or multi-step trajectory
Atmosphere: the system that executes the motion and supplies suggestions
Verifier: the sign that scores success or produces rewards
Rollouts: sampled makes an attempt from the present mannequin
Coverage replace: the coaching step that will increase the chance of higher outputs
This RL 101 Glossary supplies an in depth understanding of every element and the way they work collectively.
Begin with analysis earlier than coaching. Run the present mannequin on a held-out job set, examine failures, and profile the verifier or reward operate earlier than updating weights. RL works finest when the mannequin can generally produce the best habits however doesn’t achieve this reliably. If the reward is improper, RL will optimize the improper habits.
The frequent challenges that builders face with RL are round information, surroundings design, reward design, and compute selections.
Job and coaching information
For SFT, you want input-output examples that train the mannequin the specified habits. For RLVR, you want duties, surroundings logic with verifiers and instruments that may rating outputs. Artificial information era helps broaden protection when actual examples are sparse: generate job variants, edge instances, tool-call eventualities, and anticipated outputs, then filter them with validators, reward fashions, or LLM-as-judge evaluation.
NVIDIA NeMo Information Designer may also help generate structured job datasets from scratch or seed information, management relationships between fields, batch era, and validate outputs towards specs. NeMo Health club can then run these duties by environments to generate scored trajectories from fashions or instructor brokers, which can be utilized for SFT demonstrations, choice pairs, or RL rollouts.
Artificial information just isn’t floor reality. Hold a small human-quality seed set, deduplicate aggressively, maintain out eval duties, and examine failure instances earlier than utilizing as coaching information.
Agentic RL wants environments, not simply datasets
For easier single-turn duties, a static dataset could also be sufficient:
For agentic RL spanning throughout single-step/flip, multi-step, and multi-turn workflows, you want an surroundings defining the:
Dataset
Agent Harness
Verifier
State
For instance, a long-running coding agent may have many device calls earlier than exams cross; an information evaluation agent may have to examine information, run queries, generate charts, and validate outcomes; a scientific agent may have to look literature, name simulators, and revise hypotheses.
The surroundings could be easy or complicated: a parser plus reply checker for math, unit exams for code era, or a sandbox with instruments, information, flip limits, and task-specific success standards for long-running brokers.
Evals and environments are two sides of the identical system. eval conveys whether or not the mannequin succeeded, and a superb RL surroundings turns that sign into coaching information.
NeMo Health club supplies a scalable, reproducible option to construct environments that join brokers, fashions, exterior techniques, instruments, and verifiers, with tutorials for single-step, multi-step, stateful, real-world, and LLM-as-judge environments.


Reward and verifier design: Begin easy
Reward design is the place many RL tasks get overcomplicated.
Begin with the best reward that proves the loop works. For RLVR, this will begin with binary: +1 if the output passes the verifier, 0 in any other case
Add intermediate alerts solely once they measure actual progress. For a coding agent, it may very well be
+0.1 chosen the best device+0.2 produced legitimate intermediate artifact+0.3 handed partial check+1.0 accomplished task-1.0 unsafe motion
An excessive amount of shaping can train the mannequin to optimize the guidelines as a substitute of the duty. Good reward features have three properties:
They measure the actual job.
They’re exhausting to sport/hack.
They fail visibly when improper.
Earlier than coaching, run your reward operate towards 50-100 mannequin outputs and examine the scores manually. If the reward disagrees along with your judgment, repair the reward.
Compute: Funds for coaching and rollouts
RL value comes from two workloads: rollout and coaching. Each are affected by batch measurement, mannequin measurement and sequence lengths. Rollout value particularly scales with variety of device calls, dialog turns and surroundings steps. Inference software program comparable to vLLM improves rollout latency whereas NeMo Health club improves device calls orchestration.
Alternately, coaching value scales with dataset measurement and variety of coverage updates. Coaching software program comparable to Megatron and NeMo Automodel enhance throughput. RL frameworks comparable to NeMo RL construct on high of those inference and coaching softwares, enabling an environment friendly loop for optimum mannequin studying.
GPU wants range by workload. A small adapter-based ~1B-8B experiment can begin on a single trendy GPU or small multi-GPU node. Bigger fashions, full fine-tuning, long-context duties, excessive rollout counts, or multi-step agent environments want a number of GPUs. When compute is proscribed, cut back mannequin measurement, max tokens, generations per immediate, and parallel environments first.
For early experiments, begin small. Smaller fashions excel at debugging information, verifiers, environments, and coaching loops. Advanced duties want a extra succesful mannequin earlier than the reward curve or held-out evals present significant enchancment.
A sensible first RL coaching run is small, verifiable and inspectable
Let’s construct a office assistant-style agent that generates appropriate JSON device calls from natural-language requests:
First, pipe-clean the setup with the NeMo RL getting-started instance.
Then transfer to a multi-step instance such because the NeMo RL and NeMo Health club Office Assistant tutorial, which trains Nemotron Nano 9B v2 with GRPO for tool-calling throughout project-management workflows. We’ll begin with a easy one-step device use job which could be prolonged to multi-step environments too.
Step 1: Decide one habits
Select one habits for computerized analysis.
Instance: Given a natural-language request, produce the proper JSON device name for an inner CLI or API.
“immediate”: “Create a calendar occasion for Alex subsequent Tuesday at 2 PM.”,
“expected_tool”: “calendar.create_event”,
“expected_args”: {
“attendee”: “Alex”,
“day”: “Tuesday”,
“time”: “14:00”
}
}
Step 2: Run a baseline eval and classify failures
Put together separate coaching and validation job information earlier than coaching. Run the baseline mannequin on the validation set and measure legitimate JSON price, appropriate device or command price, appropriate argument price, execution success price, and unsafe motion price.
Then examine outputs and group failures by kind: format errors, improper device or command, inconsistent success, unsafe actions, or long-horizon failures. Verify the mannequin has a measurable failure sample earlier than coaching.
This tells you which ones coaching technique to make use of.
Step 3: Resolve whether or not SFT is required
If the mannequin hardly ever follows the anticipated format or device household, begin with SFT. If it might generally succeed however is inconsistent, transfer to RLVR with GRPO.
A sensible path is:
SFT for format and job understanding
RLVR with GRPO for reliability enchancment
Held-out evals earlier than deployment
Step 4: Construct the verifier or reward operate
As soon as RL is the best subsequent step, flip your eval logic right into a reward operate. Begin easy and deterministic.
if not is_valid_json(output):
return -1.0
parsed = json.hundreds(output)
rating = 0.0
if parsed[“tool”] == anticipated[“expected_tool”]:
rating += 0.4
rating += 0.4 * argument_match(
parsed[“args”],
anticipated[“expected_args”]
)
if executes_safely(parsed):
rating += 0.2
return rating
Run this verifier towards pattern outputs earlier than coaching. If the reward disagrees with what you’d contemplate appropriate, repair the verifier first.
Step 5: Run a small GRPO job
Begin with a small mannequin or adapter-based run. Hold the primary run deliberately slender.
algorithm: grpo
adapter: lora
num_generations_per_prompt: 8
reward: tool_call_verifier
eval_interval: 10
held_out_eval: tool_call_eval
Step 6: Observe the best metrics
Don’t solely monitor coaching rewards. Observe validation reward, success price, invalid outputs, unsafe actions, latency, and value. See if validation reward or accuracy enhance over the baseline on duties the mannequin didn’t prepare on.
Step 7: Examine failures and promote rigorously
Pattern outputs at each checkpoint. Search for reward hacking, formatting regressions, unsafe actions, or instances the place reward improves however actual high quality will get worse. Ship solely after the tuned mannequin beats the baseline on held-out evals with out regressing on security, latency, or normal functionality checks.
Steady enchancment for long-running brokers
A protracted-running agent ought to enhance like a software program system. Use RL as a sensible loop for repeatedly bettering a production-grade agentic workflow:
Log actual trajectoriesCapture prompts, device calls, observations, outputs, failures, human interventions, and ultimate outcomes.
Convert failures into evalsEvery manufacturing failure ought to grow to be a regression check or surroundings job.
Bucket failure modesSeparate format errors, improper device alternative, dangerous planning, unsafe actions, retrieval failures, hallucinated APIs, and incomplete execution.
Select the lightest fixPrompt or device change first. SFT for repeated format or area habits. DPO for choice high quality. RLVR/GRPO when you may confirm success.
Prepare on held-out tasksKeep a set eval set that the mannequin by no means trains on. Add recent duties repeatedly.
Promote provided that habits improvesCompare baseline vs tuned mannequin on success price, security failures, value, latency, and regression exams.
Hold tuned fashions versionedFor agent specialization, model every tuned checkpoint or adapter so you may examine habits, roll again safely, and keep away from overwriting the bottom mannequin.
The output of this loop is an agent flywheel: manufacturing failures grow to be evals, evals grow to be environments, environments generate rewards, rewards enhance the mannequin, and the subsequent mannequin is examined earlier than deployment.
Get began with reinforcement studying for LLMs and brokers
The shortest path to a helpful RL run is a transparent job, a reliable verifier, a small baseline mannequin, and a held-out eval that tells you whether or not the mannequin really acquired higher.
Prepared to use RL to your individual fashions and brokers? Speed up growth with NVIDIA NeMo and Nemotron:
These instruments assist builders transfer from job definition and information era to coaching, analysis, and optimization with out rebuilding the complete RL stack from scratch.

