Open WebUI chunking and Markdown header splitting

Chunking decides how each document is cut before embedding, which sets what retrieval can find and what the model sees. This page explains the settings, their trade-offs and when a change takes effect.

On this page

Why Open WebUI chunking decides what your knowledge base can retrieve

If your Open WebUI knowledge base answers poorly or cites the wrong passage, check chunking before you blame the model. Chunking is the step that cuts each extracted document into pieces, and the retrieval system can only return those pieces. If a answer depends on a sentence that was split across two chunks, or if a chunk carries a heading from one section and text from another, the model receives context that is incomplete or misleading, no matter how good the embedding model is. In Open WebUI, chunking sits between text extraction and embedding: the extraction engine turns a file into text, the chunker divides that text using the knowledge settings you configure, and the embedding model converts each chunk into a vector for search.

Review the chunking settings before launch, because the values you choose shape every document you ingest later. Open the admin settings for documents and retrieval, and record the active chunk size, chunk overlap, whether Markdown header splitting is enabled, and the minimum chunk size target. Do not rely on values from a tutorial or an older install, since the settings in your version are what apply. A second review is warranted after launch, once users start asking questions that the knowledge base should answer. Pull a few failed answers and check which chunk was retrieved, then decide whether the problem is the split point, the lost heading context or the size of the text returned.

Plan the change process before you edit anything. Changes to chunking settings apply to documents that are processed after the change, so existing documents keep the chunks they were built with until they are reprocessed. Confirm with your own test environment how Open WebUI handles re-ingestion of existing files in your version, and whether a knowledge base must be rebuilt for a new setting to take effect everywhere. Because chunking also determines the text that embeddings are built from, a chunking change should be tested on a representative set of documents and questions before it is rolled out to production knowledge bases.

Chunk size, overlap, header splitting and minimum chunk size: what each setting controls

This table compares the four chunking controls the team must set for Open WebUI knowledge: chunk size, chunk overlap, Markdown header splitting and the minimum chunk size target. Each row explains the effect on retrieval precision, context completeness and index size, and when the setting fits. Confirm the exact labels and default behavior in the Open WebUI documentation for your version before you set them.

SettingEffect on retrieval and indexWhen it fits
Chunk sizeLarger chunks keep more context per match but dilute precision and produce fewer, bulkier vectors. Smaller chunks sharpen matches but can split an answer across pieces the model never sees together.Use larger values for long narrative policies. Use smaller values for dense reference material such as FAQs, tickets or clause-level contracts.
Chunk overlapOverlap repeats text at chunk boundaries so a sentence cut at an edge still appears whole in one chunk. It raises the number of chunks and index size, and can return near-duplicate hits.Use modest overlap when content has no clear structure. Keep it low when headers already mark natural boundaries, since repeated text adds cost without much gain.
Markdown header splittingSplits content at Markdown headings so each chunk belongs to one section and carries a clear topic. It only helps when source documents use real heading markup. Extracted text from PDFs or Word files often loses it.Turn it on for internal wikis, exported documentation and converted Markdown that uses consistent heading levels. Leave it off when headings are inconsistent or absent.
Minimum chunk size targetDiscourages very small fragments, such as a lone heading or a single line, that embed poorly and crowd out better results. Setting it too high can merge unrelated sections.Raise it when short sections produce noisy hits. Keep it low for dense, short-entry sources like glossaries or ticket logs where small units are the answer.
Index size and rebuild costAll four settings change how many chunks and vectors exist, so each change affects storage and embedding work for the affected documents.Plan changes on a test knowledge base first and record chunk counts before and after to estimate the full re-index.
When changes applyConfirm whether a new value applies only to documents added or re-uploaded afterward, or whether existing documents must be reprocessed. Behavior differs by version and by knowledge base.Treat existing knowledge bases as needing a planned re-index when settings change, and document which version and settings each knowledge base was built with.

How a document moves from extraction to chunks in a knowledge base

The flow starts when a file is uploaded to a knowledge base. The configured extraction engine turns it into Markdown text, which then passes through header-based splitting, size-based chunking with overlap, and a minimum chunk size check before the embedding service converts each chunk into a vector. Check each hand-off, because a setting that changes any step after extraction applies only to documents processed after the change, and a change to the embedding model or the stored vectors means re-indexing the affected knowledge bases.

