AIAI EngineerJul 15, 2026· 20:32

Recursive Model Improvement — Lee Robinson, Cursor, SpaceXAI

Lee Robinson, head of ML at Cursor, explains how recursive model improvement accelerates AI training through inner and outer loops. The outer loop gathers user feedback and online metrics to refine evals, while the inner loop uses high-quality evals and difficult problems to climb performance. Composer 2.5, released in May, became Cursor's most popular model by balancing speed, intelligence, and cost. To scale, Cursor partners with SpaceX for compute via Colossus (122 days to build 100k GPUs) and develops textual feedback where a teacher model hints at improvements during RL rollouts. Robinson details reward hacking on public benchmarks and the creation of CursorBench, a private eval set. He envisions agent-based automation where researchers launch experiments from Slack and models train derivative models, creating a self-improving intelligence loop.

Transcript

Intro0:00

Please welcome to the stage the machine learning engineer, Model Behavior at Cursor, Lee Robinson.

Lee Robinson0:36

Allright. Hey everyone. I'm excited to be here, excited to be back at AI Engineer, and talk a little bit about how we're training models at Cursor. So how we train the models, and also how the model learns to train itself, or recursive model improvement.

So our goal at Cursor is to build the best possible AI models, which might make sense. You might have heard of this equation of, if we just give the models more compute, we can get a better model out.

And I think this is a helpful simplification of the problem, but I want to actually click in a few layers deeper in the talk today and talk about all the different pieces that go into training these models. So we can think about this loop.

We put a model out into the world, and then we get feedback from you all when you use the model, what goes well, or places we can improve. We use that to scale and improve the data that we do for the next round of training, and we also then increase the amount of compute and scale up training overall to make a new model.

And this is a loop that can just go over and over again. However, if you see my helpful snail, or turtle to bunny meter down in the bottomright, it's pretty slow. This is going to be a serial process, and you can only do, in this instance, one big run at a time.

Two loops1:51

Lee Robinson1:51

So we want to make this a little bit faster, but I'll actually go another layer deeper and add some more color here. There's actually two loops, the outer loop and the inner loop. On the outer loop, we have the feedback coming in, but we also have data like online metrics.

So running A/B tests and seeing what users prefer a different checkpoint of a model, that's going to then flow into hopefully making better high-quality evals that help ensure we're getting theright behaviors we want out of the model, and also being able to create much more difficult problems for the models to try to solve, where we then can kind of shape the rewards that we want to get during training.

So we want to climb that inner loop as well.

Composer 2.52:33

Lee Robinson2:33

We have been training models for about a year at the large scale at Cursor, and I want to talk about some of our progress so far. So we put out Composer 2.5 in May, and it's now the most popular model in Cursor, which is exciting.

And we scaled up training here quite a bit by generating more RL environments, trying out some new methods for learning, and also just making more ambitious problems for the models to solve. And the results have been pretty promising so far.

Like I mentioned, this is still a new effort for us. ML has really been in the blood of Cursor since the start, where we were training more specialized models for things like tab or code autocomplete. But really in the past year, we've staffed up and built a team with ambitions to train state-of-the-art models, and we've made some pretty good progress just in the last 12 months.

People like Composerright now, I think because it is both fast and pretty smart and also cost-effective. And as we've heard from other speakers today, I think there is a space in the marketright now for that type of model, in addition to also having the most intelligent models in the world.

And we think it's important to have a good selection of both of these type of things. So Composer, we think, is serving a good niche here. And when we released it, we were honestly pretty impressed with some of the public evals.

It did a little better than we expected on artificial analysis. It was a pretty modest jump. However, there were a lot of behaviors that we found that we really wanted to improve for the next version of the model.

Notably, we wanted to have a much bigger and smarter model. We wanted to control every aspect of training. So ideally, doing a full pre-train from scratch versus the previous open-source base of Kimi that we were using. We wanted to infuse new data so that we can make the model great outside of more things than just coding, but more of a general model.

And then also just scale up every part of the training process. More data, more compute, and really pushing RL as far as we can. So first I want to talk about improving the outer loop, and then we'll drill into the inner loop.

Outer loop4:35

Lee Robinson4:35

