# Text Splitters

***

**When you want to deal with long pieces of text, it is necessary to split up that text into chunks.**\
As simple as this sounds, there is a lot of potential complexity here. Ideally, you want to keep the semantically related pieces of text together. What "semantically related" means could depend on the type of text. This notebook showcases several ways to do that.

**At a high level, text splitters work as following:**

1. Split the text up into small, semantically meaningful chunks (often sentences).
2. Start combining these small chunks into a larger chunk until you reach a certain size (as measured by some function).
3. Once you reach that size, make that chunk its own piece of text and then start creating a new chunk of text with some overlap (to keep context between chunks).

**That means there are two different axes along which you can customize your text splitter:**

1. How the text is split
2. How the chunk size is measured

### Text Splitter Nodes:

* [Character Text Splitter](/integrations/langchain/text-splitters/character-text-splitter.md)
* [Code Text Splitter](/integrations/langchain/text-splitters/code-text-splitter.md)
* [Html-To-Markdown Text Splitter](/integrations/langchain/text-splitters/html-to-markdown-text-splitter.md)
* [Markdown Text Splitter](/integrations/langchain/text-splitters/markdown-text-splitter.md)
* [Recursive Character Text Splitter](/integrations/langchain/text-splitters/recursive-character-text-splitter.md)
* [Token Text Splitter](/integrations/langchain/text-splitters/token-text-splitter.md)


---

# 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.flowiseai.com/integrations/langchain/text-splitters.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.
