In the previous tutorial, you set up NeMo Gym and ran your first agent interaction. But to train an agent with reinforcement learning, you need hundreds or thousands of these interactions—each one scored and saved. That’s what rollout collection does.
Goal: Generate and view your first batch of rollouts.
Time: ~10 minutes | Cost: ~$0.05 (OpenAI API)
In this tutorial, you will:
Make sure you have:
env.yaml configured with your OpenAI API keyWhat’s in a rollout? A complete record of a task execution: the input, the model’s reasoning and tool calls, the final output, and a verification score.
Look at the example dataset included with the Example Single Tool Call resources server:
Each line contains a responses_create_params object with:
If you still have servers running from the Detailed Setup Guide tutorial, proceed to the next step.
If not, start them again:
✅ Success Check: You should see 3 Gym servers running including the example_single_tool_call_simple_agent, along with the head server.
In a separate terminal, run:
Today’s LLM endpoints are not fully deterministic, which means that running the same request multiple times will yield different results every time. However, you can improve the reproducibility of your rollouts by setting the temperature parameter to 0.0. For example:
However, using temperature=0.0 may result in degraded performance in certain use case scenarios. If temperature is not set, the default temperature for that model endpoint will typically be used, which has been tuned to fit the average use case scenario.
Using temperature=0.0 will still not guarantee the same result when running the same request multiple times, but it will reduce the output variance considerably.
✅ Success Check: You should see:
Each rollout row should contain:
Congratulations! You now have a working NeMo Gym installation and understand how to generate rollouts. Choose your path based on your goals: