HUFS Course Catalog Chatbot is a conversational assistant designed to provide information about course registration, graduation requirements, major-specific details, and academic policies at Hankuk University of Foreign Studies (HUFS).
- Conversational AI: Powered by OpenAI's GPT model for natural language understanding.
- Hybrid Search System: Combines semantic and keyword-based search for precise information retrieval.
- Contextual Responses: Utilizes relevant data to generate step-by-step answers in Korean.
- User-Friendly Interface: Simple web-based chat interface built with HTML, CSS, and JavaScript.
- Users ask questions about course registration, graduation, or other academic policies.
- The chatbot processes the query using hybrid search algorithms.
- The chatbot fetches and formats the answer using relevant course catalog data.
- Results are displayed in the chat interface.
- Backend: Python, Flask
- AI Model: OpenAI GPT,
jhgan/ko-sbert-nlifor semantic embeddings - Frontend: HTML, CSS, JavaScript
- Data Management: JSON-based course catalog data
- Libraries:
flaskflask-corssentence-transformersrank-bm25numpypython-dotenv
E:.
│ .env # Environment variables
│ .gitignore # Ignored files
│ LICENSE # License information
│ README.md # Project documentation
│
├───Eval # Evaluation scripts and datasets
│ eval_code.py
│ main.py
│ processed_data.json
│
├───server # Backend server
│ server.py
│ utils.py
│ search.py
│
├───static # Frontend resources
│ index.html
│ style.css
│ script.js
│ bot-avatar.png
│ user-avatar.png
│
└───__pycache__ # Python compiled files (ignored in .gitignore)
-
Clone the repository:
git clone https://github.com/YourUsername/HufsCourseCatalogChat.git cd HufsCourseCatalogChat -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
-
Install the dependencies:
pip install -r requirements.txt
-
Set up the environment variables:
- Create a
.envfile in the root directory. - Add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
- Create a
-
Start the Flask server:
python server/server.py
-
Open the chat interface:
- Navigate to
http://127.0.0.1:1954in your browser.
- Navigate to
- Ask Questions: Enter your query in the input box, and click "Send" to get a response.
- Supported Queries: Course registration schedules, graduation requirements, and major-related questions.
Contributions are welcome! Please follow the guidelines in CONTRIBUTING.md.
This project is licensed under the MIT License. See the LICENSE file for details.