Open WebUI RAG and vector database setup

Open WebUI retrieval depends on the vector database, extraction engine, search settings and the storage behind it. This page explains the decisions, build order, effort drivers and checks for production.

On this page

Open WebUI RAG setup starts with where the vectors live

A team that wants staff to ask questions over internal documents through Open WebUI has to settle how retrieval is built before rollout, because the choice of vector store shapes everything after it. In Open WebUI, retrieval-augmented generation works through knowledge bases: uploaded documents are extracted, split into chunks, converted into embeddings and stored in a vector database. When a user asks a question, the closest chunks are retrieved and passed to the language model as context, so the answer is grounded in the team's own files. The default setup, which uses ChromaDB, is adequate for a single-instance trial on one machine. It is not adequate once several workers or replicas share the same knowledge, because the scaling guide warns that the default ChromaDB will crash in multi-process setups and an external vector database is then required.

The vector store is only one of four choices that interact. Extraction determines what text reaches the index at all, since scanned pages, tables and unusual file formats can lose content before embedding begins. Search determines how chunks are matched: Open WebUI's retrieval features support hybrid BM25 keyword search combined with vector search, and a poor choice here can miss exact identifiers such as policy numbers. Reranking with a cross-encoder then reorders the candidates, which improves precision but adds latency and compute on every query. Changing one of these settings after documents are indexed usually means re-indexing, so the reader should test the combination on a representative document set before committing.

Open WebUI supports 13 vector databases, including ChromaDB, PGVector, Qdrant, Milvus and Elasticsearch, so the practical question is which one your operations team can run, back up and monitor alongside PostgreSQL and Redis. Confirm with the project's current documentation which backends and embedding options your target version exposes, since retrieval settings change between releases. Scaling decisions such as PostgreSQL, Redis and replica layout are covered in the high availability page, identity and group-based access to knowledge in the SSO and identity page, and model provider connections in the Ollama and OpenAI-compatible providers page. This section only addresses how retrieval is built and where its data lives.

Which retrieval components you are actually configuring

A document answer in Open WebUI passes through several components, each with its own storage and its own settings. Knowing which part stores what, and where it is configured, tells you what to test before users depend on the knowledge base. Setting names differ between releases, so confirm each one against the version you deploy.

Knowledge base and source files

A knowledge base is the named collection of documents that users search. It holds the uploaded files, their extracted text and the links between each file and the chunks derived from it. Decide who can create knowledge bases and who can attach them to models, since permissions are set per resource. Check how deletions propagate, because removing a file should also remove its chunks from the index. Confirm the upload and collection controls in the admin settings of your release.

Open WebUI features

Embedding model

The embedding step converts each text chunk into a vector so the database can find passages by meaning. The embedding model you choose fixes the vector dimension and must match at query time, so changing it later means re-indexing every knowledge base. Check whether the model runs locally or calls a remote API, since that determines where document text is sent. Confirm the embedding engine and model settings in the document settings of your release.

Vector database connection

The vector database stores the embeddings and answers nearest-neighbor queries. Open WebUI supports several backends, including ChromaDB, PGVector, Qdrant, Milvus and Elasticsearch. The default ChromaDB will crash in multi-process setups, so multiple workers or replicas need an external store. Confirm the connection settings and their environment variables against your release before you size the cluster.

Supported vector databases
13
Scaling guide

Content extraction engine

The extraction engine turns PDFs, Office files and other formats into plain text before chunking. Extraction quality decides whether tables, headings and scanned pages reach the index at all, so a weak engine caps retrieval accuracy regardless of the other settings. Test with representative files from your own document set, including scanned and table-heavy ones. Confirm which extraction engines your release offers and where they are selected in the document settings.

BM25 keyword index for hybrid search

Hybrid search combines a BM25 keyword index with vector similarity, so exact terms such as product codes, policy numbers and names still match when meaning-based search misses them. The keyword index is built from the same chunks and must be kept in step with the vector store. Enable hybrid search only after you have a test set of queries that shows the trade-off in your documents. Confirm the hybrid search toggle and its weighting controls in your release.

