# 4. Training

The bot is only as good as your knowledge base. “Training” means adding content to your server’s Knowledge Base.

### Option A: Upload documents (recommended)

Use: `/kb_add` and attach a file

Supported types include: `.txt`, `.md`, `.pdf`, `.docx`, `.csv`, `.json`, `.xml`, `.html`

What happens: The bot extracts text from the file Splits it into multiple entries when it detects Q\&A or headings Automatically generates tags Shows progress like: **Extracting entry 1/10**, **2/10**, etc.

### Option B: Add a single entry manually

Use: `/kb_manual_add`

This is best for: FAQs Short policy answers Quick setup steps Common support questions

#### Updating and maintaining training data

View entries: `/kb_list`

Update entries: `/kb_update`

Delete entries: `/kb_delete`

Clear everything (danger): `/kb_clear`

#### Tips for best results

Use question-style titles (like users will ask) Write complete answers (include steps, links, examples) Add tags (keywords users might use) Break long documents into logical sections (or upload multiple files)

{% hint style="info" %}
Use this txt file as a reference or sample for KB entries
{% endhint %}

{% file src="/files/5HGvzzDyBQHoqHUYNjGa" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ansari-labs.gitbook.io/ansari-labs/products/ai-powered-assistant/setup-guide/4.-training.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
