Text Splitter (TEXT_SPLITTER)

Cuts a long text into smaller pieces (chunks) and passes them on as a list — for example to handle them one by one with the Iterator.

Category: Utilities · Deployed: yes · Tool-capable: no

Ports

Port Kind Purpose

Text (in_text)

Input

The text to split

Chunks (out_chunks)

Output

A JSON list of text pieces

Properties

Field Required Meaning

Chunk Size (chunkSize)

Yes

The maximum length of one piece, in characters. Must be greater than 0. Larger → fewer pieces with more context each. Smaller → more pieces that each say less on their own

Chunk Overlap (chunkOverlap)

No

How many characters at the end of a piece may be repeated at the start of the next one, so a thought cut in two stays readable. Only whole sentences are repeated. Default: 0. Must be smaller than Chunk Size

How the text is cut

  • The splitter cuts at the largest natural break that fits: first between paragraphs, then between lines, then between sentences, and only as a last resort between words.

  • Small parts are put together until the next one would make the piece longer than Chunk Size.

  • Code blocks are never cut. A fenced block (Markdown ` or ~, AsciiDoc ---- or …​.) always stays in one piece, even when it is longer than Chunk Size.

  • Overlap repeats whole sentences only. A sentence longer than Chunk Overlap is not repeated at all. Text without sentence endings (IDs, codes, one long string) gets no overlap.

  • An empty input gives an empty list [].

Use cases

  • Your own ingestion flow: File Read → Text Splitter → Iterator → Embedding → KV Store Write.

  • Getting around a model’s input limit: split a long document, handle each piece, then combine the results.

Notes

  • Set an overlap when the pieces will be searched by meaning (embedded). With 0 overlap, a thought that spans a break is split across two pieces, and a search may find neither of them well.

  • Set the overlap at least as long as a typical sentence. Otherwise no sentence fits, and nothing is repeated.

  • Overlap equal to or larger than Chunk Size stops the whole pipeline. The agent server refuses the pipeline when it is registered.

  • Chunk Size counts characters, not words.

  • For questions about your documents, a RAG Topic already splits them for you. The Text Splitter is for your own flows.