Cross-encoder reranker

The reranker rescores the candidate passages returned by search with a cross-encoder, which reads the query and each passage together. It usually improves the order of results, but it adds latency and compute to every question, and it needs its own model. Set the number of candidates and the final passages sent to the model with care, since both affect answer quality and cost. Confirm the reranker model and its top-k settings in your release.

Shared file storage for uploads

Uploaded files and knowledge content must stay reachable from every replica, or a user who uploads on one instance gets missing documents on another. Shared storage is a requirement for multi-replica deployments, and its performance affects ingestion and retrieval times. Keep the database file on local SSD or NVMe when you use SQLite, and never put it on network storage. Confirm the storage path and backup scope for your release before go-live.

Scaling guide

Choosing a vector database for Open WebUI knowledge

This table compares the vector database options named in the Open WebUI features documentation, with the fit and operating cost of each. Read it by matching your deployment shape first, then checking the operational burden the row describes. The main takeaway is that the default ChromaDB suits only a single process, so any multi-replica or multi-worker design needs an external vector store.

OptionWhen it fitsOperational costWatch for
ChromaDB (default)Single instance, evaluation and small knowledge basesRuns inside the Open WebUI container, so little extra to operateNot suited to multi-process setups; the scaling guide warns it will crash there
PGVectorExisting PostgreSQL estate and teams that already back up and patch itAdds an extension to a database you already run, with no new serviceConfirm extension version and index settings with your DBA before sizing
QdrantDedicated vector store shared by several replicasNew service to deploy, back up, monitor and upgradeConfirm the current client and connection settings in the Open WebUI docs
MilvusLarge corpora and teams comfortable running a distributed data platformMulti-component cluster with more moving parts to size and upgradeExpect the highest skills requirement of the listed options
ElasticsearchOrganizations already running a search cluster that needs keyword and vector search togetherCluster licensing and hosting terms vary by edition; confirm with the vendorHybrid BM25 plus vector search fits here, but cluster sizing is its own discipline
Other supported stores (13 in total)Only where your platform team already operates the store and the docs confirm supportSame review as above for each store you addCheck the features documentation for the full list before choosing

How a document moves from upload to a grounded answer

The diagram starts with a user uploading a file to one Open WebUI replica, which writes it to shared file storage so every replica can reach it. Extraction, chunking and embedding then run before vectors land in the external vector database, which is the first hand-off to check. At query time, hybrid BM25 and vector search pull candidate passages, a cross-encoder reranker orders them, and only the top passages reach the model. Confirm where each trust boundary sits in your own network before you approve the design.

Upload, indexing and query paths across user, replica, storage and vector database boundaries.

Configuring extraction, embeddings and hybrid search in order

