Inspiration
Imagine it's the night before you have a quiz for your Anthropology class. You think to yourself, Let's just look through the readings. I'll remember.... Your eyes brush over the words, and you feel satisfied. But not so much after your grade comes back.
I want to study better next time, you think. But I'm too lazy to sit down and create a Quizlet myself.
So let's make a machine learning model do it for you! Introducing QuizMe, a Google Docs add-on that empowers reading comprehension through generated quizzes.
Many teachers assign long readings to their students that are typically ungraded, so students can be tempted to skim through. This results in low memory retention and a poor understanding of the content. Quiz materials are a great solution but are difficult to find and do not always cover the content you’re interested in. That’s where QuizMe comes in, an easy-to-use, accessible tool that generates quizzes based on any text for students and teachers.
What it does
You can add QuizMe as a Google Docs Add-on, and it will appear in any sidebar of a Google Doc. Click on it, and it opens a side panel asking you to select text to generate questions for and to enter a few parameters (# of questions, whether to create a Google Form from the questions / answers). Once you do, you can click "Quiz Me!", and the panel will take about ~10-15 seconds (depending on the length of the selected text) to present the questions and answers. The user can attempt the questions and measure their retention of the content. If the user decided to create a Google Form, buttons will appear to let the user take the Form as a quiz or to further edit the Form.
How we built it
We used Apps Script, a cloud-based JavaScript platform that lets you integrate with and automate tasks across Google products, to build the front-end (the QuizMe side panel). From the front-end, we made a POST request containing the user's selected text and additional parameters to an API endpoint. This endpoint we created by setting up a Linux server using NGINX on Google Cloud; we then used Flask to handle the POST request in Python. In the Python code, we pass the selected text to a question generator model and return the questions & answers to the front-end. The front-end formats and renders those questions & answers, and it creates the Google Form programmatically from those questions & answers.
Challenges we ran into
The question/answer generation process is computationally expensive; without a GPU, it takes about 15 seconds, and if too much text is selected, then the back-end times out. As a result, we are limited to selecting <512 words of text.
Accomplishments & Learnings
None of us have ever worked with Google Docs Add-ons before, so we were impressed with our abilities to create one in just two days. In addition, none of us had ever deployed a web service to Google Cloud before, and through this experience, we could explore the capabilities of the platform. Lastly, we believe programmatically building the Google Form was a tricky but creative way to save the generated questions & answers and empowers teachers to share the "quizzes" with their students.
What's next for QuizMe
The model currently generates only multiple-choice questions, so in the future, we would like to support True/False, short answer questions, etc. In addition, like we stated above, the maximum number of words the back-end can process is around 512. If we can increase this capacity, our application would be able to generate questions over entire chapters of text at a time. Lastly, our server that hosts the model currently does not have a GPU. Running question/answer generation on a GPU would reduce the speed by 50%, thereby improving user experience.
Built With
- apps-script
- flask
- google-cloud
- google-docs-api
- google-forms-api
- nginx
- python
- pytorch
Log in or sign up for Devpost to join the conversation.