> ## Documentation Index
> Fetch the complete documentation index at: https://docs.varios-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Bases

> Manage knowledge bases, data sources and their configuration

<Tip>
  Home > "Admin Menu" > "Knowledge Bases"
</Tip>

With VARIOS AI, you can create powerful **vector databases** based on the Retrieval-Augmented Generation (RAG) approach – we call them **knowledge bases**. Documents are ingested through various **data sources** (e.g. manual upload, GitHub, WebDAV, VARIOS AI server folder), stored as embeddings, and made available via semantic search. Knowledge bases can be assigned to one or more assistants.

Benefits:

* **Semantic search**: Instead of simple keyword matching, the system searches for semantically similar content using vectorization.
* **Up-to-date knowledge**: New or changed documents can be synchronized automatically or manually depending on the source type.
* **Use in assistants**: Enable knowledge bases for assistants to incorporate company-specific knowledge into responses (see [Global Assistants](../global-assistants)).

## Knowledge Base Overview

On the **Knowledge Bases** page, you can see all created knowledge bases in a table:

| Column        | Meaning                                                                              |
| ------------- | ------------------------------------------------------------------------------------ |
| **Name**      | Name of the knowledge base                                                           |
| **Documents** | Number of documents across all sources of this knowledge base                        |
| **Status**    | Overall status: **green** = OK, **orange** = processing in progress, **red** = error |

**Actions per row:**

* **Edit** (pencil icon): Open the knowledge base, manage name/description and **sources**.
* **Delete** (trash icon): Remove the knowledge base including all sources and documents.

You can filter by name using the search field. The list is paginated ("Previous" / "Next").

<Warning>
  When deleting a knowledge base, all associated sources and documents are
  permanently removed. Consider removing the knowledge base from all assistants
  first.
</Warning>

## Create and Edit a Knowledge Base

