An experimental RAG chatbot using Notion database as knowledge base. The chatbot is built using
- Streamlit web app for the chatbot
- Qdrant for vector search
- OpenAI for text generation and embeddings
- Notion for fetching content and metadata from Notion database
Article with step-by-step details.
- Chatbot using OpenAI models for RAG text generation and embeddings
- Uses Notion database documents for document embeddings
- Uses Qdrant for vector search
- Streamlit web app for the chatbot
- Settings for search are configurable
- Search result embeddings from Notion database are shown
Example of the chatbot answering questions from a Notion database. The database is a knowledge base about SAP Commerce (Hybris) - an eCommerce platform by SAP.
Follow these steps to set up and run the python app locally :
- Python 3.8 or higher
- Git
- Poetry
Clone the repository :
git clone https://github.com/johntday/notion-chat.git
Navigate to the project directory :
cd notion-chat
# now at project root
Create a virtual environment and install requirements using Poetry :
poetry install
Setup Environment Variables :
# at project root
cp notion_chat/.streamlit/secrets.toml.example notion_chat/.streamlit/secrets.toml
# edit the "secrets.toml" file and add your OpenAI API key
Run the app locally :
cd notion_chat
streamlit run chat.py
If you are using Pycharm, you can create a run configuration to run the app locally :