<aside> 🔥 Note: The Knowledge Base feature is currently in Early Access. Many more changes will be made in the near future on how the knowledge base is done for the AI assistant. We’ll make announcements via email, our Blog, and via our Discord channel when there is any change in this document.

</aside>

Connecting knowledge base as training data helps you train the AI assistant with your domain-specific knowledge and let the AI assistant understand context, respond accurately, and improve over time with your updated data. Let's see how you can set up knowledge base and how these data work with TypingMind Custom.

Table of contents:

Setup knowledge base for your chat instance.

Go to the Admin Panel → Knowledge Base. Here you can setup your knowledge base:

  1. Upload files up to 20MB per file. Supported format: PDF, DOCX, TXT, CSV, etc.
  2. Pulling data from other services (Notion, Google Drive like Google Docs, Google Sheet, etc.)

image.png

How knowledge base is provided to the assistant.

Knowledge base provided via Uploaded Files

image.png

The AI assistant gets the data from uploaded files via a vector database. Here is how the files are processed:

  1. Files are uploaded.
  2. We extract the raw text from the files and try our best to preserve the meaningful context of the file.
  3. We split the text into chunks of roughly 3,000 words per chunk with some overlap. The chunks are separated and split in a way that preserves the meaningful context of the document. (Note that the chunk size may change in the future, as of now, you can’t change this number).
  4. These chunks are stored in a database.
  5. When your users send a chat message, the system will try to retrieve up to 5 relevant chunks from the database (based on the content of the chat so far) and provide that as a context to the AI assistant via the system message. This means the AI assistant will have access to the 5 most relevant chunks of uploaded data at all time during a chat.
  6. The “relevantness” of the chunks is decided by our system and we are improving this with every update of the system.
  7. The AI assistant will rely on the provided text chunks from the system message to provide the best answer to the user.