This sequence takes a document retrieval setup from a confirmed deployment model to a pilot knowledge base that answers questions with the expected source documents. Each step closes with a check, so problems surface before users depend on the knowledge base.

  1. Confirm deployment model and shared storage

    Before touching retrieval, confirm whether the deployment runs as a single instance or several replicas. The scaling guide requires PostgreSQL instead of SQLite for multi-instance deployments and Redis plus shared file storage for multiple replicas, so uploads and knowledge must be reachable from every replica. SQLite is acceptable for a single replica only when the database file sits on locally attached SSD or NVMe storage, not network storage. Check: write a test file through the admin path, confirm it is stored in the shared location your replicas use, and record the database engine and storage path in the design notes.

  2. Connect an external vector database

    Replace the default ChromaDB with an external vector database if you run several workers or replicas, because the scaling guide warns that the default ChromaDB will crash in multi-process setups. Choose from the supported options, such as PGVector, Qdrant, Milvus or Elasticsearch, based on the operations skills and backup tooling your team already runs. Configure the connection through the environment settings your install method uses, then confirm the vendor's current configuration keys in the Open WebUI features documentation. Check: restart the service, confirm it starts without errors, and verify the vector store accepts a test collection write from each replica.

  3. Select and test the extraction engine

    Choose the content extraction engine that matches your document mix, which typically includes PDFs with scanned pages, tables, Office files and images. Run a representative sample set of 20 to 30 files that reflects real formats and layouts from your business, and label the files that should extract cleanly. Review how each engine handles tables, headers, and multi-column text, and note which files need manual preparation. Check: review the upload log for failed or empty extractions, and confirm the extracted text for each sample matches the source closely enough for answers to cite it.

  4. Set embedding model and chunking

    Select the embedding model and set the chunk size and overlap for the document types you tested. Chunk size controls how much context each retrieved passage carries, so test two or three settings against the sample set rather than picking a single default. Record the embedding model name and version, because changing it later requires re-embedding the entire knowledge base. Check: re-upload the sample set under the chosen settings, then run ten known questions and confirm each returns a chunk from the expected source document.

  5. Enable hybrid search and reranking

    Turn on hybrid search, which combines BM25 keyword matching with vector similarity, and enable cross-encoder reranking to reorder the candidate passages. Keyword matching helps with exact product codes, policy numbers and names that embeddings can miss, while reranking improves the order of results before they reach the model. Confirm the reranking model's resource cost in your environment, since reranking adds work per query. Check: run the same known questions with hybrid search on and off, compare which source documents appear in the top results, and keep the configuration that returns the expected documents more consistently.

  6. Load and verify a pilot knowledge base

    Load a pilot knowledge base limited to one department or document set, with access restricted to a small group of testers through the group permissions model. Run a fixed set of questions covering exact lookups, paraphrased questions and questions with no answer in the documents. Check: confirm that answers cite the expected sources, that questions outside the corpus are declined rather than answered from general knowledge, and that a second replica returns the same knowledge base contents and results. Document the findings before expanding the corpus.

What drives RAG setup effort and how to keep it down

This table compares the main drivers of retrieval setup effort in Open WebUI, how each one raises cost or duration, and the levers that keep it down. Read each row as a question to answer before scoping, because the largest savings usually come from narrowing the first corpus and reusing services you already run.

DriverHow it raises cost or durationHow to keep it down
Document count and corpus sizeMore files mean longer ingestion, more chunks to embed, larger indexes and more time spent checking which sources are current and allowed.Start with a narrow pilot corpus of approved, current documents and expand in batches after retrieval quality is confirmed.
File formats and scanned contentScanned PDFs and mixed formats need an extraction engine that can read them, and each format adds testing and failure cases to review.Inventory formats early, drop unsupported or low-value file types from the pilot, and confirm which extraction engine handles each format in your version.
Number of knowledge bases and ownersEach knowledge base needs its own content owner, access groups, refresh rules and review of who can see what, which multiplies coordination.Limit the first rollout to a few knowledge bases with named owners and reuse one permission model across them.
Replicas and workersMultiple replicas need an external vector database, PostgreSQL, Redis and shared file storage, and each component must be configured and tested together.Confirm whether you truly need several replicas for the pilot, and test the single-replica path before adding shared services.
Existing PostgreSQL or search clustersA new database or search service means new provisioning, backup, monitoring and access controls, all of which add work.Reuse an existing PostgreSQL or supported search cluster your team already operates, and confirm the Open WebUI version supports it.
Compliance evidence neededAssessors may ask for data flow diagrams, retention settings, access reviews and logs for the retrieval store, which takes documentation time beyond the build.Agree the evidence list before build starts and capture configuration and logs as the system is set up rather than after go-live.
Answer quality evaluationWithout a defined test set, teams re-test by hand after every change to chunking, embeddings, hybrid search or reranking, which repeats effort.Write a fixed set of evaluation questions with expected source documents and rerun it after each configuration change.

How single node, Kubernetes and air-gapped setups change retrieval choices

