> For the complete documentation index, see [llms.txt](https://mava.gitbook.io/mava-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mava.gitbook.io/mava-docs/ai-support/ai-training.md).

# AI Training

Mava AI can be trained almost instantly using all your existing customer support documents. Mava can also learn from replies in public Discord channels.

## Getting started

### AI Accuracy

Before you test or use Mava AI it's important to head over to [Settings within the AI section](https://dashboard.mava.app/dashboard/admin/ai/settings) and input your company name as it's shown in your documents as well as a detailed description of your company.

Both the name and description are used within the AI prompt, so it's vital that you put accurate information here. We recommend a clear but detailed company description.

*Here's an example from Mava, but you'd need to put your own company name and description:*

<figure><img src="https://content.gitbook.com/content/Tebv3SzLbdQL5VOCHzvx/blobs/IvvUnXoKM2IWmG2aoyVF/image.png" alt=""><figcaption></figcaption></figure>

## Uploading sources

To upload sources, go to the [Knowledge Base](https://dashboard.mava.app/dashboard/admin/ai/sources) page, in the AI section of settings.

There are two main options when adding content to Mava:

1. Manually uploading existing support content
2. Automatically training Mava from replies in Public Discord channels

### 1. Manually uploading existing support content

You can upload content to Mava AI easily using your existing support resources. We support the majority of sites, including:

* Websites (*Please note: not all websites can be scraped effectively, this could be due to formatting, permission or site map issues. If you're having issues uploading a site, we recommend uploading the content on a Google Doc instead.)*
* GitBook
* Google Docs
* PDFs

#### Choosing which pages of a website are crawled

When you add a website source, you can open **Advanced — restrict URLs** to control which pages Mava reads. This is useful when your site has content you don't want the AI to learn from, or several language versions of the same docs.

* **Only crawl URLs matching** — Mava only reads pages whose URL matches one of these patterns. For example `*/en/*` keeps only the English pages.
* **Exclude URLs matching** — Mava skips pages whose URL matches one of these patterns. Exclusions win over the "only crawl" list.

Add one pattern per line. `*` matches anything and `?` matches a single character. Trailing slashes are ignored, so to skip a whole section use a pair of patterns, for example `*/fr` and `*/fr/*` to cover the French landing page and everything under it. Leave both boxes empty to crawl the whole site.

#### Checking what was crawled

On the Knowledge Base page, click the page count on a website source to see its crawl report. It shows how many pages were uploaded, any include and exclude patterns you set, and which URLs were crawled successfully (✓) or failed (✗, with the reason).

#### Refreshing content that's been manually uploaded

After you've uploaded a source you'll be able to manually refresh it. It's not currently possible to auto-refresh the content when something changes or at regular time intervals.

<figure><img src="https://content.gitbook.com/content/Tebv3SzLbdQL5VOCHzvx/blobs/vSp7wK9AdEChZ4IKC20I/image.png" alt=""><figcaption></figcaption></figure>

*Tip: Uploading accurate information is really important to ensure you get the best out of Mava AI. If you have outdated or incorrect information uploaded, then your answers are going to be lower quality.*

### 2. Automatically training Mava from replies in Public Discord channels

Mava AI can learn automatically from your team's replies in public Discord channels. This feature is available on the Growth plan and above.

Once you've activated the feature you'll be able to select which Discord roles Mava AI can learn from. We will also show you which channels the bot currently has access to.

<figure><img src="https://content.gitbook.com/content/Tebv3SzLbdQL5VOCHzvx/blobs/35BZ0Tgv0Iqz1ScXFyb6/image.png" alt=""><figcaption></figcaption></figure>

* Mava AI can only learn from public Discord channels (we don't currently allow Mava AI to learn from private tickets to avoid personal information being ingested).
* Mava AI will only learn from content when you 'Reply' to a message to ensure questions and answers are correctly matched.

<figure><img src="https://content.gitbook.com/content/Tebv3SzLbdQL5VOCHzvx/blobs/eMergwOfNwFStqPaEZfy/image.png" alt=""><figcaption><p>Only replies in Public channels the bot has view access to will be added to your AI knowledge base.</p></figcaption></figure>

### 3. Scripted replies

With Scripted replies you can create an answer you’d like the AI to use word-for-word when your users’ ask a specific question. Mava AI will identify if the question is a match before responding almost immediately. If you don’t have a scripted reply the AI will generate a response, as usual, based on your knowledge base.

On the [Knowledge Base](https://dashboard.mava.app/dashboard/admin/ai/sources) page press '+ Create' within the scripted reply section and get started.

<figure><img src="https://2748965171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTebv3SzLbdQL5VOCHzvx%2Fuploads%2F9J9U7JXtiAgYztUstQs4%2Fimage.png?alt=media&#x26;token=6b025784-9c44-4adb-ba42-dab8bb464c93" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2748965171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTebv3SzLbdQL5VOCHzvx%2Fuploads%2FZfcSPSxqp4IvKrbGkMnf%2Fimage.png?alt=media&#x26;token=ddb7234d-b2c6-49b9-a27d-4940d7d4f3b1" alt=""><figcaption></figcaption></figure>

### 4. Correcting or adding an individual answer

You don't need to re-upload an entire document to fix one wrong answer. You can add or edit a single knowledge entry by hand — both from the Knowledge Base page and directly from within a ticket when you spot a wrong AI answer. Each manually added or edited entry keeps a record of which team member added it.
