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.
Retrieval and execution are separate stages
Retrieval supplies source text to a model; file editing and command execution require tools. Open WebUI combines retrieval with those tools through Open Terminal / Terminals, which its repository calls a full agent harness.
Open WebUI Computer also includes files, an editor, terminal and git. A retrieval test should therefore check citation accuracy separately from a tool-execution test.
For a report or code change, define two acceptance checks: whether the retrieved evidence is correct, and whether the resulting file or patch is correct. An execution harness can use retrieval as one step in that task.
Check retrieval before the follow-up task. Ask a question whose source passage you can identify, then specify the output you need from that answer. Keep the document citation in the deliverable so a reviewer can verify the source.
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.