Recursive Language Models

PDF DocumentAlex L. Zhang; Tim Kraska; Omar Khattab8,689 words
Download PDF

Content Summary

Recursive Language ModelsAlex L. Zhang; Tim Kraska; Omar Khattab

8 concepts10 actions20 keywords

TL;DR

This paper introduces Recursive Language Models (RLMs), a novel inference paradigm that treats long prompts as external environment variables rather than direct neural network inputs, enabling LLMs to programmatically examine, decompose, and recursively call themselves over snippets of the prompt. RLMs successfully process inputs up to two orders of magnitude beyond model context windows (10M+ tokens) while dramatically outperforming base LLMs and common long-context scaffolds across diverse tasks. The key insight is that by offloading context to a Python REPL environment and allowing recursive sub-LM calls, models can overcome fundamental context rot limitations without task-specific engineering.

ELI5

Imagine you have a REALLY long book to read, but you can only see one page at a time. Instead of trying to read the whole book at once (which would make your brain tired and forget things), you can write notes, look at specific pages when you need them, and even ask a friend to help you understand parts. That's what this computer program does - it doesn't try to read everything at once, it uses smart tricks to look at just the parts it needs!

Top Concepts

Keywords

Quick Actions

  • !Implement REPL environment that loads prompts as string variables for symbolic manipulation
  • !Design recursive sub-LM calling interface using llm_query function pattern
  • !Use regex and keyword filtering to narrow context before semantic processing
1m 10s50,400 tokens
Claude Opus 4.5prompts v1.2v1.0?

Want to analyze your own content?

Extract insights from YouTube videos, PDFs, and web articles. Free to start.

Try Knowmler Free