| name | recursive-language-models |
| title | Recursive Language Models |
| version | 0.0.2 |
| engine | skillxiv-v0.0.2-claude-opus-4.6 |
| license | MIT |
| url | https://arxiv.org/abs/2512.24601 |
| keywords | ["Long Context","Inference Scaling","Recursive Decomposition","LLM Architecture","Context Windows"] |
| description | Process prompts exceeding model context windows by recursively decomposing long inputs into manageable chunks and calling the model recursively on snippets—enabling inference on contexts 100x longer than native window while maintaining quality and improving over vanilla baseline approaches. |
Overview
Recursive Language Models (RLMs) address a fundamental limitation of LLMs: fixed context windows. When prompts exceed context length, performance degrades sharply. Rather than architectural changes, RLMs treat the long prompt as an external environment that the model can programmatically examine and decompose.
Core Insight: LLMs excel at reasoning. Give them tools to examine, decompose, and reason about long prompts piece-by-piece. The model recursively processes snippets and synthesizes results, effectively extending effective context beyond architectural limits.
Inference-Time Scaling Paradigm
RLMs implement a general inference paradigm treating long prompts as environments:
LLM Capabilities Provided:
- Examine - Read specific regions of the long prompt
- Decompose - Reason about how to break down the task
- Recursively Call - Invoke itself on identified snippets
- Synthesize - Combine results into final answer
Process Flow:
Long Prompt (100K+ tokens)
↓
[Model examines structure]
↓
[Model decides decomposition strategy]
↓
[Model recursively calls on chunks]
↓
[Chunk 1 processing] [Chunk 2 processing] [Chunk 3 processing]
↓
[Model synthesizes results]
↓
Final Answer
Technical Implementation
Environment Interface for Long Prompts
Expose long prompt as an environment with APIs for examination:
class LongPromptEnvironment:
def __init__(self, full_prompt: str):
self.full_prompt = full_prompt
self.length = len(full_prompt.split())
def get_length(self) -> int:
"""Get total word count."""
return self.length
def get_snippet(self, start_idx: , end_idx: ) -> :
words = .full_prompt.split()
.join(words[start_idx:end_idx])
() -> []:
words = .full_prompt.split()
positions = [
i i, word (words)
query.lower() word.lower()
]
positions