Will describes agents as models that reason while using tools to act on the outside world. He recommends improving prompts and the task setup first, then using fine-tuning when more performance is needed. Agent RFT trains model weights using a specified reward, while the agent explores different tool-use strategies.
Agent Reinforcement Fine Tuning
Speakers
Will Hang and Cathy Zhou, who work on OpenAI’s fine-tuning team, explain Agent Reinforcement Fine-Tuning and share coding-agent examples from Cognition, Codota, Cosine, and Mosaic on the AI Engineer channel.
Agent RFT lets models call tools hosted on public endpoints during training and invokes a custom reward endpoint after each rollout. Will says it can adapt a model to a business environment, improve tool use, and reduce latency by rewarding agents that stay within a tool-call budget. Each rollout gets a UUID so tool calls and the final answer can be tied together for grading.
Cognition trained Devin to select files for code edits, rewarding file selection with F1; its improvement rose from five points on about 100 examples to 10 points on 1,000, and parallel tool calls cut a workflow from eight to 10 steps to four. Codota trained GPT-5 on about 1,000 question-answer pairs from eight repositories, improving performance by 6% while reducing tool calls and output tokens. Cosine used a strict test-based grader and checks for code quality, while Mosaic trained GPU kernel generation on about 100 PyTorch prompts and added checks to catch reward hacking.
Will advises using a well-defined task and training and evaluation data that reflect production traffic. The model should show variation across attempts, with some rollouts doing better than others so it can learn from the reward. He also recommends closing reward loopholes and using continuous rewards where possible; Mosaic, for example, scored kernel correctness and speedup after adding checks against hacked outputs.
Takeaways
- Improve prompts and tool setup before fine-tuning; use RFT when those changes are not enough.
- Build training and evaluation datasets that match real production tasks and inputs.
- Define measurable rewards, check for loopholes, and grade the outcome that matters, such as tests passing or files correctly selected.
- Track tool-call counts and latency alongside accuracy; RFT may reduce long, inefficient trajectories.
- Provide enough high-quality examples and sampling compute for the model to discover successful approaches.
Mentioned in this talk
Search inside this talk
What was claimed 13
- works atCathy Zhou works at
OpenAI“we're on the fine-tuning team at OpenAI”
YouTube Verified2 sources· Talk, Web· archived
- works at
“we're on the fine-tuning team at OpenAI”
YouTube Verified2 sources· Talk, Web· archived
- featureReinforcement fine-tuning: Changes model weights according to a specified learning signal to teach good and bad agent behavior.
“changes the model's weights according to a learning signal that you specify”
YouTube Unverified1 source· Talk
- metricReinforcement fine-tuning: Some users succeeded with as few as 10 examples.
“literally as few as 10 examples”
YouTube Unverified1 source· Talk
- featureReinforcement fine-tuning: Allows models to call customer tools via public internet endpoints and invokes a custom reward signal endpoint after each rollout.
“call your tools via your endpoints hosted on the public internet”
YouTube Unverified1 source· Talk
- featureReinforcement fine-tuning: Can reduce latency by training an agent to stay within a tool call budget.
“the model learns to stay within the budget”
YouTube Unverified1 source· Talk
- uses
“Cognition, who used agent RFT in their code edit planning phase”
YouTube Unverified1 source· Talk
- metricCognition: Fine-tuning on around 100 examples yielded a five-point improvement; scaling to 1,000 examples raised the improvement to 10 points.
“when they scaled to 1,000 examples, the improvement jumped to 10 points”
YouTube Unverified1 source· Talk
- metric
Cosine: Trained on a comprehensive set of 30 tools.
“train the agent on a comprehensive set of 30 tools”
YouTube Unverified1 source· Talk
- uses
“how Cosine builds coding agents ... with Agent RFT”
YouTube Unverified1 source· Talk
- metricMosaic: Trained GPT-5 to write fast kernels using about 100 PyTorch prompts.
“using only about 100 PyTorch prompts”
YouTube Unverified1 source· Talk
- uses
“With Agent RFT, Mosaic trained GPT-5”
YouTube Unverified1 source· Talk
- metricMosaic: Beat the state of the art by 72% by running three samples and selecting the best.
“They ran three different samples and took the best one. This allowed them to beat the state of the art by 72%.”
YouTube Unverified1 source· Talk









