Explores recursive language models as a solution to context rot in LLMs, showing improved accuracy and efficiency on long-context tasks.
Ask about this video. Answers come from its transcript only — with the timestamp, so you can check them.
Generated from the transcript and can be wrong — check the timestamp.
Key Takeaways
- Recursive language models solve context rot by querying context as variables rather than pasting all input.
- RLMs enable handling of extremely long documents efficiently and with higher accuracy.
- This method spawns multiple child agents to parallelize context processing and avoid attention bottlenecks.
- RLMs have been validated on multiple benchmarks, outperforming larger models reading full context.
- The approach has rapidly moved from academic research to a billion-dollar commercial product.
What the video covers
- A GitHub repository implementing a recursive language model (RLM) recently trended with 10,000 stars and nearly 1,000 forks.
- RLMs address context rot, where increasing input length degrades model accuracy due to attention limits.
- Instead of feeding all input tokens at once, RLMs assign long inputs to variables in a live Python session and query them recursively.
- This approach enables models to handle extremely long contexts by spawning child agents with separate contexts.
- Benchmarks show RLMs outperform traditional models on long-context tasks, with GPT-5 Mini in an RLM harness beating plain GPT-5 by up to 34 points.
- RLMs reduce query costs and scale to millions of tokens without typical performance collapse.
- An 8B parameter model fine-tuned on recursive trajectories improved by 28% over its base and approached GPT-5 performance.
- The idea originated from a 2025 MIT PhD student's blog post and ArXiv paper, later commercialized by Prime Intellect.
- Prime Intellect raised $130M Series A and launched Prime Agent, a flagship product using RLM technology.
- The video highlights the paradigm shift from static prompts to dynamic variable-driven context querying.
Chapters
- 00:00Introduction and Context Rot Problem
- 01:05The Concept of Recursive Language Models
- 02:09How Recursive Models Query Context as Variables
- 03:02Benchmark Results and Performance Gains
- 04:11Prime Agent and Real-World Application
- 05:16Comparison with Other Models and Cost Efficiency
- 06:24Training Recursive Models and Scaling
- 07:56Origin Story and Commercialization
- 09:16Conclusion and Future Directions
Full Transcript — Download SRT & Markdown
Speaker A
Four days ago, a repository that had been sitting on GitHub since May went to number one on trending. 10,000 stars on it now, nearly a thousand forks, and an MIT license, so you can read every line of it. It is not a model. There are no weights anywhere in it. It is a harness, the loop that wraps a model. And its headline claim is that it beat human experts on a benchmark designed to resist exactly this kind of trick. That claim is the smaller story. The bigger one is the idea underneath it and where that idea came from. Because the last video on this channel ended on a thread that was deliberately left hanging, and this is it. It was about context rot.
Speaker A
weights anywhere in it. It is a harness, the loop that wraps a model. And its headline claim is that it beat human experts on a benchmark designed to resist exactly this kind of trick. That claim is the smaller story. The bigger
Speaker A
The measured repeatable fact that giving a model more input makes its answers worse. Chroma put 18 Frontier models through it in a 2025 study and watched accuracy fall long before any window filled. A 200,000 token window already degrading around 50,000. That is storage, not comprehension. That video pointed at one research idea and said the direction was right, but that nobody had shipped it. Four days ago, it shipped. So, this video is that answer.
Speaker A
The measured repeatable fact that giving a model more input makes its answers worse. Chroma put 18 Frontier models through it in a 2025 study and watched accuracy fall long before any window filled. A 200,000 token window already degrading around 50,000. That is
Speaker A
And the answer turned out stranger than I expected. The idea is called a recursive language model. The whole thing turns on one word, and the word is variable. Here's what happens today.
Speaker A
And the answer turned out stranger than I expected. The idea is called a recursive language model. The whole thing turns on one word and the word is variable. Here's what happens today.
Speaker A
When you hand a model something long, all of it becomes tokens inside one window, and every token competes with every other token for the same finite pool of attention. Chroma measured that decay and said plainly it could not explain the mechanism, but the room is still there. What runs short is attention. A recursive language model refuses the paste. The long input never enters the model's context at all. It gets assigned to a variable inside a live Python session, and the model is handed the variable name. So the root model starts the task effectively blind. It cannot see the document, the repository, the transcript. What it can do is write code that touches them. Say the input is a codebase. The model writes a line of Python, list every file, keep the ones over 10 kilobytes, print the first 200 characters of each. The session runs it and returns that, not the codebase. It now knows the shape of a thing it has not read, which is enough to decide what to look at next. And that decision is where the recursion starts.
Speaker A
explain the mechanism, but the room is still there. What runs short is attention. A recursive language model refuses the paste. The long input never enters the model's context at all. It gets assigned to a variable inside a live Python session and the model is
Speaker A
In Prime Agent, the recursive call is an ordinary Python function. You hand it a task in plain English and a name, and it spawns a child agent with its own model, its own kernel, and its own empty context. Review the authentication flow for security issues. Name it O Reviewer. The call returns immediately, not with an answer, with a handle. The child works somewhere else and replies by message when it has something. So the parent can fire off an API review, a test coverage review, and a slow integration audit in three lines, end its turn, and go do something else while three separate contexts fill up instead of one. That is the whole inversion.
Speaker A
writes a line of Python, list every file, keep the ones over 10 kilob, print the first 200 characters of each. The session runs it and returns that, not the codebase. It now knows the shape of a thing it has not read, which is enough
Speaker A
Context stops being something the model drowns in and becomes something it queries. The prompt is not a prompt anymore. It is a variable, which sounds elegant, and elegance is cheap. The real question is whether a model that never read the document can beat a model that did. The paper's answer runs on four long context benchmarks. The clearest is O Long, where the questions cannot be answered by finding one line. You have to aggregate across the whole document.
Speaker A
In prime agent, the recursive call is an ordinary Python function. You hand it a task in plain English and a name and it spawns a child agent with its own model, its own kernel, and its own empty context. Review the authentication flow
Speaker A
At 132,000 tokens, GPT-5 Mini wrapped in the recursive harness beat plain GPT-5 by more than 34 points. 34 points of accuracy, which works out to about 114% relative. Read that pairing again because it is the whole argument: the small model blind driving Python against the large model that read every word at roughly the same API cost per query.
Speaker A
test coverage review, and a slow integration audit in three lines, end its turn, and go do something else while three separate contexts fill up instead of one. That is the whole inversion.
Speaker A
Push the same test to 263,000 tokens, and the gap narrows but holds 15 points, and by then the recursive version is the cheaper of the two per query against the scaffolds people actually ship. The paper reports medians on GPT-5, 26% better than compaction, 130% better than a code agent making sub calls, 13% better than Clawed Code, and then there is the cost table, which rarely gets quoted. Across those four benchmarks, the recursive runs cost between 11 cents and 99 cents a query.
Speaker A
read the document can beat a model that did. The paper's answer runs on four long context benchmarks. The clearest is O long where the questions cannot be answered by finding one line. You have to aggregate across the whole document.
Speaker A
Claude Code on the same tasks cost between 98 cents and $6.75. The ceiling moved as well. The authors report feeding it past 10 million tokens without the usual collapse, two orders of magnitude beyond the window the model advertises. Then they went further and trained a model around the pattern. An 8 billion parameter QN fine-tuned on a thousand recursive trajectories beat its own base by about 28% across four tasks and walked up to vanilla GPT-5 on three long context ones. So, how does an idea like that go from nowhere to a billion-dollar company's flagship product in under a year? And why did a company get there before any of the labs? It started as a blog post in October 2025 written by a first-year PhD student at MIT named Alex Jang. He was 24, about six weeks into the degree. His description of the bug is still the best one anyone has written. I know my model can do task A. I know it can do task B. Give it both at once, and it does worse than it did on either alone. By the last day of the year, that post was an ArXiv paper with his two advisers on it, revised twice through May and still worth saying, published to no conference at all. While that was happening, a company called Prime Intellect was building the same idea into its own stack. In January, it put out a post titled Recursive Language Models, the Paradigm of 2026. In July, that company closed a $130 million Series A at a billion valuation on roughly a hundred million in annualized revenue and 6,000 customers. Four weeks later, it shipped Prime Agent, and Alex Jang's name is on the launch post because he is a research fellow there. Now, the person who wrote the blog post is inside the company that turned it into a product. The repository is older than the announcement, by the way. Created the 8th of May, 41 releases since mid-May, version 0.7 on the day they finally told anyone. And in the last day alone, it picked up about 3,000 more stars. But recursion is only half of what shipped. The other half comes from a different paper, and that paper is about Pokémon. A team led by Seth Carton at Princeton built a harness that finished Pokémon Blue, Yellow Legacy on hard mode, and Crystal, the last one, without losing a single battle. A human kept refining the harness as it played.
Speaker A
small model blind driving Python against the large model that read every word at roughly the same API cost per query.
Speaker A
Their follow-up took the human out. The agent alternates between playing and rewriting its own prompt, its own skills, its own memory, and its own sub-agents inside a single run with no reset between attempts. In Prime Agent, that arrives as a slash command called refine. It reads back what just happened, proposes small evidence-backed edits to its own scaffolding, and writes them to disk with a snapshot you can roll back. There is one wall it cannot cross. The base system prompt is immutable. Everything built on top of it—memories, skills, sub-agent definitions—is the agent's to rewrite.
Speaker A
better than compaction, 130% better than a code agent making sub calls, 13% better than clawed code, and then there is the cost table, which rarely gets quoted. Across those four benchmarks, the recursive runs cost between 11 cents and 99 cents a query.
Speaker A
Which brings us back to the number I skipped past at the start and to the fight that has been going on around it since. ARK AGI3 is not a puzzle set. It drops an agent into 25 interactive games it has never seen and scores how efficiently it works out the rules and wins. The metric is relative human action efficiency. Take the actions a competent human needed, divide by the actions the agent needed, and square the result. Take twice as many actions as a human, and you score a quarter. The squaring is the design. Brute force cannot buy a score here. An agent that flails its way to a win scores close to nothing, which is exactly what makes this benchmark hard to game with a scaffold. On the 24th of July, Ark Prize ran Claude Opus 5 on the public set themselves and published 30.2%.
Speaker A
they went further and trained a model around the pattern. An 8 billion parameter QN fine-tuned on a thousand recursive trajectories, beat its own base by about 28% across four tasks and walked up to vanilla GPT5 on three long
Speaker A
That was state-of-the-art, nearly four times the previous record. Twelve days later,
Speaker A
first year PhD student at MIT named Alex Jang. He was 24 about 6 weeks into the degree. His description of the bug is still the best one anyone has written. I know my model can do task A. I know it
Speaker A
can do task B. Give it both at once and it does worse than it did on either alone. By the last day of the year, that post was an arcs paper with his two advisers on it. revised twice through
Speaker A
May and still worth saying published to no conference at all. While that was happening, a company called Prime Intellect was building the same idea into its own stack. In January, it put out a post titled Recursive Language Models, the paradigm of 2026. In July,
Speaker A
that company closed a $130 million series A at a billion valuation on roughly a hundred million in annualized revenue and 6,000 customers. Four weeks later, it shipped Prime Agent and Alex Jen's name is on the launch post because
Speaker A
he is a research fellow there. Now, the person who wrote the blog post is inside the company that turned it into a product. The repository is older than the announcement, by the way. Created the 8th of May, 41 releases since
Speaker A
mid-May, version 0.7 on the day they finally told anyone. And in the last day alone, it picked up about 3,000 more stars. But recursion is only half of what shipped. The other half comes from a different paper, and that paper is
Speaker A
about Pokemon. A team led by Seth Carton at Princeton built a harness that finished Pokemon Blue Yellow Legacy on hard mode, and Crystal, the last one, without losing a single battle. A human kept refining the harness as it played.
Speaker A
Their follow-up took the human out. The agent alternates between playing and rewriting its own prompt, its own skills, its own memory, and its own sub agents inside a single run with no reset between attempts. in prime agent that
Speaker A
arrives as a slash command called refine. It reads back what just happened, proposes small evidence-backed edits to its own scaffolding and writes them to disk with a snapshot you can roll back. There is one wall it cannot cross. The base system prompt is
Speaker A
immutable. Everything built on top of it. Memories, skills, sub aent definitions is the agents to rewrite.
Speaker A
Which brings us back to the number I skipped past at the start and to the fight that has been going on around it since. ARK AGI3 is not a puzzle set. It drops an agent into 25 interactive games
Speaker A
it has never seen and scores how efficiently it works out the rules and wins. The metric is relative human action efficiency. Take the actions a competent human needed, divide by the actions the agent needed and square the result. Take twice as many actions as a
Speaker A
human and you score a quarter. The squaring is the design. Brute force cannot buy a score here. An agent that flails its way to a win scores close to nothing, which is exactly what makes this benchmark hard to game with a
Speaker A
scaffold. On the 24th of July, Ark Prize ran Claude Opus 5 on the public set themselves and published 30.2%.
Speaker A
That was state-of-the-art, nearly four times the previous record. 12 days later, Prime Intellect ran the same model on the same 25 games inside their harness and reported 95 1.5%. The human expert baseline is 95.4.
Speaker A
same weights, same games, same metric, 65 points of difference, and the only thing that changed was the loop around the model. So, which of those two numbers is Claude Opus 5? And if the answer turns out to be that it depends
Speaker A
what you wrapped it in, what exactly has the industry been ranking for the last 3 years? Now, the harness result is self-reported and Prime Intellect is not on the official leaderboard. That was the first thing people said, and it is
Speaker A
fair. The second thing is harder on the announcement. Three weeks earlier, a group from Impossible Research, Berkeley, and Carnegie Melon had published a harness called Schema, hitting about 99% on the same public set. And an engineer named Ryan Brown,
Speaker A
working on it in his own time, published an agent scoring 99.86 across all 25 games, using five and a half times fewer tokens than the previous best. His repository has eight stars, so the human line had already been crossed twice by
Speaker A
people without a launchpost. A harness beating the model it wraps is not the news here. It is the background condition. The sharpest objection is about the rules. That benchmark is explicitly fshot. And a harness that rewrites itself between attempts may be
Speaker A
taking more tries than the rules allow. One commenter on the schema thread put it as bluntly as it can be put. This is moving the goalpost by defeating the entire point of the test. The language model equivalent of running a chess
Speaker A
engine on the side. The reply to that is not weak either. To write a working simulator of a game you were not shown, you have to have learned the rules of that game, which is the thing the benchmark was trying to measure in the
Speaker A
first place. Set the games aside, though, because there is a second table on that launch post, and it is the one that matters if you write software for a living. Nine long context evaluations.
Speaker A
With Opus 5, Prime Agent beat Claude Code on six of the nine. With GPT 5.6 Saul, it beat Codeex on six of nine.
Speaker A
With an open model GLM 5.2, two, it beat the harness it was forked from on eight of nine. Those are the vendor's own numbers on the vendor's own page, and most of the margins are hundreds. To their credit, the same page says their
Speaker A
own runs of Claude code and codecs came out worse than the official ones, so they use the official ones instead. The product also has teeth pointed at you.
Speaker A
It runs model written Python with your permissions, and its own documentation says in a warning box that it is not a security sandbox. In their own factorial tests, the self-improvement loop worked out that it could spawn resources straight into its assembly machines
Speaker A
through an admin console instead of building the factory. It had been told not to cheat. It refined its way into cheating anyway. And the research has a ceiling of its own. A March reproduction found one level of recursion helps and
Speaker A
two levels start overthinking. A 3 and 1/2 second retrieval turning into nearly 6 minutes of work. So here is the verdict and it is not the one the headline number is selling. Recursion over context as a variable wins, and it
Speaker A
wins for almost anyone whose work outlives a single prompt. The receipts have been the same the whole way. A small blind model beating a large reading 1 by 34 points at the same price per query costs an order of magnitude
Speaker A
apart. And one set of weights scoring 30 and 95 depending on the loop around them. What it loses is narrow and real.
Speaker A
One document under about 30,000 tokens answered once. Paste it in. do not build a recursive pipeline to read a PDF and the paradigm is not the product. Prime Agent is the best showcase recursion has and it is 4 days old, unsandboxed and
Speaker A
scored by the people who built it. Take the idea now, take the install later because the thing worth being angry about is not a company. It is the habit of scoring the model and forgetting the scaffold. Every leaderboard row you have
Speaker A
ever read is a model and a harness and only one of them gets a name. Which leaves the uncomfortable question. If the loop around the model is worth 65 points, what is the model worth?
Topics:recursive language modelcontext rotlarge language modelslong contextGPT-5Prime IntellectPrime Agentattention mechanismAI benchmarksmachine learning research











