A cloud-based, AI-driven tutoring platform that leverages Google Cloud, Pinecone, and GPT-4 to help students learn course content efficiently.
- Project Overview
- Features
- Installation
- Usage
- Database Structure
- Flask API Endpoints
- Future Development
- License
The AI Tutor Platform provides a customized learning experience using AI. It allows proctors to upload course documents, processes them to understand content, and enables students to ask questions on the material.
- Cloud-based AI tutoring with OpenAI GPT-4
- Google Cloud Integration for file storage and database management
- Pinecone Integration for vector comparisons and quick course context
- Secure access and role-based management with MySQL
- Install XAMPP
- Clone the repository in XAMPP's htdocs folder:
cd C:\xampp\htdocs git clone https://github.com/yourusername/yourrepository.git cd yourrepository
- Install the dependencies:
cd setup python setup.py - Add gcloud_keys folder to backend
- Set up environment variables in a
.envfile for Python backend:OPENAI_API_KEY=your_openai_api_key PINECONE_API_KEY=your_pinecone_api_key GOOGLE_APPLICATION_CREDENTIALS="path/to/your/credentials.json" DB_HOST=your_host DB_NAME=your_db DB_USER=your_user DB_PASS=your_password DB_PORT=your_port - Add db_config.php to /backend/includes/ and add environment variables for PHP frontend:
<?php $host = your_host; $dbUsername = your_username; $dbPassword = your_password; $database = your_database; $port = your_port; ?>
- Add db_connect.php to /backend/includes/ and add database connection instructions:
<?php require_once "db_config.php"; //Create database connection $connection = new mysqli($host, $dbUsername, $dbPassword, $database, $port); //Check if the connection was successful if ($connection->connect_error) { die("Connection failed: ".$connection->connect_error); } ?>
- Turn on XAMPP's MySQL and initialize database:
cd backend/database/ python initializeTables.py - (Bonus Step - Recommended) Create a proctor account:
Sign up with proctor username and password on the site and then run the following:cd backend/database/ python createProctor.py <your_username_here>
- Run the Flask Application:
cd backend
python app.py- Start Apache and MySQL on XAMPP Control Panel
- Navigate here, accessible in your browser.
The platform includes the following database tables:
- Users - Stores id, username, password, and role
- Courses - Stores id, name, createdBy, filepath, courseCode, and description
- User_Courses - Stores userCoursesId, userId, courseId, interest, responseLength, and archived
- Messages - Stores messageId, userCoursesId, question, answer, timestamp, sourceName, feedbackRating, feedbackExplanation, feedbackTimestamp
- /upload - Uploads a single file to the databases
- /load-docs - Loads all files for a specified course
- /download - Downloads a specified file from GCS
- /delete - Deletes a specified file from GCS and Pinecone
- /delete-course - Deletes all files associated with a specified course from GCS and Pinecone
- /ask-question - Generates AI response based on course content, chat history, and user question
- /generate-report - Generates a report of student questions, AI answers, and student feedback
- JayWing Academy Implementation
- More LLM Experimentation
- Advanced RAG Techniques
This project is licensed under the MIT License.