I spent last night building a simple proof-of-concept of a technology topic quiz generator, backed by OpenAI’s ChatGPT. Since I started working with Generative AI a couple of years ago, I have been finding new ways to incorporate it into my thinking and my work.
With the help of OpenAI’s API and borrowing some stylistic choices from my Reading Plus SeeReader days, I deployed a simple app to Vercel. Based on the selected topic, the user is presented with 10 multiple-choice questions:

You can try it out here: QuizAI. This is the free tier of Vercel, so if the page doesn’t load first time, you may need to refresh.
The tutorial was a great starting point, and like all similar articles there were little tweaks that were needed to make this one work. I modified the styles and added animations, provided instant feedback when answering and a breakout of how the 10 questions were answered. Even small subtle tweaks like improving the loading screen with an animated SVG:

The app also needed some error handling. If the OpenAI API doesn’t return quickly enough, the user had no way of knowing. Adding a try/catch around the API fetch and some user messaging improved things:

The reliability of the OpenAI API is … interesting. At times it’s speedy and reliable, and at others it’s less so. I haven’t dug too deeply into it, but given what I’ve seen, a better way to do this will be to have ChatGPT pre-generate banks of questions on different topics in advance, and then deliver them from a database. The upside would be improved reliability and speed, at the cost of flexibility.
I’ll probably keep iterating on this, or take it down depending on cost. But it was a good exercise and fun to learn how this works!