Guides

Knowledge base (RAG)

How AskAIs learns from your website, files and Q&A, and how it uses them when it answers.

The AI agent answers from what you teach it under Training: pages from your website, files you upload and question-and-answer pairs. When a visitor asks something, AskAIs looks up the most relevant passages and gives only those to the AI, so answers come from your own content instead of guesses.

Ways to teach it

  • Web pages: enter a URL and AskAIs crawls your site. It reads 50 pages unless you set another number (up to 500), and your plan's document limit can stop it sooner.
  • Files: upload one file at a time, up to 25 MB: PDF, DOCX, TXT, Markdown, CSV or JSON. PDFs need a text layer (scanned pages can't be read). Old .doc files, spreadsheets and slides are not supported.
  • Q&A: add question-and-answer pairs one by one, or paste CSV text under Bulk import (CSV).

Files and Q&A pairs can be hidden per platform, for example in your iOS app. Hidden items are not used in answers to visitors on that platform.

What happens to your content

  • AskAIs extracts the text and splits it into passages of about 2,000 characters, with a short overlap between neighbouring passages. Each Q&A pair stays one passage.
  • Each passage gets an embedding (by default OpenAI text-embedding-3-small) and is stored in PostgreSQL with pgvector.
  • The item then shows Ready. If the text can't be read it shows Failed, and you can retry it.
  • If no embedding can be made, the passages are still stored and found by keyword search.

How answers use it

  • Greetings and small talk skip the lookup. For other messages, AskAIs searches with the visitor's recent messages and compares embeddings by cosine similarity.
  • Passages below a similarity threshold are dropped. The best ones go to the AI: 5 by default, and at most 2 from any one document.
  • The passages are added to the AI's instructions as reference material. The AI is told not to follow instructions written inside them, and not to invent product facts they don't contain; it asks a question or offers a person instead.
  • When a visitor asks about a product fact and nothing relevant is found, AskAIs does not let the AI guess. It says it doesn't have that information and hands the chat to your team, unless automatic hand-off is turned off.

Your content can be in one language and your visitors in another: the AI translates the facts it uses into the visitor's language.

Settings

Under AI Agent, in the Knowledge base (RAG) section:

  • Enable knowledge base retrieval (RAG): switch it off only if the AI shouldn't use your content at all, for example a small-talk bot.
  • Top-K chunks: how many passages the AI gets (default 5).
  • Embedding model: with your own AI key you can also set an embedding endpoint and key, separate from the chat endpoint. The embeddings must have 1,536 dimensions, like text-embedding-3-small.

Hosted AI or your own key

With hosted AI you don't need a key; with your own key, your provider bills you directly. Either way your plan's monthly AI reply limit applies. Repeated questions reuse a cached search embedding for 24 hours.