Skip to content

Commit a032186

Browse files
committed
docs: document knowledge base upload limits
Documents the RAG_KNOWLEDGE_MAX_COUNT / RAG_KNOWLEDGE_MAX_SIZE global admin settings, which cap how many files a knowledge base may hold and how large each file may be. Configurable in Admin Panel → Settings → Documents → Files, alongside the existing Max Upload Size / Max Upload Count fields. Applies globally to every knowledge base and every user (no per-user or per-group override), and is enforced for every way of adding a file to a knowledge base: manual upload, one-shot directory import, incremental directory sync, and the API. - docs/features/workspace/knowledge.mdx: new "Knowledge base upload limits" section under Limitations. - docs/reference/env-configuration.mdx: RAG_KNOWLEDGE_MAX_SIZE / RAG_KNOWLEDGE_MAX_COUNT entries, alongside RAG_FILE_MAX_SIZE / RAG_FILE_MAX_COUNT. - docs/troubleshooting/rag.mdx: updates the existing "Upload Limits and Restrictions" section, which previously documented knowledge base uploads as having no count limit at all.
1 parent ea9cb27 commit a032186

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

docs/features/workspace/knowledge.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,3 +339,12 @@ Files uploaded via API are processed asynchronously. Attempting to use a file be
339339
### Native function calling changes behavior
340340

341341
Native function calling is now the default, and it changes how knowledge bases work: attached KBs are no longer auto-injected, so the model must call the knowledge tools to retrieve them. See [Knowledge Base troubleshooting](/troubleshooting/rag#13-knowledge-base-attached-to-model-not-working) for details.
342+
343+
### Knowledge base upload limits
344+
345+
Administrators can cap how many files a single knowledge base may hold and how large each file may be, in **Admin Panel > Settings > Documents > Max Knowledge Base Files / Max Knowledge Base File Size**, alongside the general upload settings.
346+
347+
- `0` or empty means unlimited.
348+
- These are global settings that apply to every knowledge base and every user, including admins — there is no per-user or per-group override.
349+
350+
These limits are enforced server-side for every way of adding files to a knowledge base — the manual upload button, the one-shot **Upload Directory** import, incremental directory sync, and the API — not just the primary upload form, so a user can't work around them by switching upload methods. If a limit is hit you'll see an error before any file processing begins.

docs/reference/env-configuration.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3865,6 +3865,20 @@ The `markdown_header` option has been removed from `RAG_TEXT_SPLITTER`. Markdown
38653865
- Description: Sets the maximum number of files that can be uploaded at once for document ingestion.
38663866
- Persistence: This environment variable is a `ConfigVar` variable.
38673867

3868+
#### `RAG_KNOWLEDGE_MAX_SIZE`
3869+
3870+
- Type: `int`
3871+
- Default: `None` (unlimited)
3872+
- Description: Sets the maximum size, in MB, of a single file that can be added to a knowledge base. `0` also means unlimited. Applies to every way of adding a file to a knowledge base (manual upload, directory upload, directory sync, and the API). Configurable in **Admin Panel → Settings → Documents → Max Knowledge Base File Size**.
3873+
- Persistence: This environment variable is a `ConfigVar` variable.
3874+
3875+
#### `RAG_KNOWLEDGE_MAX_COUNT`
3876+
3877+
- Type: `int`
3878+
- Default: `None` (unlimited)
3879+
- Description: Sets the maximum number of files allowed in a single knowledge base. `0` also means unlimited. Configurable in **Admin Panel → Settings → Documents → Max Knowledge Base Files**.
3880+
- Persistence: This environment variable is a `ConfigVar` variable.
3881+
38683882
#### `RAG_FILE_CONTENT_SEARCH_MAX_CHARS`
38693883

38703884
- Type: `int`

docs/troubleshooting/rag.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Open WebUI implements various limits to ensure system stability and prevent abus
204204
* **Allowed File Extensions:** Controlled by `RAG_ALLOWED_FILE_EXTENSIONS` (default: All). Configurable in **Settings > Admin > Tools > Documents > General > Allowed File Extensions**.
205205
* **Folder Uploads:** Subject to the `FOLDER_MAX_FILE_COUNT` [environment variable](/reference/env-configuration/#folder_max_file_count) (defaults to 100). This limit applies to the number of files directly associated with a folder.
206206
* **Knowledge Base Uploads:**
207-
* **File Limit:** Subject to the same `RAG_FILE_MAX_SIZE` limit as chats, but **not** subject to the `RAG_FILE_MAX_COUNT` limit, allowing for unlimited file uploads.
207+
* **File Limit:** Subject to the same `RAG_FILE_MAX_SIZE` limit as chats (not `RAG_FILE_MAX_COUNT`, which only applies to chat attachments), plus two knowledge-base-specific limits: `RAG_KNOWLEDGE_MAX_SIZE` (max size per file, default unlimited) and `RAG_KNOWLEDGE_MAX_COUNT` (max files per knowledge base, default unlimited). Both are configurable in **Settings > Admin > Tools > Documents > Files > Max Knowledge Base File Size / Max Knowledge Base Files** and apply to every upload method (manual upload, directory upload/sync, and the API).
208208
* **RAG Enforcement:** All files uploaded to a Knowledge Base are automatically indexed. However, similar to chat uploads, Knowledge Bases can also be used in **Full Context Mode** (accessible in chat settings), which feeds the full document content to the model instead of using vector search retrieval.
209209

210210
:::info

0 commit comments

Comments
 (0)