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

# Knowledge bases

> Create a knowledge base, add documents, search indexed passages, and manage prompts, settings, and the knowledge graph.

A knowledge base is a set of documents a [Persona](https://developers.webai.com/using-webai/personas.md) can read when it answers. Open one from [Library](https://developers.webai.com/using-webai/library.md): click **Knowledge bases**, then click the knowledge base. Its page opens on **Overview**.

> [card] Add documents
>
> Click **Add files**, check the list on **Documents**, then **Start Ingestion**.

> [card] Search indexed text
>
> Use **Search** to find the passages a chat would cite.

> [card] Suggest prompts
>
> Add prompts that appear on home when a chat targets this knowledge base.

> [card] Manage the base
>
> Rename it, rebuild its knowledge graph, change the embedding model, or delete it.

## Open a knowledge base

**1. Open Library**

Click **Library** in the left sidebar.

**2. Open Knowledge bases**

Click **Knowledge bases**. Each row shows the name and how many documents it holds.

**3. Open one**

Click a knowledge base. The breadcrumb shows Library, Knowledge bases, then its name. The page opens on **Overview**.

**Overview** shows service status, the newest documents, and suggested prompts. Use **Documents**, **Search**, and **Suggested Prompts** in the tab bar. Open **More** when you need **Data Studio** or **Settings**.

## Add and ingest documents

**1. Choose files**

Click **Add files** and pick one or more files. They wait on **Documents** so you can check them.

**2. Start ingestion**

Click **Start Ingestion** to index them, or **Cancel** to drop the staged files.

**3. Wait for indexing**

Each document joins the list once indexing finishes. A Persona that reads this knowledge base can then use those documents when it answers.

Supported types include `.txt`, `.md`, `.html`, `.htm`, `.csv`, `.docx`, `.pdf`, `.json`, `.xml`, `.log`, and `.rst`. Legacy `.doc` files are not supported. The header shows how many documents you have out of **2,000**.

## Create a knowledge base

You create a knowledge base from a [Persona](https://developers.webai.com/using-webai/personas.md), not from Library.

**1. Create one while you make a Persona**

Click **Personas**, then **New persona**. On the frame that asks what it needs for the job, add the files it should read. See [Create a Persona](https://developers.webai.com/using-webai/personas.md#create-a-persona).

**2. Or add documents on an existing Persona**

Open the Persona, click **Knowledge base**, then **Add document**. The first time, webAI makes a knowledge base named after the Persona and attaches it. See [Manage documents](https://developers.webai.com/using-webai/personas.md#manage-documents).

**3. Open it in Library**

That knowledge base then appears under [Library](https://developers.webai.com/using-webai/library.md) → **Knowledge bases**, where you can add more files and use Search, Suggested Prompts, Settings, and the other tabs on this page.

## Search

Click **Search**. Type a query and run the search. Results show the file name, chunk number, match score, and a short preview. Click a result to open the citation preview.

Search finds indexed passages in this knowledge base. To ask a Persona that uses these documents in a full chat, open that [Persona](https://developers.webai.com/using-webai/personas.md) or chat with it from [Home](https://developers.webai.com/using-webai/chat.md).

## Suggested prompts

Click **Suggested Prompts**, or click **Manage** under Suggested Prompts on **Overview**.

**1. Add a prompt**

Click **Add prompt**. Enter a **Question**. Optionally add an **Expected answer** to spot-check retrieval.

**2. Save as you type**

Edits save as you type. You can hold up to **32** prompts.

Prompts appear on home when a chat targets this knowledge base. You can also **Import from JSON** if you already have a list of questions.

## Rebuild the knowledge graph

After at least one document is ingested, open the options menu on the knowledge base and choose **Build knowledge graph** or **Rebuild knowledge graph**.

A rebuild discards the current themes, entities, and summaries, then builds them again from the documents. Whole-collection answers are unavailable until the rebuild finishes. Confirm **Rebuild** when asked. If a build is already running, the menu offers **Restart knowledge graph build**.

## Settings

Open **Settings** from the tab bar or **More**.

Before the first ingestion, choose **Ingestion Mode**:

* **Text-only**: Extract and embed text. Recommended for most documents.
* **Multimodal**: Extract page images, tables, and figures from PDF and DOCX files.

You can also set chunking options before the first ingestion. After documents are ingested, those settings are locked and show as read-only values for this knowledge base.

## Data Studio

Open **Data Studio** from the tab bar or **More**.

**Collection Statistics** shows Points, Vectors, Indexed, Status, and Segments. Click **Refresh** to update them. **Chunks** lists indexed passages with their file names so you can page through what was stored.

## Rename, change the model, or delete

Open the options menu on the knowledge base.

* **Rename** opens **Edit Knowledge Base**. Change the name, description, or icon, then click **Save**.
* Click the embedding model pill on the knowledge base header when you need a different model. Confirm **Drop vectors and reingest** if you continue. Personas set up for the old model will no longer match this knowledge base.
* **Delete** opens **Delete Knowledge Base**. Confirm **Delete** to remove the documents, embeddings, and associated data. Any active ingestions are cancelled.

> [!NOTE]
>
> A Persona's **Knowledge base** tab is the quickest way to give that Persona documents. Open the Persona, click **Knowledge base**, then **Add document**. The first time, webAI makes a knowledge base named after the Persona and attaches it. That knowledge base then appears in Library. See [Manage documents](https://developers.webai.com/using-webai/personas.md#manage-documents).

## Common questions

> [accordion] How do I create a knowledge base?
>
> Create one from a [Persona](https://developers.webai.com/using-webai/personas.md). During **New persona**, add the files it should read, or open an existing Persona, click **Knowledge base**, then **Add document**. The first time, webAI makes a knowledge base named after that Persona.

> [accordion] What is the difference between Search and chatting with a Persona?
>
> **Search** finds indexed passages in this knowledge base. Chatting with a [Persona](https://developers.webai.com/using-webai/personas.md) that reads it answers in a full conversation.

> [accordion] Where do suggested prompts show up?
>
> Prompts appear on home when a chat targets this knowledge base. You can hold up to 32. Edits save as you type.

> [accordion] Can I change Settings after I add documents?
>
> **Ingestion Mode** and chunking options lock after the first ingestion and then show as read-only.

> [accordion] What happens if I delete a knowledge base?
>
> **Delete** permanently removes its documents, embeddings, and associated data. Active ingestions are cancelled.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.