mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 19:38:46 -05:00
[GH-ISSUE #16558] issue: The lack of transmission of headers in rag prompt #56624
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?
Originally created by @Sank-WoT on GitHub (Aug 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16558
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
0.6.23
Ollama Version (if applicable)
No response
Operating System
win10
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Based on the description of the 0.6.16 release, it is expected that the markdown hierarchy will be preserved and passed as a prompt.
Enhanced Markdown Document Splitting: Improve knowledge retrieval from Markdown files with a new header-aware splitting strategy. This method intelligently chunks documents based on their header structure, preserving the original context and hierarchy for more accurate and relevant RAG results.
Example: I used our README.md
I expect this behavior while maintaining the header hierarchy for the docker question.
Open WebUI
How to Install
Quick Start with Docker 🐳
Actual Behavior
I got chunk
Quick Start with Docker 🐳
Steps to Reproduce
Logs & Screenshots
After examining the code, I noticed that the headers are not transmitted anywhere in the prompt.
Here the headers are collected in the metadata field

438e5d966f/backend/open_webui/routers/retrieval.py (L1220)Here we form the context

438e5d966f/backend/open_webui/utils/middleware.py (L967)here we form final rag template

438e5d966f/backend/open_webui/utils/task.py (L151)After reviewing the code, I don't see highlighted headers being used anywhere.
I think this is a bug, otherwise add documentation where the headers are used?
Additional Information
No response