> For the complete documentation index, see [llms.txt](https://docs.flowiseai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowiseai.com/integrations/langchain/text-splitters.md).

# Text Splitters

LangChain Text Splitter Nodes

***

**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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowiseai.com/integrations/langchain/text-splitters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
