Generates a quiz from a URL. You can play the quiz, or let the LLM play it.
Last updated Aug 9, 2026
71
Stars
13
Forks
1
Issues
+1
Stars/day
Attention Score
64
Language breakdown
Jupyter Notebook 89.8%
Python 10.2%
โธ Files
click to expand
README
title: AutoQuizzer emoji: ๐งโ๐ซ colorFrom: purple colorTo: blue sdk: gradio sdk_version: 5.35.0 app_file: app.py header: mini pinned: true short_description: Generate a quiz, play or let ๐ฆ LLM play models: [openai/gpt-oss-20b]
๐งโ๐ซ AutoQuizzer 
Generates a quiz from a URL. You can play the quiz, or let the LLM play it.
Built using: ๐๏ธ Haystack โข ๐ฆ GPT-OSS 20B โข โก Groq
โน๏ธ This project originally used ๐ฆ Llama 3 8B Instruct (later llama-3.1-8b-instant).
It moved to openai/gpt-oss-20b when Groq decommissioned the Llama model.
How does it work?
๐ฌ Project walkthrough video

- Quiz generation Pipeline: downloads HTML content from the URL, extracts the text and passes it to the LLM to generate a quiz in JSON format.
- You can play the quiz and get a score.
- You can let the LLM play the quiz:
How to run it locally?
- Clone the repo:
git clone https://github.com/anakin87/autoquizzer - Install:
cd autoquizzer && pip install -r requirements.txt - Export two environment variables:
GROQAPIKEY: API key for the Groq API, used to serve openai/gpt-oss-20b.
- SERPERDEVAPIKEY: API key for the SerperDev API, used to fetch search results.
- Run the webapp:
gradio app.py
Customization and potential improvements
- To not exceed the rate limits of Groq's free API, we truncate the text extracted from the URL to 4000 characters. This means that the generated quiz focuses on the beginning of the text. You can increase/remove this limit, taking into account the maximum context length of the model.
- We are using the
OpenAIChatGeneratorto queryopenai/gpt-oss-20bon Groq. You can use an OpenAI model with the same generator. You can also use a different generator (Haystack generators). - In the quiz generation pipeline, we ask the model to generate a JSON. GPT-OSS 20B usually works. You can also create a more robust JSON generation pipeline, as shown in this tutorial: Generating Structured Output with Loop-Based Auto-Correction.
- GPT-OSS is a reasoning model. We set
reasto keep it brief (Groq does not accept"none"for this model). Since reasoning tokens count againstmax_tokens, the answer pipelines need headroom well above the single letter they return.
๐ More in this category