mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
[PR #14264] [MERGED] feat: add langchain markdown document splitter #39056
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/14264
Author: @diwakar-s-maurya
Created: 5/24/2025
Status: ✅ Merged
Merged: 7/8/2025
Merged by: @tjbck
Base:
dev← Head:patch-6📝 Commits (1)
871efb4feat: add langchain markdown document splitter📊 Changes
2 files changed (+46 additions, -2 deletions)
View changed files
📝
backend/open_webui/routers/retrieval.py(+45 -2)📝
src/lib/components/admin/Settings/Documents.svelte(+1 -0)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
Description
Markdown format provides data in plain text while still having a way to express hierarchy and formatting. Language models can also understand it well. Using markdown-format-aware document splitting can enahnce RAG.
This PR introduces "Markdown (header)" as new option for "Text Splitter". It uses MarkdownHeaderTextSplitter for its implementation.
Added
Additional Information
It runs RecursiveCharacterTextSplitter again over the splits generated by markdown document splitter. This ensures that final chunks are always of managable size.
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.