Extraction, splitting and embedding are separate hand-offs, and each can be changed independently.

Where Markdown header splitting helps and where it breaks down

Header splitting only works when the source text carries reliable headings. The cards below cover five common document shapes, from well-structured runbooks to flat exports, and show how each one affects the chunks Open WebUI creates. Confirm the shape of your own documents before you choose a splitting strategy.

Structured runbooks and policies

Runbooks and policies usually follow a fixed template, so each heading names a procedure, control or owner. Header splitting keeps every step attached to its heading, so a retrieved chunk tells the model which procedure it belongs to. Check that heading levels are consistent across files, because a policy that uses level three for its main sections will split differently from one that uses level two.

API reference documentation

API references repeat the same headings for every endpoint, such as Parameters, Response or Errors. Splitting on those headings alone produces many near-identical chunks that lose the endpoint name. Put the endpoint path into the heading text or the parent heading, and test a query for a specific endpoint to confirm the returned chunk names it.

Long reports with weak headings

Analyst reports and internal studies often use bold text or numbered paragraphs instead of true heading markup. Header splitting then sees one long section and falls back to size-based chunks, which may cut a finding away from its evidence. Count how many headings the extracted Markdown contains for a sample report before you rely on header splitting for this group.

Flat exports with no headings

CSV dumps, email threads, chat logs and plain-text exports have no heading structure at all. Header splitting has nothing to act on, so the chunk size and overlap settings decide every boundary. Decide whether these files belong in a separate knowledge base with size-based settings, rather than mixing them into a collection built around headed documents.

Extraction output that drops heading markup

Some extraction engines turn headings into plain text, or they flatten table-heavy pages so that titles disappear. The file looks correct when opened, yet the Markdown sent to the splitter has no # markers. Run one document through your extraction engine, inspect the raw Markdown, and confirm how it outputs headings before you tune any splitting settings.

When chunking changes apply to existing documents

Chunking settings only affect a document when that document is processed, which happens at upload or when it is re-processed. Open WebUI splits a file into chunks at that moment and stores the resulting vectors with the knowledge base. Changing chunk size, overlap, Markdown header splitting or the minimum chunk size target updates the configuration for future work only. Chunks already in the vector store stay as they were until the team re-ingests the affected files. Plan for this in any change request: a settings edit made today does not change how last year's policy manuals were split, and an admin can easily assume it did.

Before planning a bulk re-index, establish which documents were chunked under which settings. Open WebUI does not give a simple per-document view of chunking parameters in every release, so ask the vendor documentation for the installed version what metadata is recorded, and check the knowledge base in a test instance. A practical method is to record the settings with each change ticket, note the upload dates of each knowledge base, and compare them against the change log. Confirm in the release documentation whether re-processing a file replaces its old chunks cleanly or leaves duplicates, since that determines whether you can re-run ingestion in place or must rebuild the collection.

A knowledge base that mixes chunking settings returns inconsistent answers. Documents split at small sizes with header boundaries retrieve differently from documents split at large sizes without them, so the same question can pull a precise passage for one file and a wide, diluted passage for another. Users see this as unpredictable quality and blame the model. The safe rule is to treat chunking as a property of the whole knowledge base: either re-ingest every document under the new settings, or keep the old and new settings in separate knowledge bases until the migration is complete and tested with a fixed set of questions.

Setting up chunking for a knowledge base, step by step

