The Burgers' Zoo Chatbot is a Django-based web application that helps visitors interactively find information about the zoo during their visit. The chatbot is enhanced with a Retrieval-Augmented Generation (RAG) system, consisting of query classification, query rephrasing, document retrieval, retrieval reranking, and summarization. Users can enable or disable the optional steps of this system and also choose whether they want the chatbot to remember the conversation history for comparison of results.
Clone the Repository
git clone https://github.com/woutman/burgerszoobot.git
cd burgerszoobot
Create a Virtual Environment and Activate It
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install Dependencies
pip install -r requirements.txt
Set Up Environment Variables
api_keys.env file in burgerszoobot/ (same directory as manage.py) and add the necessary environment variables:OPENAI_API_KEY='your_openai_api_key'
Run Database Migrations
cd burgerszoobot
python manage.py migrate
Run the Development Server
python manage.py runserver
http://127.0.0.1:8000/chat/.burgerszoobot/
├── burgerszoobot/
│ ├── __init__.py
│ ├── asgi.py
│ ├── settings.py # Django settings
│ ├── urls.py # URL configuration
│ └── wsgi.py
├── chatbot/
│ ├── migrations/
│ ├── templates/
│ │ └── chatbot/
│ │ └── chat.html # Frontend HTML template
│ ├── static/
│ │ └── chatbot/
│ │ ├── script.js # Custom JavaScript scripts
│ │ └── styles.css # Custom CSS styles
│ ├── management/
│ │ └── commands/
│ │ └── ingest_docs.py # Command to ingest documents
│ ├── services/
│ │ ├── chromadb/
│ │ │ └── chroma.sqlite3 # Persistent ChromaDB database
│ │ ├── chatbot_service.py # Main chatbot service logic
│ │ ├── llm_instructions.py # Instructions for LLM components
│ │ ├── llm_interface.py # LLM interaction (e.g., OpenAI API)
│ │ └── rag.py # RAG pipeline
│ ├── views.py # Handles user interactions
│ ├── urls.py # Chatbot app URL configuration
│ ├── util.py # Utility functions
│ └── models.py # (Optional) Database models for chat history or document metadata
├── manage.py # Django's command-line utility
└── README.md # Project documentation
A JSON file with a list of all documents that have been ingested can be found at util/docs.json.
27 commits
Python
71.5%
CSS
10.8%
JavaScript
9.5%
HTML
8.2%
The Burgers' Zoo Chatbot is a Django-based web application that helps visitors interactively find information about the zoo during their visit. The chatbot is enhanced with a Retrieval-Augmented Generation (RAG) system, consisting of query classification, query rephrasing, document retrieval, retrieval reranking, and summarization. Users can enable or disable the optional steps of this system and also choose whether they want the chatbot to remember the conversation history for comparison of results.
Clone the Repository
git clone https://github.com/woutman/burgerszoobot.git
cd burgerszoobot
Create a Virtual Environment and Activate It
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install Dependencies
pip install -r requirements.txt
Set Up Environment Variables
api_keys.env file in burgerszoobot/ (same directory as manage.py) and add the necessary environment variables:OPENAI_API_KEY='your_openai_api_key'
Run Database Migrations
cd burgerszoobot
python manage.py migrate
Run the Development Server
python manage.py runserver
http://127.0.0.1:8000/chat/.burgerszoobot/
├── burgerszoobot/
│ ├── __init__.py
│ ├── asgi.py
│ ├── settings.py # Django settings
│ ├── urls.py # URL configuration
│ └── wsgi.py
├── chatbot/
│ ├── migrations/
│ ├── templates/
│ │ └── chatbot/
│ │ └── chat.html # Frontend HTML template
│ ├── static/
│ │ └── chatbot/
│ │ ├── script.js # Custom JavaScript scripts
│ │ └── styles.css # Custom CSS styles
│ ├── management/
│ │ └── commands/
│ │ └── ingest_docs.py # Command to ingest documents
│ ├── services/
│ │ ├── chromadb/
│ │ │ └── chroma.sqlite3 # Persistent ChromaDB database
│ │ ├── chatbot_service.py # Main chatbot service logic
│ │ ├── llm_instructions.py # Instructions for LLM components
│ │ ├── llm_interface.py # LLM interaction (e.g., OpenAI API)
│ │ └── rag.py # RAG pipeline
│ ├── views.py # Handles user interactions
│ ├── urls.py # Chatbot app URL configuration
│ ├── util.py # Utility functions
│ └── models.py # (Optional) Database models for chat history or document metadata
├── manage.py # Django's command-line utility
└── README.md # Project documentation
A JSON file with a list of all documents that have been ingested can be found at util/docs.json.
27 commits
Python
71.5%
CSS
10.8%
JavaScript
9.5%
HTML
8.2%