# Train your AI agent on your website, files, and data > Add websites, documents, text, Q&A pairs and support tickets to train your QwryAI agent, choose what it learns, and keep it in sync Data sources are the content your QwryAI agent learns from and answers with: website pages, documents, plain text, Q&A pairs, and closed support tickets from Zendesk or Salesforce. You manage them on **Build › Data sources**. You choose what to add, check the pages or content QwryAI found, and train it. Your agent answers from trained content only. ## Which source type should I use? | You have | Add it as | Why | | - | - | - | | A public website or help center | [Website](#website), with **Crawl website** or **Sitemap** | QwryAI finds the pages for you, and **Resync** or [Auto-resync](#auto-resync) picks up later changes. | | Pages that need a login | [Website](#website) with [Website login](#website-login) | QwryAI signs in before it reads the pages. Growth plan and up. | | A Shopify store | [Website](#website), with **Sitemap** and your `/sitemap.xml` | Lists your store's pages without crawling duplicates of products and collections. | | PDFs, manuals or Word documents | [Documents](#documents) | Accepts PDF, DOC, DOCX, TXT and CSV files up to 20 MB each. | | A policy or note that isn't published anywhere | [Plain text](#plain-text) | Quick to write and edit in the dashboard. | | Questions that need one exact, consistent answer, such as pricing | [Q&A pairs](#qa-pairs) | Your approved answer, with alternate wordings of the question. | | Past resolved conversations in Zendesk or Salesforce | [Tickets](#tickets) | The agent learns from how your team already solved customer issues. Paid plans. | ## The Data sources page Open **Build › Data sources**. Under **Add a source**, a card for each type opens its editor: **Website**, **Documents**, **Plain text**, **Q&A pairs** and **Tickets**. ![The Data sources page with the Total size counter and the Add a source cards for Website, Documents, Plain text, Q&A pairs and Tickets.](annotated/01-overview.webp "Add a source opens the editor for each type.") Everything you add appears in the sources list below, with its **Name**, **Type**, **Status**, **Pages**, **Size** and **Last crawled** date. Use these controls to work with the list: * **All**, **Websites**, **Files**, **Text** and **Q&A** filter the list by type, and **Search sources…** narrows it by name. * **Sort** changes the order. * Tick sources to act on several at once, such as deleting them together. * **Total size** shows how much of your plan's training data your sources use, such as 40 MB on the Growth plan. * The **⋯** button on a row opens its actions, such as **Resync** and **Delete**. ![The sources list with the All, Websites, Files, Text and Q&A filters, Search sources, Sort, Total size, Retrain agent and the columns Name, Type, Status, Pages, Size and Last crawled.](annotated/02-sources-list.webp "Every source in one list, with Total size and Retrain agent.") ## How training works You decide when content trains. A new website lists its pages first, a document is uploaded first, and text and Q&A are saved first; then you select **Train**. Each source and page shows its own status: * **Queued**, **Processing** or **Training** while it's being read and trained. * **Trained** once the agent uses it. * **Not trained** or **Changed** when there's content the agent doesn't use yet. * **Excluded**, **Over limit**, **Not found**, **Fetch failed** or **Error** when a page or file isn't used, with the reason. When sources wait to be trained and nothing else is training, **Retrain agent** appears above the list. It trains every new, changed or failed source in one go, and removes the sources you deleted. > [!NOTE] > > Data sources go live as soon as they train. Unlike instructions or Actions, they don't wait for **Publish**, and restoring an earlier version doesn't change them. See [Drafts and versions](/docs/user-guides/chatbot/drafts-and-publishing#settings-that-go-live-right-away). ## Prepare your content The agent can only answer as well as the text in its data sources. A few habits make a big difference: * **Add support content.** Help articles, product guides and knowledge base pages work best. Leave out marketing pages, product listings, ad-heavy content and pages with complex layouts. * **Give each topic a clear heading.** Short paragraphs or lists under a heading per topic are easiest for the agent to use. * **State facts explicitly.** Write "Shipping: delivery within 1 to 2 weeks, ships worldwide" rather than "delivery times vary". Vague text leads to vague answers. * **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 agent doesn't find two different answers. * **Leave out pages that don't help customers.** Skip sections such as `/blog` or `/careers` with [Exclude paths](#website-options). * **Use Q&A for answers that must not vary.** Add alternate wordings of the question, so the agent recognizes it however customers ask. ## Adding sources ### Documents **1. Open Documents** Select the **Documents** card, then click the upload area or drag files into it. QwryAI accepts PDF, DOC, DOCX, TXT and CSV files up to 20 MB each. ![The Upload new file panel with the Click to upload or drag and drop area and the accepted types PDF, DOC, DOCX, TXT, CSV (max. 20 MB per file).](annotated/03-documents.webp "Drop files or click to choose them.") **2. Review and train** Each file is read and listed with its **Size** and **Status**. Use **View content** to check the extracted text, untick files you don't want, and select **Finish & submit** to train the rest. ### Plain text Select **Plain text** to add content that doesn't belong in a document, such as a policy, a product note or an internal FAQ. Give it a **Source title** so you can find it, paste the **Content** (up to 1 MB), and select **Process text**. On the next screen, select **Train**. ![The Raw text input panel with Internal WiFi policy typed in Source title and the Content field below.](annotated/04-plain-text.webp "A title and the text to learn.") ### Website Select **Website** to train the agent on web pages. Choose how QwryAI finds them: 1. **Crawl website.** Enter your homepage and QwryAI follows links to find public pages. 2. **Sitemap.** Enter the address of an XML sitemap to list exactly the pages in it. 3. **Single page.** Enter one page; QwryAI reads it and trains it straight away. ![The Website panel with Crawl website, Sitemap and Single page, a Website URL typed in, and the Fetch pages button.](annotated/05-website.webp "Pick how QwryAI finds your pages.") Enter the address and select **Fetch pages**. For a crawl or sitemap, QwryAI lists the pages it finds; nothing trains yet. Untick any page you don't want, then select **Train**. **View limits** shows your plan's limits, such as pages per crawl or sitemap and pages across all sources. > [!NOTE] > > If you use Shopify, add your store's sitemap at `/sitemap.xml` instead of crawling the whole store. This avoids duplicate product and collection pages. #### Website options Before you fetch, expand **Advanced options** under the address to control what QwryAI reads: * **Only include paths** reads only pages under the paths you add, such as `/docs`. * **Exclude paths** skips pages under the paths you add, such as `/blog`. Each rule matches with **Starts with**, **Ends with**, **Contains**, **Exact match** or **Wildcard**. * **Slow scraping** spreads out requests to avoid overwhelming websites with limited resources. * **Include query parameters** treats addresses that differ only by parameters, such as `?page=1`, as separate pages. * **Scraping location** runs scraping from the country you pick, for geo-restricted or localized sites. The default is the United States. ![Advanced options with Only include paths, Exclude paths, Scraping location, Slow scraping, Include query parameters and Website login with None, Headers and Login steps.](annotated/06-website-options.webp "Choose which pages to read and how.") #### Website login For pages behind a password, use **Website login** at the end of **Advanced options**. It's **None** by default; choose one method: * **Headers.** Add the HTTP headers a signed-in browser sends, usually a `Cookie` header. Values are hidden until you select **Show value**. * **Login steps.** Describe the login in plain words. QwryAI follows the steps before it reads the pages. **Example** login steps: ```text Click "Log in", type docs-bot@example.com as the email and the password, then click "Sign in". ``` > [!NOTE] > > Website login is available on the Growth plan and up. **View limits** shows whether your plan includes it. > [!WARNING] > > Use a login made for QwryAI, not a personal account. Logins that need a one-time code, an authenticator app or a CAPTCHA can't be used. #### Reviewing the pages of a website Select a website in the sources list to open it. Its header shows how many pages are trained and waiting, with **Settings** and, while pages wait, a **Train** button such as **Train 1 page**. Search pages, turn on **Group by folder** to group them by path, and change the sort, such as **Alphabetical**. Once nothing waits to be chosen, pages are split into tabs: * **All**: every page QwryAI found. * **Trained**: pages the agent learns from. * **Over limit**: pages that didn't fit in your plan's training data. * **Discarded**: pages QwryAI skipped, such as pages that couldn't be read. Hover a reason for the detail. * **Excluded**: pages you excluded. They're not trained and don't count toward your training data. ![A website source with 83 trained and 1 waiting, the Settings and Train 1 page buttons, and its pages with their size and Trained status.](annotated/08-website-pages.webp "Each page with its size and status.") #### Excluding and including pages Tick a page, or tick a folder to select every page in it. Each row also has buttons to re-scrape, view and exclude that page. Then: * Select **Exclude** to stop the agent from using those pages. * In **Excluded**, select **Include and train** to bring pages back. * For a page that failed, select **Retry and train**. **View content** shows the text QwryAI saved for a page, and **Re-scrape** fetches it again and retrains it. ![The pages table of a website with the pointer on a page's Exclude button, next to its Re-scrape and View buttons.](annotated/09-exclude.webp "Exclude what the agent shouldn't use.") To skip a whole section on every crawl, such as `/blog`, add it to **Exclude paths** in the source's **Settings**. #### Resyncing a website To read a website again when its content has changed, open the **⋯** menu on its row in the sources list and select **Resync**. Resync fetches every included page again and retrains it, which replaces any page edits you saved, so QwryAI asks you to confirm. ![The ⋯ menu of a website source in the sources list with Resync and Delete.](annotated/10-resync.webp "A source's menu has Resync and Delete.") #### Source settings Open a website and select **Settings** to open **Source settings**, where you can change the same options as when you added it and turn on **Auto-resync**. **Restart discovery** finds pages again with the new options. **More actions** in the header has **Delete source**, and **Add page** once the website is trained. ![The Source settings panel for a website with its options and the Save changes button.](annotated/11-source-settings.webp "Change a website's options later.") ### Q&A pairs Select **Q&A pairs** to open **Q&A training** and teach the agent questions and answers. Use them for questions that need a precise, consistent answer, such as pricing, policies or business-specific details. **1. Add a training pair** Under **New training pair**, enter a **Source title**, such as "Store policies", the **User question**, and the **Bot answer**, which supports formatting. Each answer can be up to 1 MB. **2. Add other wordings** Select **Add alternate question** for other ways customers ask the same thing. Each question must be unique. **3. Activate** Select **Activate** to train new and edited pairs. > [!TIP] > > Add several wordings of the same question to one answer, such as "What's your refund policy?" and "Can I get my money back?", so the agent recognizes it however customers ask. To add many pairs at once, download the **Template**, fill it in, and select **Import Excel** to import it as an `.xlsx` workbook of up to 1 MB. ![The Q&A training page with New training pair, Source title, User question, Add alternate question and Bot answer, and the Template, Import Excel and Activate buttons.](annotated/12-qa.webp "A question, other wordings and one answer.") ### Tickets Select **Tickets** to train the agent on closed support tickets from [Salesforce](/docs/user-guides/integrations/salesforce) or [Zendesk](/docs/user-guides/integrations/zendesk). You need a paid plan and a connected integration first. **1. Pick the platform** Under **Platform**, choose **Salesforce** or **Zendesk**. If it isn't connected yet, QwryAI shows **Not connected** and a button to connect it from Integrations. **2. Turn on syncing** Switch on **Sync tickets into your agent**. **3. Save** The sync starts by itself, and the Tickets row updates when it finishes. > [!WARNING] > > Turning **Sync tickets into your agent** off removes the ticket knowledge from your agent. ![The Tickets panel with Zendesk picked under Platform, marked Not connected, and a Connect Zendesk button.](annotated/13-tickets.webp "A platform must be connected before it can sync.") ## Managing sources ### Preview and edit Select a document, text or Q&A source to see its content. Text and Q&A can be edited in the same view; after an edit, select **Train** (text) or **Activate** (Q&A) so the agent learns the new version. ### Deleting sources * **One source.** Select **Delete** in its row's **⋯** menu. The agent stops using it right away. * **Several at once.** Tick the sources, then delete them from the bar that appears. * **Website pages.** Exclude a page or folder instead of deleting the whole website. Deleting is permanent: to undo it, add the source again. ### Exporting sources Tick document or text sources and select **Export** to download their text: one file as `.txt`, or several in a `.zip`. **Export all Q&A** downloads every Q&A pair in one workbook that you can edit and import again. Websites and tickets can't be exported. ## Auto-resync Documents, text and Q&A only change when you edit them in QwryAI. Websites change on their own, so **Auto-resync** reads a website again every week and checks for the latest updates. To turn it on, open the website, select **Settings** and switch on **Auto-resync**. > [!NOTE] > > Auto-resync is available on the Growth plan and up. On other plans, use **Resync** when a website changes. ## Frequently asked questions > [accordion] What file types and sizes can I upload? > > Documents can be PDF, DOC, DOCX, TXT or CSV, up to 20 MB each. Plain text and each Q&A answer can be up to 1 MB, and a Q&A import workbook up to 1 MB. All sources together count toward your plan's training data, shown as **Total size** on the Data sources page. > [accordion] Do I need to retrain my agent after adding or changing a source? > > Yes. New and edited content trains when you select **Train** or **Activate** in its editor, or **Retrain agent** on the Data sources page. Until then its status is **Not trained** or **Changed**. Trained content goes live without being published. > [accordion] How often does QwryAI resync my website? > > With [Auto-resync](#auto-resync) on, every week. On any plan, select **Resync** on the website to read it again right away. > [accordion] Why are some of my website's pages missing or excluded? > > Open the website and check its tabs. **Discarded** lists pages QwryAI skipped, with the reason. **Over limit** lists pages beyond your plan's training data. **Excluded** lists pages you excluded. Also check **Only include paths** and **Exclude paths** in its **Settings**. > [accordion] Can my agent answer in a different language from my data sources? > > Yes. Your agent replies in the customer's language, so you can train it on content in one language and answer in another. See [Multilingual support](/docs/user-guides/chatbot/behavior/multilingual-support). > [accordion] Can the agent read images, charts or videos in my content? > > No. The agent learns from text. Put important information from an image or chart into text, for example in a plain text source. ## Related > [card] Your first agent | /docs/user-guides/quick-start/your-first-agent | Create an agent from your website in minutes. > [card] Best practices | /docs/user-guides/quick-start/best-practices | Get better answers from your data. > [card] Drafts and versions | /docs/user-guides/chatbot/drafts-and-publishing | What goes live right away and what waits for Publish. > [card] Channels | /docs/user-guides/chatbot/channels | Put your trained agent on your website and apps.