This sequence takes a knowledge base from an unknown set of documents to recorded chunking settings that have been checked against real passages. Each step ends with a check, so the team knows what to fix before the settings reach production content.

  1. Inventory the document types and their structure

    The knowledge owner lists every file type the knowledge base will hold, such as Markdown exports, Word policies, PDFs with tables and slide decks, and notes which of them have consistent heading hierarchies. Group them into classes that share structure, since each class may need different splitting. Done when every expected file type appears on the list with a sample file and a note on whether its headings are reliable.

  2. Confirm heading output from extraction

    Upload one sample from each document class to a test knowledge base and open the extracted text. Check whether headings survive extraction as Markdown headings or are flattened into plain paragraphs, and whether tables and lists keep their structure. If headings are lost for a class, fix the extraction step first, because header splitting cannot use headings that were never produced. Done when each class shows its headings in the extracted output.

  3. Choose a baseline chunk size and overlap

    In a test knowledge base only, set one chunk size and one overlap value as a starting baseline, then record them with the embedding model and document set used. Keep the values the same across the test so that differences in later checks come from the document classes, not the settings. Done when the baseline is written down and the test knowledge base is labeled as non-production.

  4. Decide header splitting per document class

    For each class, decide whether to split on Markdown headers before applying the size limit. Enable it for classes with clean, meaningful headings such as policies and technical guides, and leave it off for classes where headings are decorative or missing, such as scanned or flattened PDFs. Run each class with the decision applied and note the result. Done when every class has an explicit yes or no and a reason.

  5. Set the minimum chunk size target

    Set the minimum chunk size target so very short fragments, such as a heading alone or a single line from a table, do not become standalone chunks with little meaning. Test a few values in the test knowledge base and compare how many tiny chunks each produces. Confirm the exact setting name and behavior for your release in the Open WebUI documentation before relying on it. Done when short fragments are merged or reduced to a count your reviewers accept.

  6. Process a representative sample and inspect chunks

    Ingest a sample that covers every document class, including long sections, tables and at least one document with unusual formatting. Open the stored chunks and look for split sentences, orphaned headings separated from their body text, repeated headers in every chunk, and tables cut across rows. Record each problem with the file and chunk it appears in. Done when a reviewer has checked the sample and the problem list is either empty or each item has a planned fix.

  7. Test retrieved passages against real questions

    Write a set of questions that the knowledge base should answer, using real user phrasing where possible, and run them through retrieval. Check whether the returned passages contain the answer with enough surrounding context to be understood, and whether the citation points to the right section. Adjust one setting at a time and rerun the same questions. Done when the question set returns complete answers for the agreed share of questions and the chosen settings are the ones that produced them.

  8. Lock settings and record them

    Write the final chunk size, overlap, minimum chunk size, and per-class header splitting decisions into a settings record, with the embedding model, Open WebUI version and date. Note that changing these settings later affects only documents processed after the change unless they are re-uploaded or re-indexed, so the record should state how existing documents will be reprocessed. Done when the record is approved by the knowledge owner and stored with the knowledge base documentation.

Chunking choices by content type: policies, runbooks, code docs and mixed archives

Policies are long, numbered and cross-referenced, and the meaning of a clause often depends on the section heading above it or on an exception stated later in the same section. Before you ingest them, confirm that the heading hierarchy survived conversion from Word or PDF, because flat text gives the splitter nothing to follow. The settings that usually need the most attention are Markdown header splitting, so each clause keeps its section path, and overlap, so an exception or definition at the end of a section stays retrievable with the rule it modifies.

  • Heading hierarchy: Confirm that section titles are real heading levels in the extracted text, not bold paragraphs.
  • Clause integrity: Look for splits that separate a rule from its exception, or a threshold from the table that sets it.
  • Defined terms: Ask questions that use the policy's own defined terms, since a chunk without the definition can produce a confident but wrong answer.
  • Version markers: Check that effective dates and version numbers appear inside the chunks so a superseded policy can be distinguished from the current one.
  • Cross-references: Test questions that rely on "see section" references, and decide whether the referenced text must be retrieved with the clause.

Before rollout, read the extracted Markdown for a sample of converted policies and measure whether answers cite the correct section and include every applicable exception.

Security and operational considerations for chunking settings

Chunking settings look like a tuning detail, but they decide what text gets stored, who can read it and how changes are recorded. The four concerns below connect because chunks are copies of source documents, and each copy inherits risk from the document it came from.

Who can change and view settings

Chunk size, overlap, header splitting and minimum chunk size are administrative settings, so decide who holds admin rights before tuning starts. Confirm in your version which roles can open the document settings screen and whether non-admin users can see chunk previews. Limit admin accounts to a small named group and review that group's membership on a schedule.

Open WebUI features

Chunks inherit source permissions

A chunk is a fragment of one source document, so anyone who can read a knowledge base can retrieve its chunks through chat. Test with a non-privileged account that a restricted document cannot surface through retrieval after chunking. Confirm how knowledge base sharing and per-resource permissions apply to chunks created from files that were later moved or re-shared.

