# rlm > Process a query using RLM (Recursive Language Model) for huge contexts that exceed normal limits. Use when working with very large documents, codebases, or datasets. - Author: RossRemoteSense - Repository: remotesense/recursive-llm - Version: 20260127210426 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/remotesense/recursive-llm - Web: https://mule.run/skillshub/@@remotesense/recursive-llm~rlm:20260127210426 --- --- name: rlm description: > Process a query using RLM (Recursive Language Model) for huge contexts that exceed normal limits. Use when working with very large documents, codebases, or datasets. disable-model-invocation: true argument-hint: [context-file] [query] --- # RLM Query Command You are processing a query using Recursive Language Model techniques. ## What This Does RLM allows you to answer questions about contexts that are too large to fit in a normal context window. It works by: 1. Storing the context in a file (not in the model's context) 2. Using code to explore, filter, and chunk the context 3. Delegating semantic analysis to the rlm-analyzer subagent 4. Aggregating results to form the final answer ## How to Use Invoke with: `/rlm ` Examples: - `/rlm /path/to/huge_log.txt "How many errors occurred on January 15th?"` - `/rlm ./data.json "Summarize all entries with status=failed"` ## Process ### Step 1: Validate Input Parse the arguments: - First argument: path to context file - Remaining arguments: the query If no file path provided, ask the user for the context file location. ### Step 2: Prepare Context Copy/link the context file to a working location: ```bash cp "$ARGUMENTS" /tmp/rlm_context.txt 2>/dev/null || echo "Provide context file path" ``` ### Step 3: Invoke RLM Processor Delegate to the rlm-processor subagent: ``` Use the rlm-processor subagent to answer this query: Context file: /tmp/rlm_context.txt Query: Process this using RLM techniques - peek at the structure first, then use appropriate strategies (grep/filter, chunk+map, or aggregation) based on the query type. ``` ### Step 4: Return Result The rlm-processor will return the final answer. Present it to the user along with: - How many chunks were processed (if applicable) - Any relevant metadata about the processing ## Notes - RLM is for LARGE contexts (>100k tokens) that need semantic understanding - For simple grep-able tasks, direct bash commands may be faster - The rlm-patterns skill has additional processing strategies - Use rlm-analyzer subagent for semantic analysis of chunks