AI-powered quiz generator that creates interactive quizzes from PDF documents using LangChain, Google Generative AI, and Streamlit. Perfect for teachers, trainers, and students who want to turn learning materials into quizzes instantly.
- 📄 Upload PDFs → Extracts text and processes it.
- 🤖 AI-Powered → Generates quiz questions with multiple-choice answers.
- 📝 Interactive Quiz → Take the quiz inside the Streamlit app.
- ✅ Instant Feedback → Know if your answer is correct on submission.
- 💾 FAISS Vector Store → Efficient semantic search for context retrieval.
- Python 3.10+
- Streamlit – Web app framework
- LangChain – Prompt orchestration
- Google Generative AI – LLM backend
- FAISS – Vector search
- PyPDF2 – PDF parsing
- dotenv – Environment variable management
AI-Quiz-Maker/
│── Pics
│── Interface 1.png
│── Interface 2.png
│── main.py # Streamlit app entry point
│── requirements.txt # Dependencies
│── LICENSE # Apache License 2.0
│── README.md # Project documentation
- Clone the repo
git clone https://github.com/hamadbijarani/AI-Quiz-Maker.git
cd AI-Quiz-Maker- Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows- Install dependencies
pip install -r requirements.txt- Set up environment variables
Create a
.envfile in the root directory:
GOOGLE_API_KEY=your_api_key_hereRun the Streamlit app:
streamlit run main.py- Upload a PDF document.
- The AI generates quiz questions.
- Start the quiz and test your knowledge interactively!
Contributions are welcome!
- Fork the repo
- Create a new branch (
feature/your-feature) - Commit changes
- Open a pull request
This project is licensed under the Apache License 2.0 – feel free to use and modify.