If you haven't used Cursor in a while, you might think about it as this IDE or tab autocomplete thing. And in reality, the vast, vast majority of our revenue today comes from agent usage. And that means that all of the data inside of Cursor is also coming from agent usage, and we can use that to train better models.

So for example, we kind of have two different buckets of feedback. On the external side, when you're using the product, you can thumbs up or thumbs down different responses and give feedback. And we use that to then classify places where, for example, Composer maybe doesn't do as good of a job, and we want to improve that for future versions.

And then also on the internal side, where heavy dogfooters of our models and our products were very critical and want to make sure we're using good models, and we, of course, use them all day. So we have a good mix of manual reports, automated reports internally, and just lots of ways we're trying to get the best behaviors out of the model.

And if we do that over and over and over again, we can get better models out into the world. But really the place where we can make massive speed-ups is improving that inner loop. So just to zoom back in on that again, we have these high-quality evals, we have these very difficult training tasks, and we want to climb these evals as quickly as possible so that we know if we make a new checkpoint of the model, we're actually making progress on the things that we want to measure.

Inner loop5:40

Lee Robinson5:57

So for example, some of the evals that we have introduced or have already had are things like understanding what you really meant when you have included maybe 50 skill files. It gets kind of hard for the models to figure out your actual intent.

Or trying to figure out the line between when you push back and ask the user to clarify a question versus when you trust their judgment and they said, no, I really wanted to do this. There's just kind of a fine line, and people have different preferences.

So a lot of these evals are trying to shape a lot of those different behaviors, and also model what it feels like to be a software engineer. We ask the models to do really ambitious things like, hey, we just had this cev.

Could you have actually went and read through all the Datadog logs, read through Slack, read through Notion, and came to the same conclusion or the same fix that we did? And a lot of models are just not very good at this today.

And that backs a lot of the evals that we create based off these software engineering tasks. Now, as the models get smarter, they also find very creative ways to hack the evals. So as we've been training for a new version of our model, we also noticed there was some interesting reward hacking going on.

Eval hacking6:52

Lee Robinson7:05

The models learned how to really just go back in the Git history and figure out if there was a solution or a part of a solution. They figured out good ways to go online, and if it was a public eval, just see if there was a fork of the eval anywhere they could look up the results from.

And this affected our own models as well as other models. So we did a little research here and found that if we did just a couple small changes on measuring public evals, we could have a pretty noticeable change in the scores that were reported.

So first off, we would delete the Git history at the start, and we could restore it at the end so that wouldn't affect the run. And then also we can have a network allowlist or just some basic controls on the sites that the agent can go and talk to.

And I think this is helpful for public evals, which often are the things that people are using to calibrate whether a model is good when it gets released. You see that big chart of all the benchmark numbers. But this isn't really a true test of what it feels like to use these models.

In reality, you have access to the internet. You can do whatever you want on the internet with these models, and you're definitely using Git. So you want to be able to test the true capabilities of the models. And that's why we have CursorBench.

We have this private eval set that is mostly made up of things that happen in our code base, which is held out from the eval so we ensure that the models aren't trained on it, and it's based on those real-world engineering tasks.

Now, another part of climbing that inner loop is trying to make very, very difficult problems for the models to solve. As the models get better, you might have noticed, if you're looking at an eval and all the models are scoring like 90%, it's probably time to retire that eval and try to get something more difficult.

Ambitious problems8:28

Lee Robinson8:43

And the half-life of those evals will go down as the models get smarter. And to do this, it requires a lot of things. It requires some amount of researcher taste in what these problems should be. It requires a lot of compute so you can try a lot of different ideas.

Some of them are going to work, some of them are not going to work. And there's a race against the clock here, so you want to try as many in parallel as you can. Just to put an example to this of one of those type of problems, let's say that on the left, for example, you have each one of those squares is representing files in a code base.

And then on the bottom, you have the tests. One thing you can do is generate a very complex application or environment for a very ambitious application or task, and then you can delete part of it. You can delete a feature, you can delete files, and the test will then fail.

And then you can ask these models to go and basically figure out however it wants to re-implement that feature. And it has a very verifiable goal of all the test passing to be able to get some reward back at the end.

