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

# How to Train Your AI Chatbot in ChatSyncs

> How to attach Knowledge Sources — Content, URL, File, Media, Google Sheet, or HTTP API — to an AI agent so its replies stay accurate to your business.

An AI agent with no training data has nothing to answer from beyond its System Prompt.
**Knowledge Sources** are how you give it real business content — FAQs, product information,
internal docs — so its replies stay accurate to your business instead of sounding generic. This
is configured directly on the agent, as part of [creating or editing
it](/learn/chatsyncs-ai-agents/create-your-first-ai-agent-in-chatsyncs#create-your-first-ai-agent).

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-08-knowledge-sources-panel.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=d2d3b8b4a9fae2bdf4829455ff3a740b" alt="Knowledge Sources panel on the Create AI Agent form, with a Knowledge Set dropdown (Select Existing or Create New) and six source type buttons — Content, URL, File, Media, Google Sheet, and API — plus an Attached Knowledge list showing No sources yet" width="1364" height="285" data-path="images/learn/whatsapp-ai-knowledge-base/step-08-knowledge-sources-panel.png" />
</Frame>

<Steps>
  <Step title="Pick or create a Knowledge Set">
    Under **Knowledge Sources** on the agent's form, open **Knowledge Set** and either select an
    existing one or create a new one. A Knowledge Set is the container multiple pieces of
    content get added into.
  </Step>

  <Step title="Add content from one or more types">
    Click a type button to add content into the Knowledge Set: **Content**, **URL**, **File**,
    **Media**, **Google Sheet**, or **API**. Unlike an agent's System Prompt, a Knowledge Set can
    hold **multiple sources together** — the agent uses all of them to answer.
  </Step>

  <Step title="Check Attached Knowledge">
    Everything you've added shows up in the **Attached Knowledge** list on the same panel, with a
    count next to the section title.
  </Step>
</Steps>

## Content

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-03-add-content-faq.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=b02022079bc68f1258bbed6cb7a6770c" alt="Content panel with a single text box: Write the content your agent should learn from..." width="1363" height="461" data-path="images/learn/whatsapp-ai-knowledge-base/step-03-add-content-faq.png" />
</Frame>

The simplest source — just type or paste text the agent should learn from, then click **Save**.

**Example:**

```text theme={null}
We're open Monday to Saturday, 10 AM to 8 PM. We're closed on Sundays and public holidays.
Standard delivery takes 3-5 business days across India. Returns are accepted within 7 days of
delivery, as long as the product is unused and in its original packaging.
```

With this saved, a customer asking *"Are you open on Sunday?"* or *"What's your return policy?"*
gets an answer pulled straight from this text — no need to write those replies yourself.

## URL

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-04-add-url.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=dd72fe2bb6524b9e42e78086a1d3efa1" alt="URL panel with a Campaign URL field, Fetch Content Configuration selectors, and Remove Content Configuration selectors, plus Generate Raw Response and Generate FAQ buttons" width="1333" height="704" data-path="images/learn/whatsapp-ai-knowledge-base/step-04-add-url.png" />
</Frame>

Paste in a page's URL — a pricing page, an FAQ page, an about page — and ChatSyncs reads its
content for the agent to learn from.

**Example:** paste `https://mystore.com/faq` and the agent can now answer questions straight
from that page, without you copying anything into ChatSyncs by hand.

The two optional sections below the URL field let you fine-tune exactly what gets read:

* **Fetch Content Configuration** — only pull content from one specific part of the page,
  instead of the whole thing. Pick a **Selector Type** (`ID` or `Class`) and enter the
  **Selector Name** — the exact ID or class name from the page's HTML for the section you want.

  <Frame>
    <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-04b-url-selector-type-options.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=8739bd7e7226c6e68ddc8cf7ca4832ca" alt="Selector Type dropdown open showing ID and Class options" width="1333" height="587" data-path="images/learn/whatsapp-ai-knowledge-base/step-04b-url-selector-type-options.png" />
  </Frame>

* **Remove Content Configuration** — the opposite: exclude specific sections (like a header,
  footer, or navigation menu) that would otherwise clutter the training data. Click **+ Add
  Remove Selector** to exclude more than one section.

  <Frame>
    <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-04c-url-remove-content-selectors.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=19b413df2c26cbd3adf920512707cbdb" alt="Remove Content Configuration with two Selector Type / Selector Name rows and an Add Remove Selector button" width="1321" height="339" data-path="images/learn/whatsapp-ai-knowledge-base/step-04c-url-remove-content-selectors.png" />
  </Frame>

Once the page is fetched, choose how it's stored:

* **Generate Raw Response** — keeps it as one detailed block of content. More thorough, but
  uses more tokens per reply.
* **Generate FAQ** — automatically breaks the page into short Question/Answer pairs instead.
  More efficient, since the agent only pulls in the exact pair it needs.

## File

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-05-add-file.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=a96c20de62d00f9710228d0e16dc843d" alt="File panel with an Upload button, and accepted formats listed: PDF, Word (.doc, .docx), Excel (.xls, .xlsx), CSV, OpenDocument (.ods, .odt), TXT" width="1334" height="380" data-path="images/learn/whatsapp-ai-knowledge-base/step-05-add-file.png" />
</Frame>

Upload training manuals, product guides, or FAQs as **PDF**, **Word** (`.doc`/`.docx`), **Excel**
(`.xls`/`.xlsx`), **CSV**, **OpenDocument** (`.ods`/`.odt`), or **TXT**. The same **Generate Raw
Response** / **Generate FAQ** choice from URL applies here too, once the file is uploaded.

## Media

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-06-add-media.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=0556f40ca5f30d008a85a56dfa462d64" alt="Media panel with an Image URL field, an Upload button, a Description field with placeholder text: e.g. Red cotton kurti, size M, price 1200 BDT, and an Add more image button" width="1319" height="401" data-path="images/learn/whatsapp-ai-knowledge-base/step-06-add-media.png" />
</Frame>

Add product photos or gallery images the agent can send when a customer asks for them. For each
image, paste an **Image URL** (or click **Upload**) and write a short **Description** — this is
what tells the agent *when* to send that photo, so be specific: name, and anything that
distinguishes it (color, size, price).

**Example:**

```text theme={null}
Red cotton kurti, size M, price 1200 BDT
```

With this saved, a customer asking *"Do you have this in red?"* or *"Show me the kurti"* gets
that exact photo sent back automatically. Click **+ Add more image** to attach more than one.

<Warning>
  **Don't put image URLs directly in the System Prompt.** Add them here, under Media, instead —
  the agent only sends a photo from Knowledge Sources when a customer's question matches its
  description.
</Warning>

## Google Sheet

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-07-add-google-sheet.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=d7391c753df5e7fb6010569550c8d45b" alt="Select a Sheet dropdown open, showing a connected Google account and its available sheets" width="1351" height="414" data-path="images/learn/whatsapp-ai-knowledge-base/step-07-add-google-sheet.png" />
</Frame>

Pick a sheet already connected — see
[How to Connect Google to ChatSyncs](/learn/chatsyncs-integrations/connect-google-to-chatsyncs) — the dropdown lists every sheet available to
that account.

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-07b-google-sheet-selected.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=a33f203753cd829a6244ba18544faa5a" alt="Google Sheet panel with a sheet selected under Import From Google Sheet, and a Save button" width="1333" height="191" data-path="images/learn/whatsapp-ai-knowledge-base/step-07b-google-sheet-selected.png" />
</Frame>

**Example:** picking a **Customer Details** sheet lets the agent answer questions using whatever
that sheet contains — e.g. order history or account info — without you re-typing it anywhere.

## API

<Frame>
  <img src="https://mintcdn.com/chatsyncs/FizLP_1ybB1FGp5E/images/learn/whatsapp-ai-knowledge-base/step-07-add-http-api.png?fit=max&auto=format&n=FizLP_1ybB1FGp5E&q=85&s=c0b0563c80835669d28fb1d76b66ee76" alt="Add HTTP API panel with an HTTP API List dropdown" width="1086" height="534" data-path="images/learn/whatsapp-ai-knowledge-base/step-07-add-http-api.png" />
</Frame>

Pick one of your configured [HTTP APIs](/learn/chatsyncs-integrations/http-api-integration-in-chatsyncs) — content is
pulled dynamically from that endpoint's response rather than stored statically.

## Google account permissions this needs

If you plan to use **Google Sheet** as a training source, or want subscriber contacts synced
alongside it, make sure the Google account connected via
[How to Connect Google to ChatSyncs](/learn/chatsyncs-integrations/connect-google-to-chatsyncs)
granted **both** the Sheets and Contacts permissions during sign-in — granting only Sheets
access leaves contact-dependent features without data.

## Use cases

* **Customer support** — answer common questions the way a trained support agent would, in the
  business's own voice.
* **Product information** — ground answers in the business's actual catalog or specs instead of
  generic AI guesses, with real product photos via Media.
* **Internal documentation** — let staff-facing agents answer from internal wikis or SOPs.
* **Business FAQs** — turn an existing FAQ page or document directly into training content.

## Frequently asked

<AccordionGroup>
  <Accordion title="How do I make an agent answer based on my own business info instead of generic answers?">
    Open the agent under **Chatbot Manager → AI → Agents**, go to its **Knowledge Sources**, pick
    or create a Knowledge Set, and add content — Content, URL, File, Media, Google Sheet, or
    API.
  </Accordion>

  <Accordion title="Can I combine a URL and a Google Sheet in the same Knowledge Set?">
    Yes — unlike the old single-source-per-campaign model, a Knowledge Set can hold multiple
    sources together, and the agent uses all of them to answer.
  </Accordion>

  <Accordion title="How do I get the agent to send a product photo?">
    Add it under **Media** in Knowledge Sources — not as a URL pasted into the System Prompt. The
    agent can then send it when a customer asks for photos.
  </Accordion>

  <Accordion title="My agent shows no useful answers — why?">
    Check that its Knowledge Set actually has content added — an empty Knowledge Set (or an agent
    with none selected) has nothing to answer from beyond its System Prompt.
  </Accordion>
</AccordionGroup>

<Warning>
  * **An agent with no Knowledge Sources attached has nothing to answer from** beyond its System
    Prompt.
  * **Put images under Media, never as a URL in the System Prompt.**
</Warning>

## Learn From a Use Case

* [Travel Assistant](/learn/travel-agency-ai-assistant-with-chatsyncs-business-problem) — stores the business's company
  info, destinations, pricing, and FAQs the AI Agent answers from.