<Steps>
  <Step title="Create a new knowledge base">
    Click **New Knowledge Base**. You will be redirected to the editing view.
  </Step>

  <Step title="Set name and description">
    Enter a **name** and optionally a **description** (e.g. purpose and
    content). Click **Save** to create the knowledge base.
  </Step>

  <Step title="Select AI Model for Generating Embeddings">
    Select which embedding model should be used in the knowledge database
    to generate embeddings.
  </Step>

  <Step title="Add data sources">
    Only after saving can you create sources under **Create New Source**. Select
    the **data source type** and click **Create Source**. Then configure the
    source (see section [Data Sources and Source
    Types](#data-sources-and-source-types)).
  </Step>

  <Step title="Assign knowledge base to an assistant">
    Enable the knowledge base for one or more [Global
    Assistants](../global-assistants). Permissions controlling which users can
    access which knowledge base are managed via the assistants.
  </Step>
</Steps>

## Data Sources and Source Types

A knowledge base can have **multiple sources**. Each source has a **source type** that is set when creating it and **cannot be changed** afterwards.

<Warning>
  **Source type is permanent:** The type of a source (e.g. GitHub, WebDAV)
  cannot be changed after creation. For a different type, you must create a
  **new source** and optionally delete the old one.
</Warning>

### Available Source Types

| Type                        | Description                                                      | Limit per Knowledge Base |
| --------------------------- | ---------------------------------------------------------------- | ------------------------ |
| **Manual Upload**           | Upload documents via drag & drop or file selection               | 1 source                 |
| **VARIOS AI server folder** | Folder path on the host system (e.g. share folder)               | unlimited                |
| **GitHub**                  | Content from a GitHub repository (branch, path, file extensions) | unlimited                |
| **WebDAV**                  | Share via WebDAV (URL, user, password, folder, depth)            | unlimited                |

### General Configuration for Each Source

* **Your name for the data source:** A freely chosen display name (e.g. "GitHub 1", "WebDAV Legal Texts").
* **Test connection:** For GitHub, WebDAV, and VARIOS AI server folder, this button checks credentials and reachability. If errors occur, a red "Error" status appears in the configuration.
* **Synchronization:** Only for sources with external access (not for Manual Upload):
  * **Interval:** Manual, every hour, every day, every week, or every month.
  * **Sync now:** Starts an immediate sync.

After saving a source, the interface shows **Configuration** (Status: No Errors / Error) and **Files** (number of documents, status Done / Processing / Error). You can reload, delete, or edit the source using the icons.

***

### Manual Upload

* Only **one** source of type "Manual Upload" is allowed per knowledge base. When the limit is reached, "Manual Upload (Limit reached)" appears and the option is disabled.
* **Documents:** Drag files into the drag & drop area or click **Upload** and select files.
* There is **no synchronization interval** – content is only added by manual upload.
* **Selected documents:** List of uploaded files with status:
  * **Done** (green): Successfully processed and embedded.
  * **Processing** (orange): Processing is still in progress.
  * **Error** (red): Processing failed (e.g. invalid format).
* Individual documents can be removed from the source using the trash icon.

<Tip>
  Supported formats can be found in the application (e.g. PDF, DOCX, TXT, MD).
  Very large files may be excluded depending on the configuration.
</Tip>

***

### VARIOS AI server folder

Documents are read from a **local folder** that is mounted as a volume into the container. The **share folder** you specify in the UI is a subfolder within the container base directory `/data/Data/KnowledgebaseDocuments`.

| Setting          | Required | Description                                                                                                                   |
| ---------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **Share Folder** | Yes      | Subfolder within the base directory (e.g. `/my-documents`). All files in this folder and its subfolders are read recursively. |

* **Test connection** checks whether the folder exists in the container and is readable.
* Hidden files (starting with `.` or `~`) and symlinks are automatically skipped.

<Card title="Set Up VARIOS AI Server Folder" icon="folder-open" href="./local-folder">
  Technical guide: Configure Docker Compose volumes, mount network shares
  (SMB/NFS), troubleshoot common errors.
</Card>

***

### GitHub

Documents are loaded from a **GitHub repository**.

| Setting                       | Required | Description                                                                                                                                                     |
| ----------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Repository**                | Yes      | Format `owner/repo` (e.g. `varios-ai/docs`).                                                                                                                    |
| **Access Token**              | Yes      | Personal Access Token (Classic or Fine-grained) with read access to the repository. Links: "Create Fine-grained Token (recommended)" or "Create Classic Token". |
| **Branch**                    | Yes      | Branch to synchronize (default: `main`).                                                                                                                        |
| **Path in Repository**        | No       | Subpath in the repo (e.g. `/docs`). `/` = root.                                                                                                                 |
| **Recursive**                 | No       | If enabled, subfolders are included.                                                                                                                            |
| **File Extensions**           | No       | Comma-separated list (e.g. `md,txt,json,yaml,yml,pdf,docx`). Only these extensions are processed.                                                               |
| **Maximum File Size (Bytes)** | No       | Upper limit per file. Note in the UI: 10 MB = 10485760, 50 MB = 52428800, 100 MB = 104857600.                                                                   |
| **GitHub URL**                | No       | API base URL (default: `https://api.github.com`). Only change for GitHub Enterprise.                                                                            |

* **Test connection** checks repository, token, and branch.
* Possible errors: invalid repository format, authentication failed, insufficient permissions, repository/branch not found, API rate limit.

***

### WebDAV

Documents are fetched from a **WebDAV server** (e.g. Nextcloud, ownCloud).

| Setting          | Required | Description                                                                                      |
| ---------------- | -------- | ------------------------------------------------------------------------------------------------ |
| **Domain**       | Yes      | Full URL of the WebDAV server (e.g. `https://www.your-domain.com`). Scheme and host must be set. |
| **User**         | Yes      | Username for authentication.                                                                     |
| **Password**     | Yes      | Password for authentication.                                                                     |
| **Share Folder** | Yes      | Path to the folder on the WebDAV server (e.g. `/` for root or `/Documents/Knowledge`).           |
| **Folder Depth** | Yes      | How many subfolder levels from the share folder are searched (minimum 1).                        |

* **Test connection** checks URL and authentication. Common errors: authentication failed, scheme/host not set.

***

## Status and Error Handling

### Knowledge Base Status (Overview List)

* **Green:** No errors, all sources are OK and documents have been processed.
* **Orange:** At least one source or documents are "Processing" (e.g. sync or embedding is running).
* **Red:** At least one source or documents have the status "Error".

### Source Status (in the Editing View)

* **No Errors:** Configuration and connection are OK.
* **Error:** Connection test or last sync failed (e.g. wrong credentials, folder unreachable).
* **Synchronizing:** Sync is currently running.

### Document Status (per Source)

* **Done:** Document was successfully read and embedded.
* **Processing:** Processing or embedding is still in progress.
* **Error:** Processing failed (e.g. file format, size, read error).

<Steps>
  <Step title="If the knowledge base shows a red status">
    In the overview, click **Edit** and check the sources. Open the source with
    a red configuration status (edit icon).
  </Step>

  <Step title="Check the source">
    Run **Test connection**. Read the error message (e.g. wrong path, invalid
    token, WebDAV login). Correct the settings and click **Save**.
  </Step>

  <Step title="Trigger sync again if needed">
    For GitHub/WebDAV/VARIOS AI server folder, click **Sync now**. Then check the document
    list (filter "Error", optionally remove individual documents or re-embed
    them if the UI offers that option).
  </Step>
</Steps>

## Quick Overview: What to Keep in Mind

* **Source type**: Choose before creating – it cannot be changed afterwards.
* **Manual Upload:** Only one such source per knowledge base; documents are uploaded manually only.
* **VARIOS AI server folder:** Check the path and read permissions on the host/container; mount volumes correctly if needed.
* **GitHub:** Token with sufficient permissions (read repository); consider rate limits.
* **WebDAV:** URL including scheme (e.g. `https://`), correct user and password; set share folder and folder depth appropriately.
* **Synchronization:** Only for GitHub, WebDAV, and VARIOS AI server folder – choose an interval or sync manually.
* **Permissions:** Access to knowledge bases is managed via assignment to [Global Assistants](./global-assistants).

<Tip>
  Permissions controlling which users can access which knowledge base are
  managed via the assistants. Only assign the knowledge base to assistants for
  which the content is intended.
</Tip>
