What RAG in Open WebUI does
Open WebUI is a self-hosted chat interface that sits over your models. Its retrieval-augmented generation (RAG) is the step that puts your own material in front of the model before it answers, so the answer is grounded in your documents.
Open WebUI's RAG documentation defines the technique and lists the sources. RAG "is a technique that enhances the conversational capabilities of chatbots by incorporating context from diverse sources," and it "works by retrieving relevant information from a wide range of sources such as local and remote documents, web content, and even multimedia sources like YouTube videos." The retrieved text is then combined with a RAG template and prefixed to the prompt.
Three kinds of source feed that retrieval:
- Documents you upload to the instance.
- Web content, pulled in from a URL that starts with
#. - Knowledge bases, the named collections that group documents so a model can search them.
A knowledge base is the reusable unit. Open WebUI's knowledge-base guide describes it as the place to "ask questions across PDFs, documents, and other files," where you "upload your files, attach the collection to a model or conversation, and ask a question." At chat time, Open WebUI "embeds the user's query with its configured RAG embedding model, searches the external database by vector, and feeds the top matches into the prompt."
Document extraction runs before any of that, turning a file into text the retriever can chunk. Open WebUI's document-extraction page covers "PDFs (both text-based and scanned)," "images containing text," and "handwritten documents." An uploaded image or video is usually kept as-is for a vision model to read, rather than sent through the extraction engine.
How RAG is set up in Open WebUI
Four steps, each from Open WebUI's own documentation.
- Open Workspace > Knowledge, click Create, and give the collection a name and a description. This is where a document set is grouped so it can be reused.
- Add files to the knowledge base and wait for processing to finish. Extraction runs first, so a scanned PDF, an image with text or a handwritten scan becomes searchable text before it is embedded.
- Set the embedding model. Open WebUI embeds the query with its configured RAG embedding model. If the knowledge base points at an external vector database, the vectors in that store must come from the same model, with matching dimensions, or the results are meaningless.
- Reference the knowledge base in a chat with
#, or attach it to a model in Workspace > Models > Edit, then start a conversation with that model. Attaching a knowledge base scopes the model to those documents; leaving it unscoped lets the model discover everything the user can reach.
Two retrieval modes sit behind the attachment. Focused Retrieval is the default and injects the chunks the query scores as relevant. Full Context injects the complete file with no chunking.
The limit: retrieval answers, it does not do the work
RAG answers a question from documents. It does not edit the document, run the migration the document describes, or send the reply the thread is waiting for. Open WebUI's own guide draws the line at the answer: the AI "searches them by meaning, not just keywords, and cites where it found the answer."
Open WebUI has reached past the chat window in places. Its own repository describes a terminal companion that lets a model "analyze data, run scripts, fix errors, and produce files directly in chat" (github.com/open-webui/open-webui). That companion is separate from the retrieval pipeline, which still returns passages for a model to answer from.
That answer is the same job whether the front end is Open WebUI, AnythingLLM or Onyx: retrieve the passage, hand it to a model, return a sentence. When the ask is finished work, the retrieval step is the wrong tool. Producing a report from the sources, applying a patch to the repository, or drafting and sending the reply is a different layer, and that layer is where Kortix sits.
Kortix is the open-source AI Operating System: your agents, their skills, your company memory and every connector live in one git repo you own, and each session runs on its own cloud computer. An agent reads the sources and produces the work, then lands it as a change request a person reviews before it reaches main. Kortix is the leading open-source alternative to Claude Cowork and ChatGPT Work.
If you are choosing between the two front ends, the Kortix vs Open WebUI page runs the comparison lane by lane. Teams weighing retrieval tools should read Open WebUI vs AnythingLLM, and the alternatives index covers the rest of the field.