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

# Train your AI agent on your website, files, and data

> Add files, websites, text, Q&A, Notion pages, support tickets, and Zendesk macros to train your AI agent, and keep them in sync.

Data Sources are the content a Chatbase AI agent learns from and answers with: website pages, files, text snippets, Q\&A pairs, Notion pages, and closed support tickets from Zendesk or Salesforce. You manage them on **Build > Data Sources**. Add a source and the AI agent picks it up within seconds, with no retrain button.

## Which source type should I use?

| You have | Add it as | Why |
| - | - | - |
| A public website or help center | [Website](#website), with **Crawl links** or **Sitemap** | Chatbase discovers the pages for you, and **Resync now** or [Auto-resync](#auto-resync) picks up later changes. |
| Pages that need a login | [Website](#website) with [Private links](#private-links) | Chatbase signs in before it reads the pages. Business, Enterprise, and legacy Pro plans only. |
| A Shopify store | [Website](#website), using your `/sitemap.xml` | Uses less of your size limit than a full crawl and avoids duplicate product and collection pages. |
| PDFs, manuals, or Word documents | [Files](#files) | Accepts `.pdf`, `.txt`, `.doc`, and `.docx` up to 20 MB each, as long as the text is selectable. |
| A policy or note that isn't published anywhere | [Text](#text) | Quick to write and edit in the dashboard. |
| Questions that need one exact, consistent answer, such as pricing | Q\&A | When a customer asks something similar, the AI agent gives your answer. |
| A knowledge base in Notion | [Notion](#notion) | Imports the pages you choose and syncs changes. |
| Past resolved conversations in Zendesk or Salesforce | [Tickets](#tickets) | The AI agent learns from how your team already solved customer issues. |

## The Data Sources page

The buttons across the top add content: **Add files**, **Add website**, **Add text snippet**, **Add Q\&A's**, **Add Notion Pages**, **Add Tickets**, and **Add Zendesk macros**.

Everything you add appears in one list below, tagged with its type. Use these controls to work with the list:

* **Search** and the **All sources** filter narrow the list by name or type.
* **Bulk select** lets you act on several sources at once.
* **Sources per page** controls how many rows you see.
* The counter on the right tracks usage against your plan's total size limit in MB. To raise the limit, buy the [Extra storage add-on](https://chatbase.co/docs/user-guides/workspace/settings.md#extra-storage).
* The header shows when the AI agent was last synced, next to the **Auto-resync** dropdown.

## How training works

Every change takes effect on its own. Add, edit, or delete a source and the AI agent learns it within a minute. Each row shows its own status:

* **Syncing** while the source is being processed.
* **Synced** once it is live.
* **Failed** with the reason, so you can fix the source and try again.

> [!TIP]
>
> **Basic**, **Business**, **Enterprise** and legacy **Pro** plans include [Auto-resync](#auto-resync), which re-reads your websites, Notion pages, tickets, and Zendesk macros every week to pick up changes made outside Chatbase.

> [!NOTE]
>
> Data Sources go live as soon as they sync. Unlike instructions or Actions, they don't wait for you to click **Publish**, and restoring an earlier version doesn't change them. See [Drafts and versions](https://chatbase.co/docs/user-guides/chatbot/versions.md#settings-that-go-live-right-away).

## Prepare your content

The AI agent can only answer as well as the text in its Data Sources. A few habits make a big difference:

* **Make sure the text is readable.** Chatbase trains on text, not images or videos. Use PDFs with selectable text, not scans. If a website isn't scraper-friendly, copy the content into a text snippet or upload it as a PDF.
* **Give each topic a clear heading.** Text snippets work best as plain text with Markdown-style structure: a heading per topic, then short paragraphs or lists under it.
* **State facts explicitly.** Write "Shipping: delivery within 1 to 2 weeks, ships worldwide" rather than "delivery times vary". Vague or hedged text leads to vague answers. See [Best Practices](https://chatbase.co/docs/user-guides/quick-start/best-practices.md#improve-readability-of-data-sources) for more examples.
* **Keep one current version of each fact.** If a return policy appears in an old PDF and on your website, update or delete the old copy, so the AI agent doesn't find two different answers.
* **Leave out pages that don't help customers.** Exclude sections such as `/blog` or `/careers` with [Exclude paths](#advanced-options) when they aren't relevant to the questions your AI agent handles.
* **Use Q\&A for answers that must not vary.** Add several phrasings of the same question to one answer, so the AI agent recognizes it however customers ask.

## Adding sources

### Files

Click **Add files** to upload documents. Chatbase accepts `.pdf`, `.txt`, `.doc`, and `.docx` files up to 20 MB each. The text in a file must be selectable. Scanned PDFs with no text layer cannot be trained on.

**1. Choose files**

Click **Add files**, then click the upload area or drag documents into it. Click **Add file source** to start the upload.

**2. Wait for the upload**

Files enter a queue and upload one by one.

**3. Check the status**

Each file trains as soon as its upload finishes. Its row shows **Syncing**, then **Synced**. If extraction fails, the row shows **Failed** with the reason. Fix the file and upload it again.

![Add file panel with drag-and-drop upload area](https://mintcdn.com/chatbase/zTZRPKAb4DU-aGMx/user-guides/chatbot/images/sources/sources-files-1.png?fit=max\&auto=format\&n=zTZRPKAb4DU-aGMx\&q=85\&s=d562ce2a524b756c707740287f06ad59)

### Text

Click **Add text snippet** to add short pieces of content that don't belong in a document, such as a policy, a product note, or an internal FAQ. Give each snippet a title so you can find it at a glance.

Snippets support rich text formatting:

* Headings
* Bold, italic, underline, and strikethrough
* Ordered and bulleted lists
* Hyperlinks
* Emojis

Plain text with Markdown-style structure works best for the AI agent.

![Add text snippet panel with the formatting toolbar and heading menu open](https://mintcdn.com/chatbase/zTZRPKAb4DU-aGMx/user-guides/chatbot/images/sources/sources-text-1.png?fit=max\&auto=format\&n=zTZRPKAb4DU-aGMx\&q=85\&s=ec9d0f245d662d37d76b6c482b015c2b)

### Website

Click **Add website** to train the AI agent on web content. The panel has three tabs:

1. **Crawl links.** Enter the homepage URL and Chatbase discovers every public page.
2. **Sitemap.** Point to an XML sitemap for a structured list of URLs.
3. **Individual link.** Enter the specific URLs you want.

Enter the URL and click **Fetch links**. Chatbase shows the exact link count after training, since a crawl can discover new links and some may be invalid.

For crawls and sitemaps, expand **Advanced options** to set **Exclude paths** for URLs you don't want, such as a blog or a careers section. The same options are available later from the [Advanced options](#advanced-options) tab when editing the source.

Multiple websites can be crawled at the same time. For pages behind a login, see [Private links](#private-links).

> [!NOTE]
>
> If you use Shopify, add your sitemap at `/sitemap.xml` instead of crawling the whole store. This uses less of your size limit and avoids duplicate product and collection pages.

![Add website panel with the Crawl links tab and Advanced options expanded](https://mintcdn.com/chatbase/zTZRPKAb4DU-aGMx/user-guides/chatbot/images/sources/sources-website-1.png?fit=max\&auto=format\&n=zTZRPKAb4DU-aGMx\&q=85\&s=c075d509cf10ad7d502508fa6f6485f3)

#### Reviewing fetched links

Click a website source to open the **Edit link** panel. The **Fetched links** tab lists every link Chatbase found, grouped by path. Expand a folder such as `/docs` to see the pages inside it. Each row shows how many links it holds and how much of your size limit they use. Use the search box or the sort button to find a page.

Links are split into tabs:

* **Trained.** Pages that were crawled successfully and the AI agent learns from, such as product pages, blog posts, and documentation.
* **Not found.** Pages that could not be accessed, usually because they don't exist or returned an error. This tab only appears when a crawl hit such pages.
* **Excluded.** Pages the AI agent does not use, either because Chatbase skipped them, such as login, signup, and duplicate pages, or because you excluded them.

![Fetched links tab with trained and excluded links grouped by path and a folder expanded](https://mintcdn.com/chatbase/zTZRPKAb4DU-aGMx/user-guides/chatbot/images/sources/sources-website-3.png?fit=max\&auto=format\&n=zTZRPKAb4DU-aGMx\&q=85\&s=dfe1980c6331bcb23d1c350aa9c22cea)

#### Excluding and including links

Tick the checkbox next to a page or a folder to select it. Selecting a folder selects every page inside it, and the footer shows how many links are selected. Then:

* In **Trained**, click **Exclude selected links** to stop the AI agent from using those pages. They leave the AI agent's knowledge right away.
* In **Excluded**, click **Include selected links** to bring those pages back into training.

**Discard** clears the selection without changing anything.

To skip a whole section of a site, such as `/blog`, tick its parent folder and exclude it, or add it to **Exclude paths** on the [Advanced options](#advanced-options) tab so it is skipped on every crawl.

![Selected pages in the Trained tab with the Exclude selected links button](https://mintcdn.com/chatbase/zTZRPKAb4DU-aGMx/user-guides/chatbot/images/sources/sources-website-4.png?fit=max\&auto=format\&n=zTZRPKAb4DU-aGMx\&q=85\&s=b8d2b011e56cacb171ee765e55460892)

#### Resyncing a website

To re-read a website when its content has changed, click the three dots on its row, then **Resync now**. The same menu has **Edit**, which opens the Edit link panel, and **Delete**. Sitemaps are also re-read on the [Auto-resync](#auto-resync) schedule.

![Three-dots menu on a website source with Edit, Resync now, and Delete](https://mintcdn.com/chatbase/zTZRPKAb4DU-aGMx/user-guides/chatbot/images/sources/sources-website-resync.png?fit=max\&auto=format\&n=zTZRPKAb4DU-aGMx\&q=85\&s=276260128f7b5a464aa898c1bac0382c)

#### Advanced options

The **Advanced options** tab of the **Edit link** panel controls how Chatbase crawls the website. Saving a change starts a resync of that website.

**Exclude paths.** Add patterns for URLs to skip. Pick a match type, enter the path, and click **Add path**. Patterns are grouped by match type, and **Clear all** removes them. Match types:

| Match type | Skips URLs that |
| - | - |
| **Starts with** | begin with the path, such as `/blog` |
| **Ends with** | end with the path |
| **Contains** | include the path anywhere |
| **Exact match** | equal the path exactly |
| **Wildcard** | match a pattern with `*` placeholders |

**Scraping location.** Runs scraping from the selected country. Useful for geo-restricted or localized sites. The default is the US.

**Slow-scraping.** Spreads requests out to avoid overwhelming a site with limited resources. Turn it on if crawls fail or your server struggles under load.

**Include query parameters.** Treats URLs that differ only by query parameters, such as `?page=1`, as separate pages. Leave it off unless those parameters change the page content.

![Advanced options tab with exclude paths, scraping location, slow-scraping, include query parameters, and authentication](https://mintcdn.com/chatbase/Brn4Jt8zn_gx42zS/user-guides/chatbot/images/sources/sources-website-advanced-options.png?fit=max\&auto=format\&n=Brn4Jt8zn_gx42zS\&q=85\&s=1225ad1d7e7a6a7378c5f544bd83970b)

> [!NOTE]
>
> If Chatbase cannot crawl your website, you may need to allow our crawler in your `robots.txt` file. **Contact our Support team first** so we can whitelist your website on our side, then add this user agent:
>
> ```text theme={null}
> User-agent: ChatbaseCrawler/1.0
> ```

#### Private links

> [!NOTE]
>
> Private links are available on the Business, Enterprise and legacy Pro plans.

If some of your pages are only visible after logging in, Chatbase can sign in before it reads them. Open **Advanced options** when you add the website, or the **Advanced options** tab when you edit it, and go to **Authentication**. Choose one method per website:

* **Headers.** Paste the HTTP headers a signed-in browser sends, usually a `Cookie` header. Chatbase checks them once before each training run, then sends them with every page of the website.
* **Prompt.** Describe the login steps in plain words, for example: `Click "Log in", type jane@acme.com as the email and my password, then click "Sign in".` An automated browser follows the steps. The first sign-in takes about a minute; later runs reuse it and start in seconds.

![Authentication section in Advanced options with the Prompt tab selected and login steps entered](https://mintcdn.com/chatbase/Brn4Jt8zn_gx42zS/user-guides/chatbot/images/sources/sources-website-private-prompt.png?fit=max\&auto=format\&n=Brn4Jt8zn_gx42zS\&q=85\&s=89d22aa10227f62dcac5217880a13f8f)

Saving one method replaces the other. Saved values are encrypted. Team members who can edit sources see them when they edit the website, with header values hidden until you click the eye icon. Change a value and save, or clear it to remove the sign-in.

**Copying a Cookie header.** Sign in to your website in Chrome, open **DevTools** → **Network**, reload the page, select the page request, and copy the `Cookie` value under **Request Headers**.

* Copy only the cookie that keeps you signed in, not analytics cookies. Each value can be up to 4,000 characters.
* Some sites tie a login to the browser that created it. If the check fails with a cookie that works in your browser, also add your browser's `User-Agent` and `Accept-Language` headers.
* Cookies expire. When they do, training stops with **Could not log in to the website** and keeps your existing content. Copy a fresh cookie and save it again.

![Authentication section with the Headers tab selected and a Cookie header whose value is hidden](https://mintcdn.com/chatbase/Brn4Jt8zn_gx42zS/user-guides/chatbot/images/sources/sources-website-private-headers.png?fit=max\&auto=format\&n=Brn4Jt8zn_gx42zS\&q=85\&s=5839704454d8820ba1b779451da99057)

> [!WARNING]
>
> Headers are sent with every request the website's pages make, including requests to other services they load, such as analytics. Use a login made for Chatbase, and avoid adding headers other than `Cookie` unless your site needs them: extra headers can break pages that load content from other sites.

Logins that need a one-time code, an authenticator app, or a captcha are not supported. Chatbase never follows logout links while signed in.

### Q\&A

Click **Add Q\&A's** to train the AI agent with question-and-answer pairs. Use them for questions that need a precise, consistent answer, such as pricing, policies, or business-specific details.

* Each entry has a title so you can find it quickly.
* Add several variations of the question to one answer to improve recognition.
* Answers support the same rich text formatting as text snippets.
* **Bulk upload** accepts an `.xlsx` file with up to 100 rows and a maximum size of 1 MB.

![Add Q\&A panel](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/quick-start/images/first-agent/your-first-agent-q\&a.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=c2b9b25d51c19b3085ee246256980a92)

#### Usage insights

Click any Q\&A to open its detail view, which shows how often users ask it:

* Number of times the question has been asked, updated instantly.
* When it was last asked.
* When the Q\&A was added.
* A chart of how often the question comes up over time.

Use these insights to see which topics matter most to your users and keep those answers up to date.

### Notion

Click **Add Notion Pages** to connect your Notion workspace and choose which pages to import. The AI agent can then answer from the content of those pages.

> [!NOTE]
>
> If your Notion workspace is on a paid plan, make sure you have admin access so you can grant all the permissions the integration needs.

### Tickets

Click **Add tickets** to train the AI agent on closed support tickets from [Salesforce](https://chatbase.co/docs/user-guides/integrations/salesforce.md) or [Zendesk](https://chatbase.co/docs/user-guides/integrations/zendesk.md). You need an active integration first. If none is connected, Chatbase prompts you to set one up.

You can train on tickets from one platform at a time. To switch, change your selection and import again.

**1. Pick the platform**

Under **Platform**, choose **Salesforce** or **Zendesk**. A **Connected** badge confirms the integration is active.

**2. Turn on syncing**

Switch on **Sync tickets into your AI agent**.

**3. Save**

Click **Save**. The sync starts on its own. The Tickets row shows **Syncing tickets…** while tickets are fetched and summarized, then **Synced**. New closed tickets are picked up by [Auto-resync](#auto-resync).

![Add tickets dialog with the Platform dropdown and the Sync tickets into your AI agent toggle](https://mintcdn.com/chatbase/zTZRPKAb4DU-aGMx/user-guides/chatbot/images/sources/sources-tickets-1.png?fit=max\&auto=format\&n=zTZRPKAb4DU-aGMx\&q=85\&s=ee147f63c4369503bf7090ef244eb6a3)

Tickets have a few limitations:

* Tickets cannot be filtered by status or date. All eligible tickets from the selected integration are imported.
* Ticket sources cannot be previewed, edited, or deleted one by one.
* Your integration needs permission to read ticket data.
* Turning off **Sync tickets into your AI agent** removes the ticket knowledge from the AI agent right away.

### Zendesk macros

Click **Add Zendesk macros** to train the AI agent on the macros of your connected [Zendesk](https://chatbase.co/docs/user-guides/integrations/zendesk.md) account. Macros are the saved replies your support team sends, so the AI agent answers with the wording your team approved. You need an active Zendesk integration first. If none is connected, Chatbase prompts you to set one up.

**1. Check the connection**

Under **Platform**, a **Connected** badge confirms the Zendesk integration is active.

**2. Turn on syncing**

Switch on **Sync macros into your agent**.

**3. Save**

Click **Save**. The sync starts on its own. The Zendesk macros row shows **Syncing macros…** while macros are fetched, then the number of macros synced. Edits to your macros are picked up by [Auto-resync](#auto-resync).

![Add Zendesk macros dialog with the Platform dropdown showing Zendesk connected and the Sync macros into your agent toggle](https://mintcdn.com/chatbase/iNZev4O1mR801TKr/user-guides/chatbot/images/sources/sources-zendesk-macros-1.png?fit=max\&auto=format\&n=iNZev4O1mR801TKr\&q=85\&s=b62ce7c815b79be36474f3074d896ed3)

Each macro becomes one piece of knowledge: its title, its description, and the exact text of its comment. Placeholders that Zendesk fills in per ticket, such as the requester's name, stay as written. Dynamic content placeholders are replaced with their default-language text on every sync.

Zendesk macros have a few limitations:

* Only active macros shared with all agents or with groups are imported. Personal macros and inactive macros are skipped, as are macros that add no comment.
* Macros cannot be filtered, and macro sources cannot be previewed, edited, or deleted one by one.
* Turning off **Sync macros into your agent** removes the macro knowledge from the AI agent right away.

## Managing sources

### Preview and metadata

Click any file, text snippet, or Q\&A to preview its content in the dashboard and edit it from the same view. Save your changes and the AI agent learns the updated version. Each source shows when it was added and last updated, so you can track your training data over time.

### Deleting sources

* **One source.** Click the three dots on its row, then **Delete**.
* **Several at once.** Click **Bulk select**, tick the sources you want or **Select all**, then click **Delete** in the bar at the bottom.
* **Websites.** Exclude a single link, delete a whole group of pages from one domain, or delete the entire website from its three-dots menu.

### Exporting sources

Select the sources you want and click **Export**. Formats depend on the source type:

| Source | Export format | Notes |
| - | - | - |
| Files | `.txt` | Contains the text extracted from the file, not the original document. |
| Text | `.md` | One Markdown file per snippet. |
| Q\&A | `.xlsx` | All Q\&As in one Excel file that you can bulk edit and re-import with **Bulk upload**. With the Q\&A filter active, **Export all** exports every Q\&A matching your search, up to 5,000. |
| Website | Not available | |
| Notion | Not available | |
| Tickets | Not available | |
| Zendesk macros | Not available | |

Exporting several sources bundles them into a `.zip` file. When you export selected sources, you can pick up to 50 at a time, since selection is limited to one page, and the export can be at most 200 MB.

## Auto-resync

Files, text, and Q\&A only change when you edit them in Chatbase, so they never need a schedule. Websites, Notion pages, tickets, and Zendesk macros change outside Chatbase. Auto-resync re-reads them every week so the AI agent stays current.

To turn it on, click the **Auto-resync** dropdown in the **Data Sources** header, next to **Last synced**, and flip the toggle.

> [!NOTE]
>
> Auto-resync is available on **Basic**, **Business**, **Enterprise** and legacy **Pro** plans only. On other plans, use **Resync now** on a website or Notion source when its content has changed.

What it re-syncs:

* **Website.** Re-scrapes existing pages and picks up new ones. Sitemap sources drop pages that left the sitemap. Crawled pages that no longer load are marked **Failed** and kept so you can review them.
* **Notion.** Syncs changes from your connected workspace.
* **Tickets.** Imports new closed tickets from Zendesk or Salesforce.
* **Zendesk macros.** Re-reads every macro, so edited, new, and deleted macros are reflected.

How it runs:

* Once a week in the background.
* Only changed pages are re-embedded. Unchanged pages are skipped.
* Each source shows **Syncing** while its resync runs and **Synced** when done.

## Frequently asked questions

> [accordion] What file types and sizes can I upload?
>
> Files can be `.pdf`, `.txt`, `.doc`, or `.docx`, up to 20 MB each, and the text must be selectable. Scanned PDFs with no text layer can't be trained on. Q\&A **Bulk upload** takes an `.xlsx` file with up to 100 rows and a maximum size of 1 MB. All Data Sources together count toward your plan's total size limit in MB, shown on the right of the Data Sources page. To raise it, buy the [Extra storage add-on](https://chatbase.co/docs/user-guides/workspace/settings.md#extra-storage).

> [accordion] Do I need to retrain my AI agent after adding or changing a source?
>
> No. Add, edit, or delete a Data Source and the AI agent learns the change within a minute. There is no retrain button, and Data Source changes go live without being published.

> [accordion] How often does Chatbase resync my website?
>
> With [Auto-resync](#auto-resync) turned on, Chatbase re-reads websites, Notion pages, and tickets once a week. Auto-resync is available on Basic, Business, Enterprise, and legacy Pro plans. On any plan, click **Resync now** on a website's row to re-read it right away. Files, text, and Q\&A only change when you edit them, so they never need a resync.

> [accordion] Why are some of my website's pages missing or excluded?
>
> Open the website source and check its **Fetched links** tabs. **Not found** lists pages that returned an error. **Excluded** lists pages Chatbase skipped, such as login, signup, and duplicate pages, and pages you excluded. If Chatbase can't crawl your site at all, contact Support and allow `ChatbaseCrawler/1.0` in your `robots.txt`. See [Advanced options](#advanced-options).

> [accordion] Can my AI agent answer in a different language from my Data Sources?
>
> Yes. Your AI agent replies in the language the customer writes in, and you can train it on content in one language and get answers in another. Which languages it handles well depends on the [AI model](https://chatbase.co/docs/user-guides/chatbot/models-comparison.md) you choose.

> [accordion] Can the AI agent read images, charts, or videos in my content?
>
> No. Chatbase trains on text only and can't process images, videos, or other non-text elements in documents. Put important information from an image or chart into text, for example in a text snippet.


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