Skip to content

🧠 Training Your AI Agent (RAG) ​

Training an AI Agent means giving it a knowledge base to answer from. Ainisa reads your sources, splits the text into chunks, converts them into embeddings, and stores them in a vector database. When a customer asks a question, the AI retrieves the most relevant information from your knowledge base and answers based on it.

You can train an agent using several source types: documents, plain text, URLs, entire websites, and product catalogs.


πŸ“ Where to Train Your Agent ​

  1. Go to your agents page: πŸ‘‰ https://ainisa.com/business/agents
  2. Find the agent you want to train and click the Train link.
  3. On the training page, click Add Source to open the source type dropdown.

βž• Adding a Source ​

Click Add Source and choose one of the following:

  • Upload document
  • Add Text
  • Add Url
  • Add website
  • Add Product Catalog

Each type is explained below.


πŸ“„ Upload Document ​

Upload a file directly to the knowledge base.

Supported formats:

  • PDF (non-scanned β€” must contain selectable text, not images of pages)
  • DOCX
  • TXT
  • MD (Markdown)

The system extracts the text from the file and adds it to your knowledge base.

Tip: For the best results, structure your documents with clear headings and short sections. See Preparing Documents for RAG.


πŸ“ Add Text ​

Manually enter or paste text.

Use this when you want to add knowledge quickly without preparing a file β€” for example, a short policy, an FAQ answer, or notes about your business. The text you enter is added directly to the knowledge base.


πŸ”— Add Url ​

Add a single URL.

The system reads the page at that URL, extracts its text content, and adds it to the knowledge base. Only that one page is read β€” internal links are not followed.

Use this when you want the content of one specific page (for example, a single pricing or about page).


🌐 Add Website ​

Add an entire website.

The system automatically crawls the website and its internal links, extracts the text from each page, and adds it to the knowledge base.

Use this when you want to train the agent on your whole site at once, rather than adding pages one by one.


πŸ›’ Add Product Catalog ​

Upload a product catalog so the agent can answer questions about your products.

Supported formats:

  • CSV
  • XLS
  • XLSX

The system reads the product data row by row and adds each product to the knowledge base.

Column Mapping ​

Before the data is imported, the system asks you to map your columns. You match your file's columns to product fields such as:

  • Name
  • SKU
  • Price
  • Description
  • (and others)

This tells the system which column holds which piece of product information.

Product Images ​

If your file has an image column, map it as well. For any row that contains an image link in that column, the system reads the image and attaches it to that product's information in the knowledge base.

How Rows Are Counted ​

The system treats 5 rows as 1 page when processing the catalog.

Updating a Catalog ​

If some product data changes later, you can re-upload a file with the same name. The system compares it and updates only the rows that changed in the knowledge base β€” unchanged rows are left as they are. This makes it easy to keep a large catalog up to date without reprocessing everything.


πŸ”„ Workflow Summary ​

  1. Go to Agents and click Train on your agent.
  2. Click Add Source and pick a source type.
  3. Provide the content (upload a file, paste text, enter a URL, add a website, or upload a catalog).
  4. For product catalogs, map your columns before importing.
  5. The system extracts and indexes the content into your knowledge base.
  6. Test the agent with real questions and add or refine sources where answers are weak.

πŸ’‘ Notes ​

  • You can add multiple sources of different types to the same agent.
  • Uploaded documents must be text-based; scanned PDFs are not reliably supported.
  • Add Url reads one page only; Add website follows internal links across the whole site.
  • Product catalogs support CSV, XLS, and XLSX, with column mapping and image links.
  • Re-uploading a catalog with the same file name updates only the changed rows.
  • Well-structured sources produce better answers β€” see Preparing Documents for RAG.