Just ran an experiment with GRPO on a local Qwen 1.7B model for query rewriting using DSPy. Goal: improve document recall in a retrieval setting by optimizing rewritten queries via reinforcement learning. Baseline was 28%. Post-GRPO: 26%.
So many things in the run-up to DSPy 3. Here's a first, EXPERIMENTAL one:
🚨We're releasing dspy.GRPO, an online RL optimizer for DSPy programs
Your DSPy code as-is can be dspy.GRPO'ed. Yes, even compound multi-module programs.
Led by @NoahZiems@LakshyAAAgrawal@dilarafsoylu.
Haven't dived that deep into the other frameworks tbh, but even in that case you'd like the agent to come up with a plan once it has done its research.
The agent would plan something, discuss the plan back-and-forth with its manager (evaluator) until they arrive at a consensus and only then start executing.
Especially when your tools include write-actions.
Nice comment from Omar:
> If you try 100 random underpowered tricks and all of them lead to huge gains, but only on certain model class X, the finding is about X, not about the random tricks.
Yeah. That’s kind of where we are with RL and LLMs right now.
We're seeing small tweaks to reward functions lead to big gains, but mostly on pre-trained models that already contain the right answer somewhere deep in their sampling space. So of course RL just sharpens that distribution.
And that’s fine. That’s literally what it’s supposed to do. But if that’s the only setting we evaluate it in, we’re not really learning much about what RL can do.
I think there are two parts of the setup that matter:
1) the reward function
2) the eval environment
We're still bad at rewards outside of math and code. But the bigger issue imo is the environment. If you’re testing RL on GSM8K or MATH, the model already knows what to do. With enough sampling (pass@256, etc), the answer is already in the distribution. RL just helps you find it faster.
So you end up with models that improve but haven’t really learned anything new. But I don’t think it’s valid to then claim that “RL isn’t creating new capabilities”. That's like saying gradient descent can’t find new solutions because it starts from random weights. It’s just not how learning works.
If we want RL to learn something new, we need both:
1) better rewards outside math/coding
2) environments where the model genuinely struggles
But there’s a reason people don’t do this: getting the tasks is hard, the data is sparse, the reward func get spiky fast. So as a field we’re mostly just hill climbing on GSM8k on MATH instead.
Right now, we’re not asking RL to do much. So it doesn’t. But that’s not a failure of the method, just a reflection of the setup.
I need to read it carefully, but now this IMO is likely most deserving of "important papers in LLM RL since R1".
If you try 100 random underpowered tricks and all of them lead to huge gains, but only on certain model class X, the finding is about X, not about the random tricks!
@chaseadams Yeah workflows are much easier to evaluate. I think simulations for more agentic workflows does offer a neat solution. Have you experimented with that?
Most eval frameworks break once you move beyond I/O pairs and start building multi-turn agents.
Agents are stochastic - trying to evaluate them deterministically is the wrong abstraction. Would love to see more tooling here.
@vig_xyz Yeah pretty much.
Most customers I’ve worked with don’t reach for tools because they've outgrown their local setup, they just have no idea what their setup should look like to begin with.
I do think there’s a big opportunity for infra companies to define that eval setup.
I used an RL-inspired method to evaluate LLM agents this week.
Instead of tracking exact tool sequences, I focused on whether the agent actually achieved the goal.
Surprisingly effective, especially in multi-turn setups.
I’ve found that common metrics like “% of failed tool calls” start to lose meaning in these setups.
It doesn't take into account the stochastic nature of agents by forcing deterministic evals.
Most eval frameworks break once you move beyond I/O pairs and start building multi-turn agents.
Agents are stochastic - trying to evaluate them deterministically is the wrong abstraction. Would love to see more tooling here.
@ankrgyl Yeah, I think this holds for all multi-turn tool-using agents, tbh. % of failed calls is solid, but once agents have optional paths, evals get fuzzy fast.
Would love to see more tooling in this space, not just from Braintrust, but across the ecosystem.
Curious how far you push it though. I’ve found % of failed calls starts to lose signal in multi-turn setups.
E.g. sometimes the agent calls get_status(order_id) directly, other times it first calls get_customer_orders() to retrieve the ID.
% of failed calls breaks down here. Each permutation shifts what counts as the “correct” sequence. This just grows combinatorially as conversations grow.