*****Why I Made This*
Every student has felt this way: it's late, you have a lot of reading to do, and you have an exam tomorrow. You read it once or twice, but you're not sure if you got it.
I'm working on I Hate PDFs, a PDF toolkit for students that works in a web browser. It has the usual tools like merge, split, convert, and summarize, but the one thing I wanted most was something that could test your understanding instead of just giving you information.
That's why I made a Flashcard and Quiz maker. With Groq AI, you can upload any PDF and choose how many questions you want (5, 10, or 15). The AI will make a multiple choice quiz for you in seconds.
The Feature in Action
To utilize this feature, one must upload a PDF document, select the desired number of questions, and then click on the Generate button. The application will extract the text from the PDF, process it through Groq, and subsequently produce a fully interactive quiz.

Each question is accompanied by four answer options, providing immediate feedback: a green indicator for the correct answer, a red indicator for incorrect responses, and the correct answer is displayed promptly.
The Feature in Action

To utilize this feature, users must upload a PDF document, specify the desired number of questions, and then click the Generate button. The application will extract the text from the PDF, process it through Groq, and subsequently produce a fully interactive quiz.
Each question is presented with four answer options, providing immediate feedback: a green indicator signifies the correct answer, while a red indicator denotes incorrect responses. The correct answer is displayed promptly for the user's reference.
How It Works — Step by Step
Step 1 — Extract text from the PDF

PyMuPDF's fitz is fast and reliable for text-based PDFs. It goes page by page and concatenates the content.
Step 2 — Send to Groq with a structured prompt
The prompt is the most important part. You can't just say "make a quiz" — you need to tell the model exactly what format to return, otherwise parsing becomes a nightmare.

See the text[:4000]? This is a hard trim to keep from going over the token limit. It's a known limit.
Step 3 — Parse the response
Groq occasionally provides JSON formatted with markdown, which you need to remove before parsing:

This gives you a clean Python list of question objects ready to send to the frontend.
Step 4 — Render on the frontend
Each question is shown as a card with four choices that you can click on. When you make a choice, the app compares it to the answer field and gives you feedback right away, without having to reload the page.
NOTE: Still in the development stage, will be happy to get feedback and suggestions for improvements.
I will soon tell everyone about this.
FOLLOW FOR MORE
Top comments (0)