Skip to main content

Module rlm

Module rlm 

Source
Expand description

Recursive Language Model (RLM) processing

Handles large contexts that exceed model context windows by:

  1. Loading context into a REPL environment as a variable
  2. Having the LLM write code to analyze it
  3. Supporting recursive sub-LM calls for semantic analysis

Based on “Recursive Language Models” (Zhang et al. 2025)

Re-exports§

pub use chunker::Chunk;
pub use chunker::ChunkOptions;
pub use chunker::ContentType;
pub use chunker::RlmChunker;
pub use repl::ReplRuntime;
pub use repl::RlmAnalysisResult;
pub use repl::RlmExecutor;
pub use repl::RlmRepl;
pub use repl::SubQuery;
pub use router::RlmRouter;
pub use router::RoutingContext;
pub use router::RoutingResult;
pub use tools::RlmToolResult;
pub use tools::dispatch_tool_call;
pub use tools::rlm_tool_definitions;

Modules§

chunker
Semantic chunking for large contexts
repl
RLM REPL - Execution environment for RLM processing
router
RLM Router - Decides when to route content through RLM processing
tools
RLM REPL operations expressed as tool definitions.

Structs§

RlmConfig
RLM configuration
RlmResult
RLM processing result
RlmStats
RLM processing statistics