RLM

•
49
•

Enables Claude Code to handle massive contexts (10M+ tokens) by treating them as external variables, leveraging recursive language model patterns.

RLM (Recursive Language Model) provides a powerful pattern for Claude Code to interact with extremely large textual contexts that would otherwise exceed typical LLM token limits. Instead of attempting to cram vast amounts of information directly into the prompt, RLM allows Claude to load, inspect, strategically chunk, and recursively sub-query these external contexts. This method ensures that critical information can be processed and synthesized, making Claude exceptionally capable of analyzing extensive log files, comprehensive codebases, or entire encyclopedias without incurring prohibitive costs or hitting context window limitations.

主な機能

01Executes sandboxed Python code (`rlm_exec`) directly against loaded contexts for deterministic data extraction and filtering.
02Automates complex analysis workflows with `rlm_auto_analyze`, intelligently detecting content types and optimizing strategies.
0317 GitHub stars
04Processes massive contexts (10M+ tokens) by keeping them external to the LLM prompt.
05Performs strategic chunking and recursive sub-queries for deep, hierarchical analysis.
06Supports flexible LLM providers, including Anthropic's Claude Haiku and local Ollama for cost-effective inference.

ユースケース

01Analyze extensive log files to identify and summarize error patterns.
02Extract structured data, such as email addresses, amounts, or specific entities, from large documents.
03Summarize and derive insights from massive text corpora, including technical documentation, codebases, or reference materials.