Knowledge Base Overview
The Knowledge Base is where your agent learns. Every answer your agent gives is grounded in the content you add here — it never draws on generic internet knowledge. You can train the agent using four source types: uploaded files, website URLs, manual Q&A pairs, and Notion pages.
How retrieval works (RAG)
AIChatVault uses Retrieval-Augmented Generation (RAG) with a hybrid search pipeline that combines vector semantic search and keyword matching to find the most relevant content for each question.
Step 1 — Embedding the question
When a visitor sends a message, the text is converted into a numerical vector using an on-premise embedding model (all-MiniLM-L6-v2). This captures the semantic meaning of the question, not just its keywords.
Step 2 — Dedicated Q&A retrieval
The system runs a separate vector search specifically over your Manual Q&A sources. Up to 4 matching Q&A entries are reserved and placed at the very top of the context window, before any other content. This guarantees that FAQ answers, policies, and pricing you wrote manually always surface in answers, even when other documents are more similar on a raw score basis.
Step 3 — General vector search
A second search runs over all knowledge sources (files, website pages, Notion) and returns the top 5 most semantically similar chunks. Only chunks scoring above the relevance threshold are included — this filters out loosely related passages that could confuse the answer.
Step 4 — Keyword boost
A hybrid keyword pass searches for exact words from the question across all source content. Matching chunks that were not already found by the vector search are added, with scores deduplicated to keep the highest-scoring version of each chunk.
Step 5 — Context assembly and response
Retrieved chunks are assembled into a prompt: Q&A results first, followed by document and website chunks. The agent's system prompt, conversation history, and this retrieved context are sent to the AI model, which generates a grounded response based exclusively on your content.
Source types
| Type | Best for | Retrieval priority |
|---|---|---|
| Manual Q&A | FAQs, policies, pricing — exact answers you control | Highest — dedicated 4-slot search, always first in context |
| Files | Product manuals, knowledge articles, PDFs, spreadsheets | Standard vector + keyword search |
| Websites | Help centre pages, blog articles, public documentation | Standard vector + keyword search |
| Notion | Internal wikis, SOPs, team knowledge bases | Standard vector + keyword search |
Source lifecycle
Every knowledge source goes through a processing pipeline after it is added:
| Status | Meaning |
|---|---|
| Pending | Source is queued and waiting to be processed. |
| Processing | Content is being extracted, split into chunks, embedded, and indexed. |
| Completed | Source is fully indexed and active in retrieval. |
| Failed | Processing encountered an error. Check the source URL or file and try again. |
The agent can only retrieve content from sources that have reached the Completed status. Sources are automatically removed from the vector index when deleted.
How chunks work
Content is never stored as one large block. Each source is split into smaller overlapping chunks before being indexed. Each chunk is individually embedded and stored in the vector database. When the agent retrieves context, it retrieves individual chunks — not entire documents — so only the relevant section is included in the prompt. This keeps context windows efficient and answers focused.
Was this page helpful?
