Transform any block of text into an interactive multiple-choice quiz.
This project was developed as part of the Fundamentals of AI and ML course. It demonstrates the use of keyword extraction, semantic similarity, and API-based system design to create an effective learning tool.
Many students struggle to test their understanding while studying. This project addresses that problem by automatically generating quiz questions from any given text. It encourages active recall, which is proven to improve learning and retention.
- Automatically extracts important keywords using TF-IDF and RAKE
- Generates multiple-choice questions with meaningful distractors
- Provides instant scoring and performance analysis
- Offers a REST API for easy integration
- Includes a simple browser-based interface
quiz-generator/
├── data/
├── docs/
├── src/
│ ├── keyword_extractor.py
│ ├── question_generator.py
│ ├── quiz_evaluator.py
│ └── app.py
├── tests/
├── README.md
└── requirements.txt
-
Install dependencies
pip install -r requirements.txt -
Start the server
python src/app.py -
Open the frontend
- Open
docs/index.htmlin your browser
- Open
The system follows a simple pipeline:
- Extracts important keywords from the input text
- Selects meaningful sentences
- Converts them into fill-in-the-blank questions
- Generates plausible incorrect options using semantic similarity
- Evaluates user answers and provides a performance report
rake-nltkfor keyword extractionnltkfor text processingsentence-transformersfor semantic similarityflaskfor backend APIpytestfor testing
This project demonstrates how AI techniques can be applied to improve learning. By automating quiz generation, it helps students actively engage with their study material and assess their understanding more effectively.