# Documents & Knowledge

There are two ways to give the AI your documents:

| | Files in a chat | Knowledge base |
| --- | --- | --- |
| **Best for** | One-off questions about a few files | Documents you use again and again |
| **Available in** | That one chat | Any chat, and in assistants |
| **How** | Attach files in the input field | **Workspace → Knowledge** |

Before you upload anything, check [what data you may enter](https://datalab.tuwien.ac.at/aiml/privacy/#what-data-you-may-enter).

## Files in a chat

Attach one or more files (e.g. PDF, Word, Markdown, text) in the input field, then ask your question, for example
*"Summarize the main findings of the attached paper."* The files are only available in this chat.

## Knowledge bases

1. Go to **Workspace → Knowledge** and create a knowledge base with a name and description.
2. Upload your files and wait until they are processed.
3. In any chat, type `#` and pick the knowledge base. Or attach it to an
   [assistant](https://datalab.tuwien.ac.at/aiml/openwebui/assistants/) so it is always available there.

Knowledge bases can be [shared](https://datalab.tuwien.ac.at/aiml/openwebui/team-collaboration/) with colleagues.

See [Knowledge](https://docs.openwebui.com/features/workspace/knowledge) and
[RAG](https://docs.openwebui.com/features/chat-conversations/rag/) in the official documentation for details, such as
retrieval modes and file limits.

## Tips

- **Clean text works best.** Well-structured documents with headings, lists and tables give better answers than scanned
  PDFs. Tools like [Docling](https://github.com/docling-project/docling) can convert documents to Markdown.
- **Ask specific questions.** Mention the document or section you mean.
- **Check the sources.** Answers based on your documents show which passages were used.