A single Open WebUI container or a pip-installed process on one host is the simplest retrieval setup. The default embedded vector store can be acceptable here because only one process writes to it, but that tolerance depends on load and on how the host stores data. SQLite remains acceptable for single-replica deployments, evaluation and small teams, and the scaling guide limits that use to database files on locally attached SSD or NVMe storage rather than network storage.

  • Database location: Confirm the SQLite file and the knowledge files sit on local SSD or NVMe, not on an NFS or SMB mount.
  • Vector store tolerance: A local store is reasonable for a small, single-writer knowledge base. Plan a move to an external store before adding workers or replicas.
  • Backups: Define how the database file and uploaded documents are backed up together so retrieval state stays consistent after a restore.
  • Upgrade path: Keep the data layout documented so a later move to PostgreSQL and an external vector database does not require reimporting everything.
  • Scale signal: Treat the first need for a second worker or replica as the trigger to revisit every choice in this topic.

Before go-live, confirm the storage type under the data directory, the backup job that covers it, and the document volume you expect to index.

Access control and data handling for knowledge bases

A knowledge base is only as safe as the people who can read, add and share it, and the systems that store and transmit its contents. The cards below cover the decisions that connect permissions, credentials, network paths, deletion and model provider exposure. General platform controls are covered on the security hardening page.

Per-resource permissions on knowledge bases

Open WebUI documents per-resource permissions alongside role-based access control with groups, so access to a knowledge base can be set separately from general chat access. Decide which groups can read each collection before users upload anything. Test with a non-admin account that holds only the intended group, and confirm that a user outside the group cannot retrieve its documents through chat or the API. Check the permission on every new collection, not only the defaults.

Open WebUI features

Group mapping from the identity setup

Knowledge access is only as accurate as the group membership behind it. If groups are provisioned from your identity provider through SCIM 2.0 or mapped at sign-in over OIDC or LDAP, a person who leaves a department should lose its knowledge bases on the next sync. Confirm which system is the source of truth for each group and how often membership refreshes. Stale group membership is a common route to retained access.

Open WebUI features

Who can create and share knowledge

Decide whether every user may create a knowledge base or only a small set of curators. Open creation spreads sensitive uploads across the tenant and makes later review hard. A curator model keeps ingestion under named owners, who can then approve sharing to wider groups. Ask for a written list of roles that can create, edit and share collections, and review it after each reorganization.

Vector database credentials and network path

The vector store holds embeddings of your documents, which can be reconstructed into meaningful text, so treat it as a data store of the same sensitivity. Use dedicated credentials for Open WebUI, keep them in your secrets manager, and restrict the network path so only the Open WebUI service can reach the database port. For multi-replica deployments, the scaling guide requires an external vector database, so this path must be designed for every replica. Confirm how your chosen database authenticates and encrypts connections.

Scaling guide

Deletion of embeddings after file removal

Removing a file from Open WebUI should also remove its chunks and vectors from the vector database, or retrieval can keep surfacing content the owner has withdrawn. Test this directly: upload a marked test file, delete it, then query for its unique phrase and confirm nothing returns. Check whether backups and replicas keep copies, and set a documented retention rule for them. Ask your vendor to confirm the deletion behavior for your chosen database.

Retrieved text sent to remote providers

In a retrieval-augmented chat, the retrieved passages are included in the prompt sent to the selected model. If that model is a remote API, your document content leaves your infrastructure on every query that matches it. Map each knowledge base to the providers allowed to receive its content, and block remote models for collections that cannot leave your boundary. The same concern applies to reranking and any external embedding service, so confirm where each step runs.

Open WebUI features

How to test retrieval quality and failure behavior

Test retrieval before users depend on it. Build a fixed question set from real documents in the knowledge base, with each question paired with the source document and section that should be cited in the answer. Agree the pass criteria with the document owners and the security team before the first run, so nobody adjusts the bar after seeing the results. Cover the question types users actually ask: exact lookups, questions whose answer spans two documents, and questions the knowledge base cannot answer. The last group matters most, because a correct response there is to say the information is not present. Run the same set after every change to the extraction engine, the embedding model, the hybrid search or reranking settings, or the vector database, and record which sources came back for each question. Vector database and extraction results are only comparable across runs if the set and the criteria stay fixed.

