This project is a conversational AI-powered advising system designed to answer student questions about the Computer Science program at California State University, Fullerton (CSUF). It leverages the power of Large Language Models (LLMs) and efficient quantization techniques to provide helpful and informative responses.
Navigating university requirements and course selection can be challenging for students. This advising system aims to simplify the process by providing instant access to information about:
- Course prerequisites
- Graduation requirements
- Relevant CSUF resources and links
- General advising questions
The system utilizes a pre-trained Large Language Model (specifically, a quantized version of Llama 2), fine-tuned with information specific to the CSUF CS department. This allows it to understand natural language queries and provide contextually relevant answers.
- Conversational Interface: Users can ask questions in natural language.
- Contextual Awareness: The system considers the context of the conversation and provides relevant information.
- CSUF Specific Knowledge: The model is trained on CSUF CS department information, including course details, prerequisites, and graduation requirements.
- Link Integration: Relevant CSUF website links are provided within the responses for further exploration.
- Efficient Inference: 4-bit quantization using the
bitsandbyteslibrary enables efficient use of resources. - Fast Fallback Mode: Rule-based advising for prerequisites, graduation requirements, and relevant links without loading the LLM.
- Progress + Next Courses: Supports completed-course input and recommends likely eligible next courses.
- One-Shot CLI Mode: Run a single query and optionally export JSON output.
- Project Quality: Added
requirements.txt, test suite,.gitignore, and CI workflow.
- Python
- Transformers (Hugging Face)
- bitsandbytes
- PyTorch
- Hugging Face Hub
-
Clone the repository:
git clone [https://github.com/](https://github.com/)[YourUsername]/[YourRepositoryName].git
-
Navigate to the project directory:
cd [YourRepositoryName] -
Install the required packages:
pip install bitsandbytes transformers accelerate --upgrade
-
Set your Hugging Face token as an environment variable (for LLM mode):
export HUGGINGFACE_TOKEN="your_token_here"
Run in fast mode (default interactive):
python "CSUF CS Advising System.py"Run with quantized LLM mode:
python "CSUF CS Advising System.py" --mode llmRun a one-shot question:
python "CSUF CS Advising System.py" --query "What are graduation requirements?"Run with completed courses and get recommendations:
python "CSUF CS Advising System.py" --query "What can I take next?" --completed-courses "CPSC 120A,CPSC 120L,CPSC 121A,CPSC 121L"Export response to JSON:
python "CSUF CS Advising System.py" --query "What can I take next?" --json-output advising_output.jsonYou can also append completed courses inside the query:
What can I take next? completed: CPSC 120A, CPSC 120L, CPSC 121A, CPSC 121L
You will then be prompted to enter your questions. Type "exit" to quit the system.
- "What are the prerequisites for Machine Learning?"
- "What are the graduation requirements for the CS major?"
- "Where can I find information about advising?"
Install dependencies:
pip install -r requirements.txtRun tests:
pytest -q- Fine-tuning the model with more specific CSUF data for improved accuracy.
- Implementing a web or mobile interface for broader accessibility.
- Adding support for richer prerequisite graphs and term-by-term planning constraints.