Member-only story
A factual walkthrough of dspy.RLM, the official Recursive Language Model module DSPy shipped in version 3.1.2. Every code sample below uses the real, documented API — no simulated or illustrative approximations.
Every frontier lab spent 2025 and early 2026 competing on context window size — 200K tokens, then a million. The pitch was always the same: bigger window, handles bigger problems. MIT researchers gave that pitch a name this year that isn’t flattering: context rot — the well-documented tendency of every current model, regardless of its advertised window size, to lose reliable performance well before it hits that advertised limit, specifically on tasks that require reasoning across the full input rather than just finding one needle in a haystack.
The fix that’s actually shipping in production tooling right now isn’t a bigger window. It’s Recursive Language Models (RLMs) — letting a model treat an oversized prompt as something it can programmatically explore, rather than something it has to read in one pass. DSPy, the widely used framework for programming (not just prompting) language models, shipped this as a first-class module — dspy.RLM
—…