Failure tests are where RAG setups usually fail quietly. Test four cases on a staging copy of your deployment. First, stop the external vector database and query a knowledge base. Second, upload a deliberately malformed file, such as a truncated PDF or a file with the wrong extension, and confirm the upload is rejected or flagged rather than stored as an empty document. Third, restart one replica while a document is uploading and check whether the file, its vector entries and the knowledge base record end up consistent. Fourth, sign in as a user without permission to a shared knowledge base and ask questions that the content would answer. Confirm the user receives no excerpt, title or citation from that knowledge base. Confirm the exact behavior of each case in your version with the Open WebUI features documentation and your own environment.

A safe failure has three properties. It returns a clear error that tells the user retrieval is unavailable or a file failed, without exposing stack traces, file contents or internal paths. It leaks no content from documents the user cannot read, including through partial answers or citations. It does not silently fall back to unrelated sources or to the model's general knowledge while presenting the answer as grounded in the knowledge base. Record these outcomes as pass or fail for each test case, and treat a silent fallback as a failure even when the answer looks reasonable. Ask your implementation partner or your own team to document the expected behavior for each case before testing starts, so the results can be judged against agreed criteria rather than impressions.

What to monitor, back up and document after go-live

Once retrieval is live, the knowledge base needs routine attention in four areas: the stores behind it, the quality of what gets ingested, the change events that alter retrieval, and the records the operations team relies on. The cards below connect these areas, because a change in one (a new embedding model, a new release, a restore) can quietly affect the others.

Vector database health and growth

Track the size, query latency and resource use of the external vector database you chose, not only the Open WebUI container. The scaling guide warns that the default ChromaDB will crash in multi-process setups, so confirm the store stays up under concurrent workers and replicas. Watch index growth against the document count in each knowledge base, and set alerts before disk or memory limits are reached. Ask the vendor of your chosen store which metrics it exposes.

Scaling guide

Extraction error rates

Count failed and partial document extractions per knowledge base and per file type. A file that uploads but produces little or no text is a silent failure: users ask questions the knowledge base cannot answer and assume the model is at fault. Sample extracted text for scanned PDFs, spreadsheets and slide decks each month. Record which extraction engine handled each file so a change in engine can be traced to a change in results.

Reindexing after model or chunking changes

Changing the embedding model or the chunk size and overlap makes existing vectors incompatible with new queries. Plan a full reindex of affected knowledge bases as a controlled change, with a named owner, a test set of known questions and a rollback path to the previous vectors. Keep the embedding model name and chunking settings recorded alongside each knowledge base so the team can tell which configuration produced which answers. Confirm in the Open WebUI documentation how reindexing is triggered in your release.

Coordinated backups across three stores

Back up PostgreSQL, the file storage that holds uploads, and the vector store together, on a schedule that lets you restore all three to the same point in time. A restore that brings back vectors without the matching files or database rows leaves knowledge bases that show documents users cannot open or that cite chunks which no longer exist. Test a full restore into a separate environment and check that a sample of answers cites the right source files. Ask your storage and database teams who owns the snapshot timing.

Upgrade testing for retrieval changes

Each Open WebUI release can change how retrieval, reranking or extraction behaves, so treat upgrades as a retrieval regression event. Run a fixed set of questions against a staging copy of the knowledge base before and after the upgrade, and compare the cited sources. Recent releases were published on October 10 and October 16, 2026, so a monthly review cadence will not keep pace unless you track the release notes. Keep a rollback plan that includes the database schema state.

Latest cited release
v0.12.3
Release notes

Runbook and knowledge base inventory

Maintain an inventory listing each knowledge base, its owner, its source documents, the embedding and chunking settings, the vector store it uses, the group permissions that control access and the date of last review. The runbook should cover ingestion failures, reindexing, restore steps and who to call. Without this record, operations staff cannot answer basic questions such as which documents a group can search or which settings produced a given answer during an incident.

How much RAG setup work should buyers plan for, and what does it need from them?

What drives the cost of an Open WebUI RAG setup?

The cost is driven by how much of the retrieval design has to be decided and built, not by the software license, which is free under the Open WebUI License for most small deployments. The main drivers are the number and format of documents, how many people and groups need access, whether permissions must follow the source systems, which vector database and extraction engine are chosen, and whether hybrid search and reranking are needed. Each of these adds design, testing and operations work. No figure is given here because effort depends on your environment. Ask for a written scope that lists each driver and the work it covers, and confirm with your team which parts are one-time (setup, tuning, evaluation) and which recur (re-indexing, upgrades, support).