Chunk logs and sample outputs

Tuning often means printing sample chunks, copying them into tickets or keeping debug logs, and those copies can hold personal data or secrets from the source file. Set a rule that tuning uses a synthetic or approved sample document, and that log levels stay at the default outside a test window. Confirm where your deployment writes application logs and who can read them.

Recording settings for audit

When chunk size or header rules change, the existing documents may keep chunks made under the old settings, so an audit trail should show which settings produced which knowledge base. Record each change with the date, the person, the old and new values and the knowledge bases affected. Confirm whether Open WebUI keeps its own history of admin configuration changes, or whether you must capture it from your change process.

Re-processing and retention of old chunks

Changing settings often does not rewrite existing chunks, so old fragments can persist beside new ones. Decide whether to re-process each knowledge base after a change and how to remove superseded content. Confirm in a test instance whether deleting a source file also removes its chunks from the vector store and any file storage you operate.

Questions teams ask about Open WebUI chunking before hiring help

Can our team tune chunking in Open WebUI without outside help?

Yes, in most cases. Chunk size, chunk overlap, Markdown header splitting and the minimum chunk size are administrator-level settings, so a team with admin access can change them and re-index a test knowledge base. The harder part is judging the result. Tuning only works when someone keeps a fixed set of test questions, records which source document each correct answer should come from, and reviews the answers after every change. If you have a domain expert who will own that list and an administrator who can change settings and re-index, you can run the work in-house. A partner is worth considering when the document mix is wide, nobody has time to build the test set, or results must be explained to a risk or compliance reviewer. Whoever does the work, ask who keeps the test set after it ends.

What drives the effort and cost of a chunking tuning project?

The main drivers are corpus size, document variety and how many test questions already exist. A small set of uniform Markdown files is far quicker to analyze than a large mix of PDFs, Word files and scans, because extraction quality shapes the chunks before any splitting setting applies. Missing test questions add work, since someone must write them and locate the passages that answer them. Cost comes from two parties. A partner bills for analysis, test design, configuration and reporting, while your team pays staff time for reviewers and an administrator. Most of the spend is one-time tuning, but new knowledge bases and changed documents bring recurring retests. When you request a quote, ask for the number of knowledge bases, file types, question count, tuning cycles and whether retests are included.

What does a chunking project need from our team?

It needs four things. Each one is a condition for the results to mean anything.

  • Sample documents that match how people actually use the knowledge base, including the awkward ones such as scanned or inconsistently formatted files.
  • A small group of business reviewers who agree which answers are correct and which source documents should support them.
  • An administrator who can change the settings, trigger re-indexing and check logs during the work.
  • A named owner who approves the final settings and accepts the test results.

Without the reviewers, the project measures how the system behaves, not whether it answers well. Agree on who fills each role before the work starts, so reviews are not delayed by scheduling.

How long does one chunking tuning cycle take?

A cycle lasts as long as it takes to change the settings, re-index the affected knowledge bases, run the test questions and review the answers. Re-index time usually grows with the number of documents, their size and the extraction and embedding work each one needs, so corpus size sets most of the duration. A small Markdown knowledge base can be re-indexed and checked in a short session, while a large mixed collection can take far longer per cycle. Because every chunking change needs a fresh index, the number of cycles matters as much as the speed of each one. Time one re-index on your own instance with a representative knowledge base before you agree on a schedule, and write the expected number of cycles into the scope so the timeline is not open-ended.

Does changing the embedding model affect chunking settings?

Yes. Chunks are embedded with the model in use at indexing time, so a new embedding model means every affected knowledge base must be re-indexed, regardless of the chunking settings. Changing chunk size, overlap or header splitting also requires re-processing the documents it touches, so each chunking change is effectively a re-index of that content. For that reason, settle the embedding model first, then tune chunking on top of it. Check the Open WebUI features documentation for your version to confirm whether a setting applies only to new uploads or to existing documents. Test on one knowledge base before changing the rest. If the embedding model is still open, plan to repeat tuning cycles once that decision is made.

Does Markdown header splitting always improve answer quality?

