HeadlinesBriefing favicon HeadlinesBriefing.com

Why Recursive Language Models Beat ReAct and CodeAct

Towards Data Science •
×

Recursive Language Models (RLMs) are dominating long-context benchmarks by solving a fundamental flaw in existing agentic architectures—passing context by reference instead of replicating it. A new technical deep dive illustrates this through a simple test: generate 50 fruit names and count the 'r' in each. The experiment exposes where ReAct, CodeAct, and subagent approaches all break down.

ReAct requires developers to predefine specific tools like count_alphabets_in_word, leaving the LLM to reproduce answers token-by-token from memory—prone to "transmission errors." CodeAct improves this by letting the LLM write and execute its own Python code, but still forces reproduction of results from the terminal output. Subagent architectures divide tasks across multiple agents but compound the memory burden when handling nested problems.

The author spent a month implementing RLMs, running benchmarks, and producing a 50-minute tutorial after responding to over 100 community questions. The key insight: RLMs avoid having the model regenerate outputs from memory entirely by maintaining context references throughout execution. This architectural difference explains their performance advantages on complex, multi-step reasoning tasks.