How to Connect a Chatbot to Your Knowledge Base
What a Knowledge Base Actually Is
In the context of AI chatbots, a knowledge base is not a traditional database with rows and columns. It is a collection of text chunks, each stored as a vector embedding. An embedding is a series of numbers that represents the meaning of a piece of text in a way that allows mathematical comparison. When someone asks your chatbot a question, the system converts that question into an embedding, compares it against all the chunks in the knowledge base, and returns the chunks that are most semantically similar.
This means your chatbot does not need exact keyword matches to find the right information. A visitor asking "what do you charge for shipping" will match a knowledge base chunk that says "Delivery costs $5.99 for standard and $12.99 for express" because the meanings are similar, even though the words are different. This semantic search is what makes AI chatbots dramatically more useful than traditional FAQ search tools.
Sources You Can Add to the Knowledge Base
The platform supports several ways to add content:
- Direct text entry for short content like individual FAQ answers, quick reference facts, or policy summaries. Good for adding specific details that are not in any existing document.
- File uploads for PDFs and text files. Upload your product manuals, employee handbooks, policy documents, or any other text-based files. See How to Upload Files to Train Your AI Chatbot.
- Website crawling to automatically pull in every page of your website. The crawler visits each page, extracts the text content, and adds it to the knowledge base. See How to Crawl Your Website to Train a Chatbot.
Each knowledge base entry gets a tag that identifies what group it belongs to. This is set automatically based on the chatbot you are adding content to. All entries for a given chatbot share the same tag, so the chatbot only searches its own content and not content belonging to other chatbots in your account.
Organizing Your Knowledge Base
One Topic Per Chunk
The most effective knowledge bases have chunks that each cover a single topic clearly. When you upload a long document, the system splits it at natural paragraph boundaries. If a paragraph covers two unrelated topics, the resulting chunk may confuse the retrieval system because it matches queries about both topics even when only one is relevant.
For the best results, structure your source content so that each section or paragraph covers one idea completely. A standalone paragraph that says "Returns are accepted within 30 days of purchase. Items must be in original packaging. Refunds are processed within 5-7 business days." is a perfect knowledge base chunk because it fully covers the return policy topic in one place.
Cover Variations of the Same Question
Visitors ask the same question in many different ways. If your knowledge base only covers "What is your return policy?" but someone asks "Can I get a refund?", the semantic search should still match, but you can improve reliability by including both framings in your content. A chunk that mentions returns, refunds, exchanges, and the associated timelines will match all variations of the question.
Keep Information Current
Outdated information in the knowledge base causes wrong answers. If your pricing changes, your return policy updates, or you discontinue a product, update the knowledge base immediately. You can delete individual chunks and replace them with updated content at any time. The chatbot will use the new information on the very next conversation.
How Many Chunks Do You Need
There is no fixed minimum or maximum. A small business with a focused product line might have 50-100 chunks covering all common questions. A larger company with extensive documentation might have 500-2,000 chunks. The number depends entirely on how much information your chatbot needs to know.
Start with the content that covers your most frequently asked questions. You can check conversation logs after the chatbot goes live to see where it struggles, then add more knowledge to fill the gaps. It is better to start small with high-quality content than to dump everything you have into the knowledge base without reviewing it.
Testing Your Knowledge Base
After adding content, test your chatbot with questions you expect visitors to ask. Good questions to test with include:
- The exact phrasing of a common customer question
- A rephrased version of the same question using different words
- A question about a detail that is only mentioned once in your content
- A question the chatbot should not be able to answer (to verify it says "I don't know" instead of guessing)
If the chatbot gives wrong or incomplete answers, the fix is almost always in the knowledge base, either the information is missing, the chunk that contains it is too long and diluted, or the content is phrased in a way that does not match how visitors ask about it. See How to Improve Chatbot Accuracy and Reduce Hallucinations for detailed troubleshooting.
Build a chatbot that actually knows your business. Upload your content and start answering questions in minutes.
Get Started Free