No. Header splitting helps when documents have a consistent heading structure, because each chunk keeps a section's context together. It helps less when headings are inconsistent, when extraction drops heading markup or when sections vary widely in length. The minimum chunk size target works against both extremes. It stops very short fragments that lose their context, but if it is set too high, it merges unrelated sections into one chunk. Before tuning, inspect how your extraction engine outputs Markdown for a few representative files. Then compare header splitting on and off against the same test questions, and keep the setting that returns the correct source passage more often for your content.

What should a written chunking scope include?

A written scope should name what gets tuned and how success is judged, so the quote reflects the actual work. Ask for:

  • The knowledge bases in scope, their document types and the extraction engine each one uses.
  • The test question set, who writes it and which source documents each answer should cite.
  • The number of tuning cycles, the re-index plan and whether retests after content changes are included.
  • Who approves the final settings and the acceptance criteria.
  • Handover of the settings, the test set and the reporting method to your team.
  • Exclusions, such as embedding model or vector store changes, with the cost of each if it is added later.

DeployOpen agrees scope, deliverables and timelines in writing before work starts, and a quote follows from that scope.

Limits to confirm in your environment before you tune chunking

The chunking settings in Open WebUI apply in ways that depend on your release, your knowledge base setup and the vector store behind it. The cards below list the points to confirm on a test instance before you change production settings, because each one changes how far an earlier re-index or tuning decision can be trusted.

Exact setting names and options

Confirm the precise names of the chunk size, chunk overlap, Markdown header splitting and minimum chunk size fields in the release you run, along with the values each accepts. Labels and defaults have changed between releases, and a config key copied from a blog post or an older version may be ignored silently. Record the release number next to every value you test so the result can be reproduced after an upgrade.

Open WebUI features docs

Scope of header splitting

Find out whether Markdown header splitting is set per knowledge base or globally for the instance. If it is global, a change made for one collection can alter how every other collection is ingested. If it is per knowledge base, confirm which setting applies to documents uploaded before the change and whether the admin interface shows it.

Minimum chunk size enforcement

Ask how the minimum chunk size target is applied: whether short sections are merged with a neighbor, kept as standalone chunks or dropped. Test with a document that has many short headings, such as a glossary or FAQ, and inspect the chunks produced. Short fragments that lose their heading context can weaken retrieval, so the behavior matters more than the number you choose.

Clean overwrite on re-processing

Confirm whether re-processing a document replaces its existing chunks or appends new ones beside the old set. Duplicate chunks inflate retrieval results and can make an answer appear to cite a superseded paragraph. Check this by re-processing one test file twice and counting the stored chunks after each run, and confirm whether a knowledge base reset is needed.

Interaction with the vector store

Confirm how a chunking change propagates into the vector store you run, whether ChromaDB, PGVector, Qdrant, Milvus or another supported backend. Ask whether the store is cleared and rebuilt automatically, whether stale vectors remain after a delete, and how a multi-replica deployment picks up the new settings. Your vector store's own maintenance and backup procedures still apply to the collections it holds.

Scaling Open WebUI docs

How DeployOpen scopes and tunes Open WebUI chunking

DeployOpen approaches Open WebUI chunking as a scoped piece of retrieval work, not a settings change made once and forgotten. We start from the documents your knowledge bases hold, test how they split under the proposed settings, and document what changes when the settings change later. Engagements are fixed-scope, with the deliverables agreed in writing before work begins.

How we scope

  • Inventory the document types, header structure and sizes in each knowledge base before choosing any chunk settings.
  • Agree in writing which knowledge bases, Markdown header levels and chunking parameters are in scope.
  • Confirm which documents must be re-ingested after a change, since existing chunks keep their original settings.

How we build

  • Configure chunk size, overlap, Markdown header splitting and minimum chunk size in a test instance first.
  • Run sample queries against split documents and record where answers lose context or cite the wrong section.
  • Document each chunking setting with its reason, the document types it suits and the tests that support it.

How we hand over

  • Deliver a written runbook covering the settings, the re-ingestion steps and the order in which knowledge bases are rebuilt.
  • Walk your administrators through how to preview splits and decide when a full re-index is required.
  • Provide a test set of questions and expected source sections that your team can rerun after future changes.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer for chunking changes across releases.
  • Retest chunking behavior after Open WebUI upgrades, since extraction and splitting behavior can change between versions.
  • Confirm with your team which owner approves chunk setting changes before they reach production knowledge bases.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.