recursive language model
In plain wordsA way of running an AI language model so it can handle enormous documents by writing small programs to search and split them, and calling copies of itself on the pieces.
An inference strategy in which a language modellanguage model, n.: A system that has learned how likely different sequences of words are, so it can predict the next word in a text and, by doing that repeatedly, write text of its own. answers a query over very long input without reading it all into its context windowcontext window, n.: How much an AI model can read and keep in view at once: the instructions, the conversation so far and any attached documents. Text that does not fit has to be cut, summarized or left out.: the input is stored as a variable in a programming environment (a Python REPL), and a 'root' model writes code to inspect, search, partition and transform it, launching recursive calls to itself or to smaller sub-models on selected chunks before returning a final answer. To the user it behaves like an ordinary model call. In the introducing experiments, a recursive wrapper around a small model beat a much larger model on long-context reasoning benchmarks at similar or lower cost per query, and stayed accurate over document collections exceeding ten million tokenstoken, n.: The small chunk of text an AI language model reads and writes — often a word, part of a word or a punctuation mark. AI usage, limits and prices are counted in tokens.. The approach treats context rotcontext rot, n.: The way an AI model becomes less reliable as you give it more and more text to read, even when the answer is in there somewhere. as an engineering problem to route around rather than a limit to be trained away.
We wrapped the small model as a recursive language model and it handled the whole 8,000-page discovery archive.
Origin
Introduced by Alex L. Zhang and Omar Khattab of MIT in a blog post in October 2025, followed by the paper 'Recursive Language Models' with Tim Kraska (arXiv:2512.24601, December 2025).
Related
- long contextlong context, n.: The ability of an AI model to work with very long inputs — whole books, codebases or hours of transcripts — in one go, and the techniques that make this possible.
- context rotcontext rot, n.: The way an AI model becomes less reliable as you give it more and more text to read, even when the answer is in there somewhere.
- context engineeringcontext engineering, n.: Managing an AI model's reading material: choosing, trimming and arranging the instructions, documents, tool results and memories it is given on every turn, so that it has what the task needs and little else.
- code executioncode execution, n.: Letting an AI write a small program and actually run it — to do math, analyze a spreadsheet or test its own code — then use the real output instead of guessing.
- subagentsubagent, n.: A helper AI agent that a main agent starts to handle one piece of a job; it works in its own separate workspace and reports back a short summary when it is done.
- retrieval-augmented generationretrieval-augmented generation, n.: Giving an AI an open-book exam: before answering, it looks up relevant passages in a set of documents and bases its reply on them, often citing where each point came from.
Sources
- Zhang, A. L., Khattab, O. & Kraska, T. (2025). Recursive Language Models. Blog post (paper: arXiv:2512.24601). alexzhang13.github.io/blog/2025/rlm