I created this project in an attempt to hone my dataset manipulation, LLM fine-tuning, and web development skills.
Do you ever finish passively reading something and realize you haven't actually absorbed any of the information? This handy Chrome Extension uses generative AI to create a short, multiple-choice quiz for any website to improve reading comprehension.
- Chrome Extension
- HTML and CSS for content and styling
- JavaScript for the following:
- Extracting text from pages
- Managing state (using chrome local storage)
- Sending requests to backend API
- Handling UI interactions
- Chrome Storage API
- Stores the state of the application, allowing popup to be opened and closed without losing the current quiz and progress
- AWS DynamoDB (no-sql database)
- Used for efficiently storing past quizzes
- Reduces costs by minimizing OpenAI API calls
- AWS Lambda Function
- Node.JS runtime environment
- Does the following:
- Checks DynamoDB for existing quiz to prevent unescessary inference
- Calls custom fine-tuned Phi3 Model to generate new quizzes if existing quiz not found
- Stores new quiz in DynamoDB
- Responds to cline with quiz
- AWS API Gateway
- Creates a REST API for lambda function
- Custom Fine-Tuned Phi3 Mini Deployment (Runpod Serverless)
- Generates quizzes given websie content
- Called by the Lambda Function above
- Custom Fine-Tuned Phi3 Mini Model for quiz generation
- Simple, intuitive, and interactive UI with dynamic content
- Built on a completely serverless, pay per second architecture
- Efficient quiz generation with DynamoDB to prevent repeat quizzes
- Downloaded SQuAD dataset, which contains passages, questions, and answers
- Used Llama3 to locally generate 3 incorrect answer choices for each question
- Created an adapted version of SQuAD with part of a passage, questions, answer choices, and a correct answer
- Used LoRA with Apple MLX Framework to fine-tune Phi3 Mini 4b
- Deployed model to Runpod, taking advantage of their per-second pricing model