Use Knowledge Bases to ask questions across PDFs, documents, and other files in Open WebUI. Upload your files, attach the knowledge base to a model or conversation, and ask a question. This is about searching your own documents, not about letting a model call a tool: the files are the source the model reads from, and the answers should come from them.
Create a knowledge base and upload a file
Start with a running Open WebUI instance, a connected model, and permission to create knowledge bases and upload files. For focused retrieval, use a model that supports Native function calling, with Builtin Tools and the Knowledge Base tool category enabled. Native is the default mode; the model must use its tools to retrieve attached knowledge.
Click Workspace > Knowledge, then Create. Give the knowledge base a name and description. Then upload a small text-based PDF or text file, and wait for processing to finish before asking about it.
Attach the knowledge base to a chat
In a chat, type # in the message input. The list offers Folders, Knowledge (knowledge bases) and Files (single files from knowledge bases), and accepts a web or YouTube URL. Or click + (More) and open Attachments: Attach Knowledge lists your knowledge bases, with Show Files to pick single files from one.
You can also attach knowledge to a model or a folder, so every chat with that model or in that folder can use it: open the Knowledge field, in the model editor (Workspace > Models, or Settings > Models > Edit in the admin section) or in the folder’s Edit dialog under Advanced. Its search lists Notes, Knowledge (knowledge bases) and Files (single files from knowledge bases), and Upload Files adds a file straight from your computer. Workspace > Knowledge lists knowledge bases only; notes live in Notes.
Ask a question and check the answer
Ask a question whose answer is in the file, such as: “Use the attached handbook to find the office opening hours. Quote the relevant passage.” Then compare the answer and any source references with the original document.
Two retrieval modes cover different needs. Retrieve relevant passages (RAG) to let the AI search large document sets efficiently, or turn on Full text to inject a whole document word-for-word when precision matters. A note reaches the model as its full text, while a knowledge base can retrieve the relevant passages on demand — which makes a knowledge base useful for document sets that would exceed the model’s context window if sent in full.
Try it: four checks from upload to quoted answer
| Check | What you should see | If you do not see it |
|---|---|---|
| Knowledge base created | A knowledge base with your name and description listed under Workspace > Knowledge | Check you clicked Workspace > Knowledge, then Create |
| File processed | Your uploaded PDF or text file listed in the knowledge base, with processing finished | Wait for processing to finish before asking about it |
| Attached in chat | Typing # offers Knowledge, and your knowledge base appears in the list |
Check the model supports Native function calling with Builtin Tools and the Knowledge Base tool category enabled |
| Answer quotes the file | The answer quotes the passage about the office opening hours, and the quoted words match the handbook | Compare the answer and any source references with the original document, and check the file finished processing and the knowledge base is attached to this chat |
Expected result. We checked the Open WebUI Knowledge Bases and Document Chat docs page, which gives using Knowledge Bases to ask questions across PDFs, documents, and other files, starting with a running Open WebUI instance, a connected model, and permission to create knowledge bases and upload files, Native function calling as the default mode with Builtin Tools and the Knowledge Base tool category enabled, clicking Workspace > Knowledge then Create with a name and description, uploading a small text-based PDF or text file and waiting for processing to finish, attaching in a chat by typing # with Folders, Knowledge, and Files offered or through + (More) and Attachments with Attach Knowledge and Show Files, attaching to a model or folder through the Knowledge field in the model editor or the folder’s Edit dialog under Advanced, Workspace > Knowledge listing knowledge bases only with notes living in Notes, the example question “Use the attached handbook to find the office opening hours. Quote the relevant passage.”, comparing the answer and any source references with the original document, the two retrieval modes of relevant passages (RAG) and Full text injection word-for-word, and a note reaching the model as its full text while a knowledge base retrieves the relevant passages on demand. We did not install Open WebUI, upload any file, or ask any question on this machine.
Limits
This guide covers uploading documents into Knowledge and asking about them. It is not about letting a model call a tool generally — the knowledge base is a set of documents to search, not a tool the model runs. For one file in one conversation, upload the file to the chat instead; a knowledge base is for a set of documents you want to reuse across conversations. Where document content is processed depends on your extraction, embedding, and model providers. If the model cannot find the content, the docs point to the Knowledge Base troubleshooting page. An answer that quotes the file is only as good as the file: always compare it with the original document before acting on it. We did not run any of this ourselves.
