An RLM treats input context as an object in an environment, usually a Python REPL, where the model can inspect and compute over it. It can also delegate subtasks to another language model, including a copy of itself, and recursively break down work.
It’s Tokens All The Way Down: How RLMs are Different
Speaker
Kevin Madura of consulting firm AlixPartners explains recursive language models (RLMs) at AI Engineer.
Madura describes a setup with a defined task and typed inputs and outputs, while the model decides how to carry out the work. Context stays in the REPL, so the main model can retrieve relevant parts or delegate analysis instead of filling its window with the full input. He contrasts this with RAG, agents, and tool calls that pass strings back and forth.
Madura recommends considering RLMs for large or dense inputs, decomposable tasks, long sessions, and potentially very large outputs. He cites a Long Chain of Thought benchmark result that rose from 2.6% to 45.4%, with stronger results on tasks such as logic puzzles, chess, and chemistry. He says RLMs may be a poor fit when the task fits in context, latency matters, or the model is already a strong coder.
Madura demonstrates an RLM analyzing three data frames for cohort retention, writing and running code in a REPL, and returning typed findings and recommendations. He also describes using RLMs to process invoices and other long documents, inspect agent traces, analyze logs, and generate a security report from about 500,000 lines of code. He names Predict RLM, DSPy, Ax, Fast RLM, and Halo as projects or frameworks related to this work.
Madura sees the main opportunity in models that are post-trained to use RLM methods natively. He expects that could let users specify objectives and desired outputs while models handle more of the intermediate process.
Takeaways
- Keep large inputs in an environment the model can inspect and compute over, rather than sending the full content into its context window.
- Use submodel calls to split work that can be handled in independent pieces, then return relevant results to the main model.
- Define task inputs and outputs clearly so the model has room to choose its approach while results remain structured.
- Consider latency and task size before choosing an RLM; simpler in-context tasks may not need one.
- Compare RLMs with coding agents and tool-based pipelines on your own workloads, since Madura notes that some of his comparisons were preliminary.
Mentioned in this talk
Search inside this talk
What was claimed 7
- works atKevin Madura works at
AlixPartners
consultant“I'm from a company called AlixPartners.”
YouTube Verified3 sources· Talk, Web· archived
- featurerecursive language model: Treats context as an object in a symbolic environment, typically a Python REPL.
“it treats the context as an object that it can interact with symbolically in its environment”
YouTube Unverified1 source· Talk
- featurerecursive language model: Can delegate recursively to another language model, often itself.
“it has the ability to delegate to another LM, often to itself”
YouTube Unverified1 source· Talk
- metricrecursive language model: 2.6% to 45.4% accuracy across Long Chain of Thought tasks in the cited testing.
“a meaningful jump in accuracy, from 2.6% to 45.4%”
YouTube Unverified1 source· Talk
- uses
Predict RLM uses DSPy
“Predict RLM uses DSPy to determine the schemas between the main LM and the sub-LM calls.”
YouTube Unverified1 source· Talk
- feature
Halo: Analyzes agent traces and recommends improvements to the harness.“iterating on the harness”
YouTube Unverified1 source· Talk
- uses
“There’s a project called Halo that uses an RLM to look at traces”
YouTube Unverified1 source· Talk












