This project started around April 2023 when I wanted to learn about LLMs and, specifically, OpenAI's GPT models. At the time, I didn't understand how a response from a model can be used in an application because I was used to working with APIs that return JSON data.
The first time I pasted in a few lines from a text book, GPT-3 returned a response a little something like this:
Here is a quiz based on the text you provided:
Q: What is the capital of France?
1. Paris (A)
2. London
3. Berlin
4. Madrid
Of course, I wanted to know which of the answers provided is the correct one, so I added (A)
at the end of the correct answer. My first approach to this was to use regular expressions to find the correct answer and then display it in the UI. This worked, but it was very unreliable because the model would sometimes return the correct answer in a different format.
Luckily, OpenAI eventually released function calling which made the process more reliable. With additional validation via zod, I was able to ensure that the response from the model was always in the correct format.
To make importing documents into Zenquiz as easy and connected to a typical student's workflow as possible, I added several features that were interesting to implement:
Students use artificial intelligence nowadays and its use is currently only increasing. The goal of Zenquiz was not to make a tool that replaces studying, or - even worse - to encourage cheating. After all, you first have to study your notes before you can answer quiz questions.
Instead, I wanted to make studying more convenient and efficient. By turning study notes into quizzes, students can test their knowledge and prepare for exams in a more engaging way. It is a recipe to success that tools like Anki or Kahoot have already proven.