Expand description
Recursive Language Model (RLM) processing
Handles large contexts that exceed model context windows by:
- Loading context into a REPL environment as a variable
- Having the LLM write code to analyze it
- 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 context_trace::ContextTrace;pub use context_trace::ContextEvent;pub use oracle::AstPayload;pub use oracle::AstResult;pub use oracle::FinalPayload;pub use oracle::GeneratedQuery;pub use oracle::GrepMatch;pub use oracle::GrepOracle;pub use oracle::GrepPayload;pub use oracle::OracleResult;pub use oracle::QueryTemplate;pub use oracle::SemanticPayload;pub use oracle::TemplateKind;pub use oracle::TraceValidator;pub use oracle::TreeSitterOracle;pub use oracle::ValidatedTrace;pub use oracle::VerificationMethod;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
- context_
trace - Context tracing for RLM iterations.
- oracle
- Deterministic oracle system for validating RLM REPL trace outputs.
- 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.