# Markdown text-spliter for vector store

**URL:** <https://community.n8n.io/t/markdown-text-spliter-for-vector-store/122248>\
**Category:** Feature Requests\
**Tags:** langchain\
**Created:** [May 28, 2025, 10:11am UTC](https://community.n8n.io/t/markdown-text-spliter-for-vector-store/122248 "2025-05-28T10:11:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KMR](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kmr/32/59163_2.png) [@KMR](https://community.n8n.io/u/KMR)\
**Post date:** [May 28, 2025, 10:11am UTC](https://community.n8n.io/t/markdown-text-spliter-for-vector-store/122248/1 "2025-05-28T10:11:59Z")

</div>

**Node Subcategory** : AI

## The idea is:

Propose a new ​ **Markdown Semantic Splitter** under AI nodes that recursively splits documents based on header hierarchy (e.g., `#`, `##`, `###`). Each split retains parent headers as context metadata, generating semantic-aware chunks.  
For example:

# Chapter 1

## Section 1.1

Content A…

### Subsection 1.1.1

Content B…

generate 2 text chunks:  
`[header: "# Chapter 1 > ## Section 1.1"] Content A...`  
`[header: "# Chapter 1 > ## Section 1.1 > ### Subsection 1.1.1"] Content B...`

## I think it would be beneficial to add this because:

1. ​ **Address Pain Points in Structured Document Processing** : 70% of technical documentation is authored in Markdown (2023 Stack Overflow survey), yet existing generic text splitters fail to leverage its explicit hierarchical structure.
2. ​ **Enhance AI Task Performance** : Tests demonstrate that chunks with hierarchical context metadata improve question-answering system accuracy by 18.7% (arXiv:2307.03172).
3. ​ **Align with Industry Best Practices** : Similar functionality has proven effective in frameworks like LlamaIndex and LangChain.

## Any resources to support this?

- **Implementation Reference** : [LangChain Markdown Header Splitter](https://python.langchain.com/api_reference/text_splitters/markdown/langchain_text_splitters.markdown.MarkdownHeaderTextSplitter.html#markdownheadertextsplitter)

## please vote!!! 😁

---

<div class="post-metadata">

**Author:** ![Sudhanshu\_Sharma](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/sudhanshu_sharma/32/42557_2.png) [@Sudhanshu\_Sharma](https://community.n8n.io/u/Sudhanshu_Sharma)\
**Post date:** [May 28, 2025, 10:22am UTC](https://community.n8n.io/t/markdown-text-spliter-for-vector-store/122248/2 "2025-05-28T10:22:43Z")

</div>

Hey @KMR , you can still this on self host version of n8n using langchain node.

---

<div class="post-metadata">

**Author:** ![KMR](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kmr/32/59163_2.png) [@KMR](https://community.n8n.io/u/KMR)\
**Post date:** [May 28, 2025, 10:47am UTC](https://community.n8n.io/t/markdown-text-spliter-for-vector-store/122248/4 "2025-05-28T10:47:27Z")

</div>

Sure. LangChian Code node is always a choice. On the other hand, if I want to use the vector store node provided by n8n, such as Milvus, I have no way to connect the LangChian Markdown splitter to the data loader node, as shown in the picture. As a result, I have to use LangChain code to implement the entire process of adding documents to the vector database.

 ![截屏2025-05-28 18.42.17](https://europe1.discourse-cdn.com/n8n/original/3X/8/5/85318e80e915565c1c353561a992f4484dca41a4.png)
