Skip to content

RLM-RS Plugin

Process documents 100x larger than context windows using the Recursive Language Model pattern.

Chunk & Conquer

Split large documents using semantic, fixed, or parallel chunking strategies. Each chunk is stored in SQLite and retrieved by ID — no file I/O overhead.

Hybrid Search

Find relevant chunks with BM25 + semantic search, fused via Reciprocal Rank Fusion (RRF). Embeddings generated on-demand and cached for subsequent queries.

Distributed Analysis

Sub-LLM agents analyze individual chunks in parallel. Each agent retrieves content by chunk ID using pass-by-reference — efficient and atomic.

Coherent Synthesis

A synthesis agent aggregates findings from all chunks into a coherent, structured response with summaries, key findings, and recommendations.

Terminal window
# Install the rlm-rs CLI
cargo install --git https://github.com/zircote/rlm rlm-rs
# Install the plugin
claude plugin install zircote/rlm-rs-plugin

Then in Claude Code:

/rlm-init
/rlm-load file=large-document.txt chunker=semantic
/rlm-query query="What are the main themes?"
RLM ConceptImplementation
Root LLMMain Claude Code conversation (Opus/Sonnet)
Sub-LLMrlm-subcall agent (Haiku)
External Environmentrlm-rs CLI with SQLite storage

Based on arXiv:2512.24601 — the Recursive Language Model pattern for long-context processing.