Watch how RLMs decompose and recursively interact with context through a REPL environment — enabling near-infinite context processing without degradation.
Based on research by Alex Zhang & Omar Khattab
Click "Run RLM Query" to see
recursive decomposition in action
Instead of flooding the LLM with the entire context, RLMs store it as a Python variable that can be programmatically accessed and manipulated.
The root LLM operates in a Python REPL, writing code cells to peek at, grep, and partition the context as needed.
When analysis is needed, the root LLM spawns child RLM calls with smaller context chunks, avoiding "context rot" degradation.
Results bubble up through the recursion tree. The root LLM aggregates findings and outputs FINAL(answer) when complete.