The Split Text component prepares document text for retrieval by dividing it into smaller chunks. Connect a text-producing component, such as Read File, to its first input, run it, and inspect the resulting chunk table. Rather than treating a document as one long passage, it creates smaller pieces that can later be stored and retrieved for a RAG workflow. section 4.2 section 6.3
Two settings control the basic split. Chunk Size is the maximum number of characters per chunk. Chunk Overlap repeats a chosen number of characters at the boundary between neighboring chunks. Overlap helps preserve context when an important statement crosses a boundary: a pizza name at the end of one chunk can remain connected to its price at the start of the next. section 4.2
Choose the settings as a practical trade-off:
- Keep chunks large enough to contain the information needed to answer a question. section 4.3
- Keep chunks small enough that their embeddings can represent the content effectively and retrieval remains accurate. section 4.3
- Tune both Chunk Size and Chunk Overlap for the content and expected queries; no single size is always correct. section 4.2 section 4.3
Menu chunks for a RAG assistant
For a menu, a Chunk Size of 400 characters and Chunk Overlap of 150 characters can balance context with focused retrieval. The component may produce a shorter chunk because it tries to split gracefully at a separator. This lets a later retriever find menu details without requiring the whole file as context. section 4.2
Character-count chunking is a useful default, but it can separate meaningful units. A recipe may begin in one chunk and finish in the next, so a retrieval result can miss part of it. When the text has a repeated boundary pattern, use an appropriate Separator string to split by meaningful units instead—for example, one chunk per recipe. section 6.3 section 6.3
Figure 6.7 With the right Separator string, the text is split into meaningful chunks: one per recipe.
Compare scattered recipe fragments with separator-based chunks that keep one recipe together. section 6.3
Chunking affects the rest of the RAG pipeline. Oversized chunks can weaken retrieval because a fixed-size embedding must represent too much text; undersized chunks can omit needed context. After changing the split settings, test the resulting answers alongside related retrieval controls such as the number of returned documents. section 4.3 section 4.3