How long does a RAG pilot take in Open WebUI?

A pilot length depends on the size and messiness of the corpus, the number of document types, and whether the environment already exists. A clean set of text documents on an existing PostgreSQL and external vector database moves much faster than scanned PDFs, mixed permissions and a new cluster. Plan the pilot around three phases: agreeing the corpus and access rules, building and indexing a limited knowledge base, then testing answers against a fixed question set. Ask any provider to state the pilot duration in the written scope, along with what moves it, such as document cleanup or approval cycles on your side.

What does our internal team need to provide for a RAG setup?

Your team has to provide the inputs that only your organization holds. These are:

  • The documents in scope, with the owner of each collection and the approved source systems
  • Access rules that say which groups may see which documents, so per-resource permissions can be set correctly
  • A named business owner who can approve retrieval settings and sign off on answers
  • A test question set with expected answers, drawn from real users' questions
  • A non-production environment with PostgreSQL, storage and an external vector database, plus a path to production

Without these, the pilot tends to stall at the access and evaluation steps, which are the slowest to resolve.

Can our team set up Open WebUI RAG without a partner?

Yes, a team with Linux, Docker or Kubernetes, database and storage administration experience can set up basic document retrieval using the official install methods and the features documentation. The harder parts are usually not the install itself. They are choosing a vector database and extraction engine that your operations team can support, designing access so users only retrieve documents they may read, and building an evaluation set that shows whether answers are accurate. Consider a partner if your team lacks capacity for these tasks or needs an independent review before a security or compliance assessment. Confirm your own skills and time before deciding.

When does an external vector database become mandatory for Open WebUI?

An external vector database is required once you run several workers or replicas. The Open WebUI scaling guide warns that the default ChromaDB will crash in multi-process setups, so a deployment with more than one process needs a database such as PGVector, Qdrant, Milvus or Elasticsearch, all of which are among the 13 supported options. A single-replica evaluation may run on the default, but it should not be treated as production-ready. Pair the vector choice with PostgreSQL and Redis, because multi-replica deployments need those too. Confirm the exact configuration with the scaling documentation before you commit to a design.

What should a quote for Open WebUI RAG setup include?

A quote should follow from a written scope that names the deliverables and acceptance criteria before work starts. Ask it to state the environments covered, the vector database and extraction engine chosen and why, the document sources and formats in scope, how permissions are mapped, how retrieval quality is tested against your question set, what documentation and runbooks are delivered, and what is excluded. Also ask which items are one-time and which recur, such as upgrades, re-indexing or support retainers. DeployOpen does not publish a price list; a quote follows from the written scope, so compare proposals on the same scope.

How DeployOpen scopes, builds and hands over Open WebUI retrieval

DeployOpen plans, builds, tests and documents Open WebUI retrieval inside the client's own infrastructure, whether that is a cloud account, data center or air-gapped network. The work starts with the document sources, user groups and vector store decision, then moves through configuration, verification and a handover the client's operations team can run.

How we scope

  • The written scope names the document sources, file types and knowledge bases that retrieval must cover.
  • Scope records the vector database, extraction engine and hybrid search settings chosen for the deployment.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • We configure the chosen vector database alongside PostgreSQL, Redis and shared storage where several replicas run.
  • We tune extraction, chunking, hybrid BM25 plus vector search and reranking against the agreed document set.
  • We test retrieval answers against a set of representative questions and record where results need adjustment.

How we hand over

  • Handover includes configuration records, knowledge base sizing notes and the settings behind each retrieval choice.
  • We document how knowledge bases are created, reindexed and removed, with the steps your administrators will repeat.
  • We walk your administrators through permissions, backups of the vector store and the checks to run after upgrades.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after go-live.
  • Support can cover retesting retrieval after Open WebUI releases and after new document collections are added.
  • Confirm with us in the quote which support tasks, response expectations and testing cadence the retainer includes.

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.