And this actually works out pretty well and has allowed us to scale making these interesting problems for the frontier models to solve. Additionally, we have found some new learning methods, which I personally think are really interesting. The first one is you can teach the model to kind of coach itself.

Textual feedback9:53

Lee Robinson10:01

So for example, if you think about an RL rollout or a conversation with an agent, this can be hundreds of thousands of tokens. And if you think about trying to grade at the end of this where the model made aright decision or a wrong decision, that's kind of hard,right?

You have all these tool calls, you have thinking blocks. It's pretty hard to figure out where to assign that credit to the root issue. So the more precise we can be, the better. Was it one of the tool calls?

Was it a thinking block? It's pretty hard. And one thing that we've done to improve this process is something called textual feedback. So we want to zoom in on one specific part of that rollout, and ideally we can hint or kind of nudge to the model, hey, by the way, here's a way you could improve, and then look at the probabilities again and nudge up the ones we want or downweight the ones we don't want.

For example, on the left, you have this student case where you have a rollout and it tries to call a tool, and the tool call fails. It should have known that this tool was there, but it just decided not to work for this time.

We can then use a teacher. We can use the same model, but we include this hint. And we say, hey, as a reminder, you have all of these tools available. And then, like I mentioned, we can just upvote or upweight the probability such that we can get the behaviors that we want.

And this example is with adherence to tool calling, but we can really use this for anything. We can use this for making style changes. We can use this to get any behavior we want to influence the models during RL, and this has proven to be very valuable for us.

Now, how we scale these loops, both the inner and outer loops, also comes down to scaling the amount of compute we have. We announced back in March that we are partnering with SpaceX to get access to a lot more compute, and this allows us to train very large models from scratch, not only the product, but also the models down to the supercomputers or the data centers where we're training these models with Colossus, and then increasingly to the chips as well with Terrafab.

Scaling compute11:34

Lee Robinson12:01

And that just allows you to do some pretty interesting things in taking advantage of that full stack. If you haven't seen Colossus, I think it's really interesting personally. They were able to train or able to build out this supercomputer in 122 days for 100,000 GPUs, and then added another 100,000 GPUs in 92 days.

So very impressive. I had to do some pretty creative things to get this done and kind of take over this old factory in Memphis. And it's kind of shown they can stand up these data centers really quick, which is, of course, very helpful for our model training efforts.

And for Terrafab, I think it's also very interesting that they're building their own chips. I mean, to put the size of this into perspective, if you just think about how large this physical structure is, I know you're all thinking it, it's like the size of 100 Buc-ee's, which for my folks from the South, you know, we love Buc-ee's.

I'm not even from the South and I love Buc-ee's. This is like the crown jewel of the South, the premium gas station experience. It's a lot of stuff. But that just puts it into perspective, the size. So going back to this equation at the start, more compute in, you get a better model out.

Compute allocation13:06

Lee Robinson13:12

I think it's sometimes hard to understand what does that compute even do? Where do you actually put that compute? Let's say you have access to a bunch of GPUs. What do I do with it? And I think it's helpful just to step through a few of the things.

Of course, first you have actually serving the model to end users, but also you're serving up different checkpoints internally. You're running different A/B tests, you're trying different variations of the model. You have the actual training process itself, but also the sub-pieces from pre-training to mid-training to RL.

And then also, you're then training these derivative models to do other parts of the process, like climbing the inner loop, which we'll talk about here in a second. You have the data generation and the reward generation. So creating those really ambitious problems that I talked about, or when you're doing evals, trying to create these rubrics for whether it was successful or not and give it some grade, and then actually judging those scores.

You also have the evals themselves. Ideally, on every new checkpoint of the model, you want to be continuously running evals to see if you're improving in the places that you're measuring, as well as just developing new evals all the time.

Like I mentioned, the half-life of these evals, as models get smarter, you need to be really continuously investing in making these better. And there's just the research itself. Ideally, you want to free up your team of researchers to be able to tweak the knobs, to try ambitious ideas, experiment with new things, as well as do side runs.

And this all is compute that needs to be allocated for somewhere. But what that ultimately turns into is, ideally, you can get in a state where you have multiple large training runs happening at the same time, where the researchers are unblocked and they can go try their research, and you're still kind of contributing back to this core flywheel.

