Custom document extraction service for Open WebUI: when built-in parsers fall short
A team usually reaches for an external extraction engine when its knowledge base answers are weak for a specific set of files. Scanned forms, engineering PDFs with dense drawings and tables, and legacy office formats often come through the built-in parser with missing text, scrambled columns or empty pages, and the model then answers from fragments. The fix is an external extraction engine that Open WebUI routes specific file types to, so the files your built-in parser handles poorly are converted by a service you run and control. Start by sampling the failing documents and recording which types and layouts break, because that list defines what the external service must handle.
Once the external service returns text, Open WebUI treats it like any other extracted content. It splits the text into chunks, sends each chunk to the configured embedding model, and stores the resulting vectors in the vector store behind the knowledge base, alongside the chunk text and file metadata. This means extraction quality sets the ceiling for every later retrieval step, and a poor conversion cannot be repaired by better search or reranking. Test a handful of representative files end to end by asking questions whose answers appear only in those files, and check the retrieved chunks, not just the final answer.
The routing settings, the request format the engine receives and the response fields Open WebUI reads are configuration details that change between releases. Confirm the exact external engine options, supported file type handling and any authentication or timeout settings against the Open WebUI features documentation for the version you run, and test them on the same version before production. Keep the extraction service on a private network segment reachable only from Open WebUI, and record which engine handled which file type so that support staff can trace a bad answer back to its source document.
Request flow from upload to knowledge base
The flow starts when a user uploads a file to a knowledge base in Open WebUI. Open WebUI checks the file type and either sends it to the built-in parser or to your extraction service inside the trust boundary. The extracted text returns to Open WebUI, which chunks and embeds it before writing vectors to the vector store. Check that the external service sits inside your network, that it returns text for every type you route, and that the vector store is one Open WebUI can reach from every replica.
Upload routing to the built-in parser or an internal extraction service, then into the vector store.
Which extraction engine to route which file types to
The built-in parser handles files uploaded to a knowledge base without any extra service. It is the right starting point because it adds nothing to size, secure or patch. Test it against your own documents first, then route only the file types it handles poorly to an external engine.
- Clean digital files: Plain text, Markdown and born-digital documents with a clear reading order are usually handled well in place.
- Complex layout: Multi-column pages, merged table cells and forms are where reading order and cell structure tend to break. Test these file types first.
- Scanned content: Page images carry no text layer, so a text-only parser returns little or nothing. Scanned files need OCR from a separate engine or from a service that includes it.
- Data residency: Extraction stays inside the Open WebUI deployment, which keeps the data flow simple to explain to a privacy reviewer.
- Maintenance: There is nothing extra to run, but parser behavior changes arrive with Open WebUI releases, so retest after each upgrade.
Check: run a representative sample from each file type through the built-in parser and record which ones lose tables, text order or all content before choosing an external engine.
Apache Tika is a general-purpose extraction server that covers a wide range of office and PDF formats. It runs as a separate service next to Open WebUI, so it is a common first external engine when the built-in parser misses a broad set of formats. Its setup, sizing and privacy settings are covered in the Tika sibling topic.
- Format breadth: Coverage across office documents and PDFs can fix a mixed-format backlog with one routing change.
- Layout: Linear text extracts well, but complex tables and multi-column pages can flatten into a single stream. Confirm this with your own samples.
- Scanned content: Scanned PDFs need OCR. Confirm whether your Tika build and configuration include it, or pair Tika with a separate OCR step.
- Data residency: Running Tika on your own network keeps document content inside your boundary. Confirm that it is unreachable from outside and that its logs do not record document text.
- Operations: It is one more service to version, patch and monitor. Size it separately from Open WebUI, because large files increase memory use in the extraction process.
Check: the Tika version you deploy, its supported formats and whether OCR is enabled, against an inventory of the files your users actually upload.
Docling Serve provides layout-aware extraction for PDFs, tables and Word files. It is the usual choice when reading order, table structure and section hierarchy matter more than format breadth. Its CPU and GPU options and its trade-offs against Tika are covered in the Docling sibling topic.
- Layout and tables: The service is designed to recover reading order, tables and section structure, which matters for policy, contract and specification retrieval.
- Format focus: Its stated focus is PDFs, tables and Word files, so keep Tika or the built-in parser for formats outside that set.
- CPU or GPU: Throughput and hardware cost depend on the deployment variant and your document volume. Benchmark on your own files before sizing hardware.
- Scanned content: Results for scanned pages depend on the OCR settings you enable. Test scanned samples separately from digital PDFs.
- Data residency: Self-hosting keeps extracted content in your environment. Confirm which models the service downloads at build or start, and whether they can be mirrored internally for air-gapped use.
Check: the Docling Serve version and its model download requirements against your network policy, then measure table and heading fidelity on your own documents.
A custom extraction service suits documents that general engines handle poorly, such as proprietary forms, engineering drawings or domain-specific layouts. You build and own the parser, so you also own its quality, security and upkeep. It makes sense once you have measured the gaps that Tika or Docling leave on your files.
- Specialized formats: Domain layouts, handwritten forms or proprietary file types may need parsing rules that no general engine provides.
- Interface contract: Define the request and response your Open WebUI version expects, including text, metadata and error handling, before parser work starts.
- Build and test effort: The main cost is engineering time for parsing logic, a labeled test corpus and regression tests. Ask any partner to quote each file family separately so you can see what drives the total.
- Security: Uploaded files are untrusted input. Isolate the parser, limit file size and processing time, and log events without storing document text.
- Data residency: This option gives the strongest control, because you choose every component and where it runs. Document each dependency so a reviewer can trace it.
Check: whether the gap comes from parser quality or from missing OCR, since a configured existing engine may close the gap at lower cost than a build.
Configuration options and when each fits
This table compares the main settings you will make when pointing Open WebUI at your own extraction service, with the condition under which each choice fits. Read each row as a decision: choose the option that matches your document mix, then confirm the exact field names and behavior in the Document Extraction settings of your installed Open WebUI version. The main takeaway is that routing, timeouts and output format decide whether a custom service helps or silently degrades knowledge base quality.
| Option | When it fits | What to confirm in your installed version |
|---|---|---|
| Engine selection | Built-in parsers fail on a defined set of files, such as a specific layout or a proprietary format | Which extraction engine options your version offers and whether the external engine is selectable alongside the default |
| File type routing | Only certain extensions need the custom service, so the rest stay on fast built-in parsing | Whether routing is by extension or global, and what happens to file types you do not list |
| Service URL | Your extraction service runs on a private network address reachable from the Open WebUI containers or pods | That the URL resolves from every Open WebUI replica, not only from the host where you tested |
| Authentication | The service is shared by several applications or sits outside a trusted network segment | Which authentication header or token setting is supported, and where the secret is stored and rotated |
| Timeouts | Large PDFs or scanned batches take longer than the default response window | The timeout setting's unit and default, and whether a timed-out request marks the upload as failed |
| Size limits | Users upload documents larger than your service or proxy accepts | The maximum upload size in Open WebUI, the reverse proxy body limit and the limit your service enforces |
| Output format | Your service returns structured text or Markdown that retains headings and tables, which improves chunking | The plain-text or Markdown shape Open WebUI expects, and a sample knowledge base file to compare before and after |
Setting up a custom extraction service for Open WebUI
This sequence takes a custom extraction service from contract definition to a verified knowledge base, so that files the built-in parsers mishandle reach Open WebUI as clean text. Each step ends with a check that tells you whether the next step can start.
Confirm the request and response contract
Read the features documentation for Open WebUI's external content extraction engine and write down the exact request your service will receive and the response shape Open WebUI expects, including how extracted text and metadata are returned. Your engineers and the DeployOpen team should agree on this contract in writing before any code is written. Done means a short contract document lists every field, content type and error case, and someone outside the build team has reviewed it against the current Open WebUI release you run. Confirm the details with the documentation for your installed version, since field names can change between releases.
Build or deploy the service inside your network
Implement the extraction service, or deploy an existing open-source parser behind a thin adapter that matches the contract, on infrastructure you control. Keep it on a private network segment reachable only from Open WebUI, with no outbound internet access for document content, and add authentication between the two services. Done means the service starts from a repeatable deployment definition, responds to a health check, and rejects requests that lack the shared credential.
Test against a representative file set
Assemble a sample of the files that the built-in parsers handle poorly, drawn from your real document population with sensitive content removed or replaced. Send each file directly to the service and record the returned text, page count, table handling and any errors for each file type. Done means you have a results table with a pass or fail decision for every file type, and the failures are classified as parsing, encoding, timeout or contract errors so the fixes are targeted.
Configure the external engine and routing
In Open WebUI's administrator settings, point the content extraction engine at your service URL and set the credential, then define which file types route to it and which stay on the built-in parser. Keep the routing table in version control or your configuration management so changes are reviewed. Done means Open WebUI reports the external engine as reachable and a test request for a routed file type reaches your service's logs rather than the default parser.
Run a test knowledge base upload
Create a dedicated test knowledge base, upload the representative files through the normal user path, and confirm each file indexes without error. Ask a few questions whose answers appear only in the uploaded documents, and check that the cited passages match the source. Done means every routed file type indexes, the test questions return the expected passages, and the test knowledge base is removed or kept as a documented fixture.
Verify extraction quality before rollout
Have a domain reviewer compare extracted text against the source for a sample of documents, focusing on tables, headings, numbers, multilingual text and any content that drives business decisions. Record the accepted quality threshold and the known limits in a short sign-off note. Done means the reviewer signs the note, the known limits are shared with users who will rely on the knowledge base, and the routing change moves from the test environment to production under the same change process as other configuration.
Keeping the extraction path private and governed
An external extraction engine receives your most sensitive documents, so it needs the same controls as the platform that calls it. The cards below cover where the service runs, how it authenticates callers, what happens to file contents, who can reach extracted text and how the service stays patched.
Network placement of the engine
Run the extraction service on the same private network segment as Open WebUI, with no route from the public internet and no outbound path that the service does not need. Open WebUI should reach it on one internal address and port. Check that the engine cannot make arbitrary outbound requests, because a parser that fetches external content can leak documents or receive injected instructions. Confirm the placement with a test from outside the segment, not only from the design diagram.
Authentication between Open WebUI and the engine
Every request from Open WebUI to the extraction service should carry a credential that the engine verifies, such as a shared secret or a token issued to the Open WebUI service account. Store that credential in your secrets manager, not in a configuration file checked into source control, and plan a rotation procedure before go-live. Confirm which authentication options the extraction engine setting in your Open WebUI version supports, and test that an unauthenticated request is rejected.
Uploaded files in logs and temporary storage
Uploaded documents pass through the engine as raw bytes, and parsers often write them to temporary directories during processing. Decide whether the engine logs request bodies, file names or extracted text, and turn off anything that records document contents. Confirm where temporary files land, who can read that directory, and whether they are deleted after each request or only when the container restarts. Include the same checks in your Open WebUI logging review.
Access to knowledge bases with extracted content
Extracted text becomes searchable knowledge, and it usually inherits no per-document permissions from the original file share. Set knowledge base access through Open WebUI groups and per-resource permissions so that only users cleared for the source material can retrieve it. Review who can create knowledge bases and who can add files to them. Test retrieval as a user without access, because a permission applied to the file alone may not carry over to the chunks the model reads.
Open WebUI featuresPatching the extraction service
Parsing libraries for office formats and PDFs have a long record of security fixes, so the extraction service needs its own patch cycle separate from Open WebUI. Track the engine's releases and its base image, rebuild the container on a fixed schedule and after advisories, and retest a sample of document types after each update. Agree with your security team who approves an update and how a rollback is handled. Keep a record of the version running in each environment.
Detailed hardening steps
The controls above are summarized here. The security hardening group covers the specific jobs in more depth, including secrets, logging, proxies, outbound requests, uploads and admin access, and it is the right next read before you finalize the design. Use those steps as the checklist for your review and record who signed off on each one.
Scaling Open WebUI docsQuestions teams ask before building an extraction service
How much effort does a custom document extraction service take?
Effort rises with the variety of file types, the complexity of document layouts, and whether scanned pages need OCR. Each file type needs its own parsing path, test set and error handling, so a service that covers five formats is far more than five times easier to test if the formats share a parser. The largest hidden effort is testing against real documents from your own archive, including the badly formatted ones that cause extraction failures. Ask any quote to list the file types in scope, the number of sample documents used for acceptance testing, whether OCR is included, and what counts as a passing result.
How long does a custom extraction service take to build?
The duration depends on the same drivers as effort: the number of file types, layout complexity, OCR needs and how quickly representative sample documents become available. Integration with your Open WebUI deployment and its retrieval settings adds time if the hosting environment is not yet defined. No fixed duration applies to every project, so ask for milestones in the written scope, with a clear point where sample-based testing is complete and a sign-off step before the service is connected to production knowledge bases.
What does the client need to provide for an extraction project?
Four inputs matter most. First, a representative set of sample documents, including the hard cases such as scans, tables, and files with unusual structure. Second, network paths that let the Open WebUI host reach the extraction service, and let the service reach any storage it reads from. Third, a named owner who will accept the service after launch and decide on changes to supported formats. Fourth, a decision on where documents may be processed, since that determines the hosting location. Because multi-replica Open WebUI deployments need shared file storage so uploads stay reachable from every replica, confirm that the extraction service can read those uploads from each replica's storage path.
Can an internal team build an extraction service without outside help?
Yes, if the team has engineers who know document parsing, Open WebUI's retrieval pipeline and the platform the service will run on. The usual gaps are not the code itself but sample coverage, acceptance testing against real documents, and a plan for who maintains the service after launch. An internal team should estimate its own effort against the drivers above before deciding. If you prefer a partner, DeployOpen plans, implements and documents self-hosted platforms inside your own infrastructure under a fixed-scope written agreement, and can continue with ongoing support or retainers after handover.
When should we choose Apache Tika or Docling over custom code?
Check the existing options before writing a parser. Apache Tika is suited to extracting text from a wide range of office and PDF formats, and it runs as a separate service you keep private. Docling Serve is suited to layout-aware extraction of PDFs, tables and Word files. Custom code makes sense when your documents use internal or proprietary formats, when specialized fields must be pulled out, or when a supported parser fails on your sample set after tuning. Run the same sample documents through each candidate and compare the extracted text and tables before committing to a build.
What recurring work follows an extraction service after launch?
Recurring work covers patching the service and its dependencies, retesting after changes, and reviewing how Open WebUI upgrades affect the requests it receives. Retesting should use new sample documents, since formats drift over time. Extraction changes can also require re-ingestion: if the output of a parser changes, the affected knowledge bases must be re-indexed to match. Changing the embedding model later also forces a full re-index of every knowledge base. Ask any quote which of these tasks are included in the build, which are handled through a retainer for ongoing support, upgrades and continuous testing, and who pays for re-ingestion runs.
Does a custom extraction service create new security review questions?
Yes. Documents sent to an extraction service often contain confidential or personal data, so the service becomes part of your data flow and your security review. Keep the service inside your own infrastructure, restrict which systems can call it, and log requests and failures without storing document contents beyond what the pipeline needs. Ask whether the service needs its own credentials, how those are stored and rotated, and how temporary files are deleted after extraction. Confirm these answers with your security team before the service receives production documents.
How DeployOpen scopes and delivers extraction routing for Open WebUI
DeployOpen plans, builds and hands over the routing layer that sends selected file types from Open WebUI to your own extraction service, inside infrastructure you control. The work is scoped in writing first, so the file types, extraction service, test corpus and handover materials are agreed before any build starts.
How we scope
- We inventory the file types and document sources that the built-in parsers fail on in your knowledge bases.
- The written scope names which file types route to the external engine and which stay on built-in parsing.
- We confirm the extraction service's owner, hosting location, network path and any data handling constraints before design.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we build
- We configure the external extraction engine settings in Open WebUI and point them at your service endpoint.
- We test routing with a representative sample of your real documents, including edge cases such as scanned pages and tables.
- We check that failed extractions surface clear errors to administrators rather than silently producing empty knowledge.
- We confirm that uploads and extracted text stay on the network paths and storage you have approved for the deployment.
How we hand over
- You receive a written record of the routing configuration, file type mapping and the endpoints each type uses.
- Documentation covers how to add a new file type, change an endpoint and roll back to built-in parsing.
- Test cases and results are delivered so your team can repeat the checks after future Open WebUI upgrades.
- We walk your operations team through the configuration and the failure signals they should watch.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, scoped separately from the build.
- Retainer work can cover retesting the routing after Open WebUI upgrades and changes to the extraction service.
- Your team should confirm with DeployOpen which extraction service version and Open WebUI release the handover covers.
- Quotes follow from the written scope, so ask for the included test corpus size and handover items in writing.

