Stay Updated with DSPyWeekly!

DSPyWeekly Issue No #19

Published on January 23, 2026

📚 Articles

DSPyWeekly - Recursive Language Models Edition

This edition of DSPyWeekly focuses on the implementation and usage of DSPy with Recursive Language Models. This issue captures all the good articles, videos and projects pertaining to RLMs that help explain it, use cases etc.

PAPER: Recursive Language Models

The RLM paper by Alex L. Zhang, Tim Kraska, Omar Khattab.

Compact and Accessible Recursive Language Models Explanation

Simple and accessible explanation of RLM and how they work along with code snippets to explain workings and how to use it.

Recursive Language Models — Interactive Demo

Interactive Demo built to experience RLM workings.

Recursive Language Models: the paradigm of 2026

The articles presents that the biggest limitation of today’s large language models (LLMs) isn’t raw intelligence — it’s context management: current models struggle with very long inputs because their performance drops and computational costs balloon as context grows. This is known as “context rot.” Rather than relying on ever-larger context windows or external summarization, the RLM approach lets the model manage its own context programmatically using a Python REPL and recursive calls to itself or smaller sub-models. That means the model decomposes massive inputs into manageable parts, reasons on them, and reassembles insights without losing detail — a potential breakthrough for tasks spanning millions of tokens. Key Themes discussed are - RBreaking Through the Context Ceiling, Active Context Management, Not Summarization, Scaffolding Into Self-Guided Reasoning, Experimental Evidence with Real Models, A Vision for the Future of AI Agents.

What Are Recursive Language Models?

Another simple explanation of How RLMs actually work and what problems do they solve?.

Event: Recursive Language Models w/ Alex Zhang · Zoom · Luma

AlphaXiv organised online event where Alex Zhang the author of the paper would be talking about RLM.

Standalone original rlm implementation - By Alex L. Zhang

This repository provides an extensible inference engine for using RLMs around standard API-based and local LLMs. The initial experiments and idea were proposed in a blogpost in 2025, with expanded results in an arXiv preprint.

QA system using RLM - 3.4 Million words

An EXCELLENT quick demo implementation of RLM from DSPy! And really this shows how good RLM is at needle in the haystack solutions. In over 3.4M words (roughly 6M tokens) of context, this little needle in the haystack was able to be picked up, from my question. It took about 15 seconds. - Noah Vandal

DSPy.rb author Vicente talking about RLM with code snippet

Quick experiment with 457 pages of govt bulletin in 43 seconds and costed $0.002.

RLM applied to long-form video understanding

Instead of attempting to encode tens of thousands of video frames at once, the model interacts with the video recursively. It decides which segments to inspect, writes code to explore them, and spawns sub-LLM calls to analyze local regions of interest. Each recursive step produces intermediate reasoning artifacts that guide the next decision. This turns video understanding into an interactive exploration problem, rather than a static representation task. The model controls its own attention, dynamically gathering evidence across time until it reaches a conclusion. Using this RLM-based approach, we process 20+ minute videos in only a few recursive steps, with minimal cost and no reliance on massive context windows. The takeaway isn’t about video specifically—it’s about how RLMs unlock scalable reasoning over any large, unbounded environment.

Tweet Thread: RLM implementation in Gemini Ecosystem

Implements Recursive Language Models (RLM) for Gemini using strictly Google ecosystem tools, Google Colab (for the runtime/compute), Vertex AI (for the Gemini model backend), Google Cloud Storage (optional, for logging/persistence).

🎥 Video

Video discussing Recursive Language Model - Mathew Dawit

In this talk, we discuss Recursive Language Models (RLMs)—a new approach to addressing context overload and performance degradation in large language models. The presentation explains why model accuracy drops as context length grows, how #hallucinations and forgetting emerge, and why simply expanding context windows is not a sustainable solution. The session introduces RLMs as a solution that externalizes context into a programmable environment (e.g., Python), enabling recursive sub-queries, clean working memory, and divide-and-conquer reasoning. We compare RLMs with standard #llms , #RAG, and #chain-of-thought methods, review experimental results on long-context benchmarks, and analyze accuracy–cost tradeoffs, limitations, and future directions such as native recursive training and efficiency improvements. Ideal for researchers and practitioners working with long-context reasoning, agentic systems, and scalable #llm architectures.

Exploring "Recursive Language Models" with Alex L. Zhang | Deep Learning Study Session - YouTube

Alex L. Zhang about his work on RLM for long context in discussion with Yacine on his podcast.

🚀 Projects

mohammed840/RLM-implementation: RVAA: Recursive Vision-Action Agent for Long Video Understanding. Implementation of the RLM paradigm (Zhang, Kraska, Khattab 2025)

RVAA: Recursive Vision-Action Agent for Long Video Understanding. Implementation of the RLM paradigm (Zhang, Kraska, Khattab 2025)

rawwerks/rlm-cli: CLI for Recursive Language Models

This repo includes a Claude Code plugin with an rlm skill. The skill teaches Claude how to use the rlm CLI for code analysis, diff reviews, and codebase exploration.

halfprice06/huberman-rlm

Q&A over Huberman Lab podcast transcripts using DSPY + RLM.

đź’¬ Discussion

Alex L Zhang on X discussing RLM

Discussion around RLM amongst other things on X on a tweet from Alex posted on 22nd Jan

Reddit Discussion on RLMs

Reddit users discussing RLMs