AI MCQ Generator

January 15, 2025
Ritika

Technologies & Tools

Gemini API
Python
Streamlit

Project Details

The AI MCQ Generator is a cutting-edge application designed to transform any text document—whether it's a PDF, DOCX, or TXT file—into a well-structured set of multiple-choice questions (MCQs). Leveraging the power of the Gemini API, this tool intelligently parses lengthy content, extracts key concepts, and generates insightful questions along with plausible distractor options and detailed explanations.

Built with a Python backend and a Streamlit front end, the application is highly interactive, allowing educators, trainers, and self-learners to produce MCQs on demand. Users simply upload their source file, adjust configuration settings (e.g., number of questions, difficulty level), and receive a neatly formatted quiz ready for immediate deployment—either as on-screen text or downloadable PDF.

Key Features

  • Automated Question Generation: Converts any input text into a set of relevant MCQs by identifying important sentences, keywords, and concepts.
  • Distractor Creation: Generates plausible distractor options for each question to ensure a challenging and pedagogically sound quiz.
  • Configurable Difficulty Levels: Users can specify beginner, intermediate, or advanced difficulty. The system tailors question complexity accordingly.
  • PDF & Text Export: After generation, the entire quiz—complete with questions, options, and explanations—can be exported as a well-formatted PDF or copied as plain text for easy distribution.
  • Real-Time Preview: The Streamlit interface updates live as users tweak parameters, displaying sample questions and allowing instant feedback.
  • Interactive UI: A clean, responsive layout ensures a smooth experience on both desktop and tablet screens.

Usage Workflow

  1. Upload Document: Click 'Browse' or drag-and-drop your source file (PDF, DOCX, or TXT) into the designated drop zone.
  2. Set Parameters: Choose the desired number of questions, select a difficulty level, and optionally specify topic keywords.
  3. Generate MCQs: Press 'Generate'—the Gemini API analyzes the text and returns a formatted MCQ list.
  4. Review & Edit: Preview the questions in real time.
  5. Export & Distribute: Download the quiz as a PDF or copy/paste the text.

Benefits & Impact

  • Time Efficiency: Automates hours of manual question-writing into a few seconds.
  • Consistency & Quality: Ensures each question adheres to best practices.
  • Scalability: Suitable for educators handling large batches of documents.
  • Customization: Fine-tune question difficulty and focus on specific topics.
  • Accessibility: Web-based interface with no installation required.
AI MCQ Generator image 1