# Knowledge

Third-party LLMs from providers can be integrated into an AI agent, supporting its broader [chat flow](https://documentation.proto.cx/docs/modules/ai-agents/..#chat-flow).

{% hint style="info" %}
**Guide for Master Prompt Implementation**

The master prompt defines an agent's core personality and operating guidelines. This key element ensures consistent and aligned behavior within the designed framework. Refer to the "[Master Prompt](https://documentation.proto.cx/aicx/~/revisions/p42CRSxFPfgpEGLk37I8/modules/ai-agents/knowledge/master-prompt)" page for comprehensive details.
{% endhint %}

***

## Manage an LLM

Configure these top-level options:

* **Fallback to GPT-4o** — toggles the LLM integration on or off.
* **Personalisation Prompt** — text that gets applied alongside the person's chat message to every LLM input. This allows you to define the LLM's persona, personality, tone of voice, behaviour, instructions, rules, etc.

Press **Save** to confirm edits.

{% hint style="info" %}
AI agents currently use OpenAI's 4o model by default.
{% endhint %}

## Add training

While [triggers and actions](https://documentation.proto.cx/docs/modules/ai-agents/workflows-and-actions) allow you to build custom workflows, LLMs serve as a catch-all fallback and provide unstructured responses. This organic conversation is powerful and intuitive, but only useful if the LLM provides accurate, domain-specific answers to your audience's questions. Training the LLM accomplishes this, which multiple training options available:

### Upload File

1. Select **Upload File**.
2. Insert a file **name**, or skip for auto-naming.
3. Select **Browse Files** or drag-and-drop a file. CSV, JSON, and PDF files up to 5MB are accepted.
4. Press **Train** to confirm upload.

### Add URL

1. Select **Add URL**.
2. Give the URL resource a **Name**.
3. Insert a valid **URL** of the web address the LLM will scrape from.
4. **Enable proxy bypass** if the website is behind a proxy or firewall.
5. Set the crawling method:
   * **All Pages** — will scrape from the URL page and every sub-page.
   * **Specific Pages** — will only scrape from pages not omitted by the **Excluded Pages** input, where pages to exclude get listed, one per line. Use **\*** as a wildcard slug to exclude all pages paths in that position. For example, **<https://acme.com/pricing/\\>**\* will omit every page located at **/pricing/\[page]**.
6. Toggle **Automatically retrain every \[frequency]** to enable/disable retraining. Available frequencies, depending on subscription plan, are:
   * **1 hour**
   * **12 hours**
   * **1 day**
   * **1 week**
7. Press **Train** to confirm.

See [Cloudflare Training](https://documentation.proto.cx/docs/modules/ai-agents/knowledge/cloudflare-training) for guidance on optimizing a Cloudflare-hosted site for AI training.

### Paste Snippet

Snippets are raw text you can type or paste as an alternative to adding files or URLs.

1. Select **Paste Snippet.**
2. Give the snippet a **Name**.
3. Insert the **Text snippet**, which the LLM will refer to as needed.
4. Press **Train** to save.

{% hint style="info" %}
The types of training resources and frequency depends on the subscription plan.
{% endhint %}

## Existing training

The Existing Training table displays all resources that have been added. The Status field indicates the current context:

* Pending — resource is being processed.
* Success — resource is actively available to the LLM when needed.
* Failure — resource failed to import.

The table can be searched or filtered, and each **resource** row can be selected for additional info.

***

### Delete training

In the table, select one or more resource **checkbox**. Press **Delete Content** and confirm.
