# Character splitter Node

### Overview

The Character Splitter Node splits text or documents into smaller chunks using a recursive character-based approach. It's particularly useful for preparing text for LLMs that have token limits or when you need to process long documents in smaller segments.

Usage cost: 1 credit

### Configuration

#### Settings

1. **Chunk Configuration**
   * Chunk Size\*: Number of characters per chunk
   * Chunk Overlap\*: Number of overlapping characters between chunks
   * Separators: List of strings that define where to split the text (comma-separated)
2. **Input Selection**
   * Documents/Text to Split\*: Select one or more inputs to process
   * Supports:
     * Single text strings
     * Document objects
     * Arrays of text strings
     * Arrays of documents

#### Output Ports

* `split_documents` (Document\[]): Array of split documents
  * Each document maintains original metadata
  * Chunks respect natural text boundaries based on separators

### Best Practices

1. **Chunk Size Selection**
   * Consider model token limits
   * Balance information density
   * Account for desired context window
   * Test with representative content
2. **Overlap Configuration**
   * Use overlap to maintain context
   * Consider semantic boundaries
   * Avoid too large overlaps (waste)
3. **Separator Usage**
   * Use natural text boundaries
   * Consider document structure
   * Common separators: "\n\n", "\n", ".", "!", "?"
   * Order separators from specific to general

### Common Issues

* Memory issues with large documents
* Inconsistent chunk sizes
* Improper handling of special characters


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.waterflai.ai/studio/studio-builders/flow-components-nodes/character-splitter-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
