A comprehensive chatbot designed to help Booth School of Business students with course-related queries, including course information, bidding history, and degree requirements.
The chatbot provides assistance with:
- Course information and prerequisites
- Degree requirements
- Concentration requirements
- Course bidding history and analysis
- Course syllabi information
- Real-time course scheduling information
Here are some example questions you can ask the assistant:
- "What courses can I take to fulfill the Decisions requirement?"
- "What are the core course requirements?"
- "Does 30131 fulfill requirements for Accounting concentration?"
- "What courses count towards Finance concentration?"
- "When is investments offered next?"
- "What courses are offered on Monday evenings in Spring 2025?"
- "What are the bid points for 34106?"
- "How many points do I need for Investments?"
- "What are the prerequisites for Advanced Investments?"
- "What is the grading policy for Negotiations?"
- "What do we learn in 34106?"
- "What is the title for 35150?"
- Framework: Flask-based REST API
- AI Model: GPT-4 powered by LangChain
- Memory: Conversation buffer for context retention
- Thinking Process: Transparent reasoning with step-by-step thought process
-
Course Information Tools
- Vector-based course search
- Context-based course search
- Course number to title mapping
-
Academic Requirements
- Degree requirements checker
- Concentration requirements validator
-
Bidding Analysis
- Historical bidding data processor
- Bid point analysis and recommendations
-
Data Processing
- Excel to CSV conversion for bidding data
- Course data vectorization
- Syllabus parsing and analysis
- Framework: Streamlit
- Features:
- Clean, intuitive chat interface
- Real-time response display
- Expandable thinking process view
- Chat history management
- Raw response data access
- Error handling with user feedback
- Query input field
- Chat history display
- Thinking process expansion
- Response formatting
- Error notifications
- Clear chat functionality
# Required Python version
Python 3.12 (Tested and recommended)
# Required environment variables
OPENAI_API_KEY=your_api_key_here- Clone the repository:
git clone [email protected]:bilalbaqar/booth-chatbot.git
# If you dont want to use ssh to clone
# git clone https://github.com/bilalbaqar/booth-chatbot.git
cd booth-chatbot- Set up Python environment (choose one option):
# Create and activate conda environment
conda create --name env-booth-chatbot python=3.12
conda activate env-booth-chatbot
# Install dependencies
pip install -r requirements.txt# Create and activate virtual environment
python3.12 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt- Set up environment variables:
# Create .env file
touch .env # On Windows: type nul > .env
# Add the following content to your .env file:
OPENAI_API_KEY=your_api_key_here
# You can do this via command line:
echo "OPENAI_API_KEY=your_api_key_here" > .env
# Or manually create/edit the .env file in your preferred text editor
# and add the following line:
# OPENAI_API_KEY=your_api_key_hereNote: Replace your_api_key_here with your actual OpenAI API key. You can get an API key from OpenAI's website.
- Start the backend server:
python .\booth_agent\booth-agent.py --server --server- Start the frontend interface (in a new terminal):
streamlit run frontend\chatbot-frontend.pyThe application will be available at:
- Frontend: http://localhost:8501
- Backend API: http://localhost:5000
The backend supports different modes of operation:
# Run in CLI mode for command-line interaction
python booth-agent.py --cli
# Run test queries
python booth-agent.py --test
# Show help
python booth-agent.py --helplangchain: For AI model integration and chain managementopenai: For GPT-4 API accessflask: For backend API serverstreamlit: For frontend interfacepandas: For data processingnumpy: For numerical operationsrequests: For API communication
DocArrayInMemorySearch: For vector search capabilitiesCSVLoader: For data loading and processingOpenAIEmbeddings: For text embeddings