And if you do that, and we revisit our speed meter in the bottomright, you're starting to get to a point where you're getting something that's like RSI or recursive model improvement here, where the models are improving much, much faster.

Then the bottleneck becomes, how do you scale the folks actually training the models? How can you automate the more monotonous parts of machine learning or research so that you can get these useful models out into the world? And this is where I think it starts to get really interesting.

Agent automation15:28

Lee Robinson15:31

If you think about the model as Mario, if you give it some tools, all of a sudden you're more like a Super Mario. And if you give it great context, everything about your organization, all the places that you work, you connect it to all your different tools, that context kind of turns it into the Fire Mario or the Super Fire Mario.

And just to kind of further prove this point and add a few examples here, I think for tools, a lot of these are pretty obvious. The models can write code with a harness, they can run shell commands, they can look things up on the web.

But I think increasingly, even with these primitive versions of memory, like writing files, these last three, I think, are just starting to become really popular and more useful, which is the models and the harnesses should be able to use a computer exactly like you would.

It doesn't need to be just inside of your GUI or your CLI. It should be able to control every part of your computer. You, as a human on Slack or on your tool, is basically subscribing to Slack threads in your head so that you can follow them for updates.

Ideally, you kind of want the models to just follow a thread and then ping you if it needs something. And just like we have code bases that store the code, increasingly, as these models do more work for us, they kind of need like a Dropbox for themselves.

Where do you store the slide decks? You could put that in code, I guess, but I think there's an increasingly new opportunity here. And then for context, of course, you have all the different places you can hook up with MCPs, Slack, and Notion, Linear Data, Dog, et cetera, and the code base itself.

But I think these last two are really interesting, which is increasingly, we find that you have a human working with a team of agents, and then the agents can start working with the other agents. It's a little meta, but I think this will be a big trend in the next six months.

Just to kind of put an example to this, we've created these tools and these systems where researchers can run experiments directly from Slack. We want to avoid this state of being bottlenecked on humans launching and reviewing and babysitting runs.

And we actually have an entire team just working on automating every part of the research work that isn't freeing up the researchers' time to work on their most ambitious ideas. So every person on the ML team gets access to this fleet of agents they can basically train models directly from Slack.

And a few people on the team have taken this very far where they have these agent systems that can go and do a lot of work for them. Maybe they want to go create a bunch of very difficult problems for the models to try and solve, or they want to create a whole bunch of new evals based on some good ideas that they have.

And they just want to let the models cook and go work for a while. But if something gets wrong, if the infrastructure goes down, if there's some blip somewhere, the model can message them on Slack or just page them directly and say, hey, this is really important.

You don't want to lose six hours because your infra was down. You should go check this outright now. And this human-to-agent coordination, I think, is just starting to be figured out, and it will be an increasing trend. The last bit here is that the model is learning to train the next model.

Recursive improvement18:30

Lee Robinson18:36

And it's a little hard to wrap your brain around. The way I like to think about it is every time you release a new version of this intelligence, then you can create or distill these derivative versions that you use to speed up other parts of the training process, both the inner loop and the outer loop.

So when you're trying to do your evals, for example, you have different models for doing the judging, and you have your reward models as well. So when you make the top-level model smarter, it actually improves the whole system.

If you think about the multiple training runs diagram I showed, I'm going to throw on a new meter here, which is the brain-to-galaxy brain meter, or the intelligence meter. You are bottlenecked here on the smartest model in your system.

And if the smartest model then creates those derivative models, when you can improve that, you can actually make every single one of these loops much, much better because you've raised the kind of floor of the intelligence. And this is how you start to get to something that feels like this recursive self-improvement, this model that is just improving all the time on your behalf.

And especially as we bring more and more compute online, I think this is really going to help us scale our model efforts and hopefully make even more useful models for you all to use. To conclude, I'd just like to thank everyone on the Cursor engineering and ML and research teams who have been working hard to get a new model out to you all here very soon, hopefully very, very soon, that we think will be a pretty notable improvement over our last model, and we're excited for you to try it.

Thank you so much.