Decompose Context
rlm_decompose_contextBreak long context into chunks using strategies like fixed size, lines, paragraphs, sections, regex, or sentences, allowing processing of arbitrarily long text without external APIs.
Instructions
Split context into chunks using various strategies.
Strategies:
fixed_size: Fixed character chunks with overlap
by_lines: Chunk by number of lines
by_paragraphs: Split on double newlines
by_sections: Split on markdown headers
by_regex: Split on custom pattern
by_sentences: Split into sentences
Returns chunk metadata (indices, offsets). Use rlm_get_chunks to retrieve content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| overlap | No | Overlap between chunks | |
| pattern | No | Regex pattern (for by_regex strategy) | |
| strategy | No | Decomposition strategy | fixed_size |
| chunk_size | No | Chunk size in characters (for fixed_size strategy) | |
| context_id | No | Context identifier | main |
| session_id | No | Session ID | |
| return_content | No | Include chunk content in response (can be large) | |
| lines_per_chunk | No | Lines per chunk (for by_lines strategy) |