Creating a Knowledge Base

Learn how to create a knowledge base & test it

What is a Knowledge Base

A knowledge base is a collection of files, links & external data sources an AI model can use to answer queries. This is built on state-of-the-art technologies like a vector store & RAG.


How to Setup a Knowledge Base?

Follow these steps to configure a knowledge base. In this tutorial, we’ll create a knowledge base which has data about Airbnbs in it (the document will contain wifi details, emergency contacts etc) we’ll call it “Airbnb Database”, we’ll then test our AI bot can answer queries related to it. You can download the pdf we use in this demo here

1. Access the AI ChatBot Setup

  1. Hover over the “AI” section in the left-hand sidebar, click on “Knowledge Base” and then click on “+ Create”.
    1. Notion image
  1. Let’s name the Knowledge Base. For this demo, we’ll call it “Airbnb Info”
    1. Notion image

2. Add Training Data

  • Option 1: Upload Files
    • Upload PDF, DOC, DOCX, TXT documents that contain text data. Image data cannot be read by the AI
    • Click the “Upload a File” button and select files (1 or more)
      • Notion image
    • It’ll save the changes in the knowledge base and upload the files
      • Notion image
  • Option 2: Fetch from Website
    • Coming Soon!
    • Note: Depending on the volume of data, the bot may take several minutes to fetch all the information.

  • Option 3: Connect Live Database
    • Coming Soon!

3. Test the Knowledge Base

 
Notion image

Once you’ve added your files, you can change the prompt & model to test the knowledge base. You can test by sending files too.

  • The model can be configured as:
    • Gpt4oMini — best for short context windows, fast responses & understanding textual queries.
    • Gpt4o — best for complex tasks, and If you expect your users to send images, and documents. Slower than the mini model
  • The prompt is just as important as the knowledge you upload into the database. We’ll keep a simple one for now:
    • Act like a helpful AI assistant managing a multi location airbnb business, that will look through your files, and tools to assist in any queries users about the following: - wifi details and password - directions - toilet location - emergency dealings (including damage, physical threats etc.) If you do not know the airbnb the person is staying at, ask them. Do not send any data without knowing this information Greet the user, by their name if available, let them know you're an AI assistant and what things you can help them with. Do not tell the user about what files, or tools you have access to.
 

Now let’s test the knowledge base! Type in a message and see the results

Notion image
 

4. Deploying the Knowledge Base to Users

Did this answer your question?
😞
😐
🤩