A modular Streamlit-based application for generating and managing multiple choice questions (MCQs) with advanced AI-powered features and clean architecture.
LLMQuizatron/
βββ src/ # Source code directory
β βββ app.py # Main Streamlit application entry point
β βββ components/ # Reusable UI components
β β βββ sidebar.py # Sidebar navigation with page routing
β β βββ welcome.py # Welcome page component with help content
β β βββ test_form.py # Test generation form with validation
β β βββ question_list_view.py # Question display and management components
β βββ pages/ # Page components
β β βββ test_generation.py # New test generation page with 2x2 layout
β β βββ test_list.py # Test list and management page with tabs
β βββ services/ # Business logic services
β β βββ test_generation_service.py # Test management and generation service
β β βββ file_storage_service.py # Data persistence service
β β βββ workflow_graph.png # Workflow visualization
β βββ workflow/ # AI workflow components
β β βββ test_generation_workflow.py # LangGraph workflow for AI generation
β βββ utils/ # Utility functions
β βββ export_workflow.py # Workflow export utilities
βββ data/ # Data storage
β βββ tests/ # Test data storage (JSON files)
β βββ logs/ # Application logs
β βββ settings/ # Application settings
β β βββ user_default_settings.json # User settings
β βββ README.md # Data directory documentation
βββ main.py # Application entry point
βββ pyproject.toml # Project configuration and dependencies
βββ .env.example # Environment variables template
βββ .python-version # Python version specification (3.12+)
βββ .gitignore # Git ignore file
βββ LICENSE # MIT License
βββ INTEGRATION_README.md # Integration documentation
βββ README.md # This file
- AI-powered test generation using Google Gemini API and LangGraph workflow
- Advanced form interface with comprehensive options
- Real-time preview of generated tests
- Multiple difficulty levels: Easy, Medium, Hard
- Technology-specific questions: Python, JavaScript, Java, React, Node.js, Machine Learning
- Customizable parameters: Number of questions, difficulty, technology
- Workflow visualization with diagram
- Quality validation with automatic question checking
- Comprehensive test management with search and filter capabilities
- Analytics dashboard with detailed statistics
- Multiple view options: All Questions, Search & Filter, Analytics
- Test set organization with metadata
- LangGraph workflow for robust AI question generation
- Modular architecture for easy maintenance and extension
- Persistent storage with JSON file-based system
- Session state management for user preferences and temporary data
- Responsive design with modern UI components
- Error handling and user feedback
- Workflow visualization with diagram
- Clone the repository:
$ git clone <repository-url>
$ cd LLMQuizatron- Create and activate a virtual environment:
$ python -m venv venv
$ source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -e .- Set up environment variables:
Create a
.envfile in the root directory:
$ cp .env.example .env
$ nano .env
# Replace the API key below with your valid Gemini API key
GEMINI_API_KEY=your_valid_gemini_api_key_here
GEMINI_MODEL_NAME=gemini-2.0-flashTo run the Streamlit application:
$ streamlit run main.pyThe application will open in your default web browser at http://localhost:8501.
- Click "π New Test" in the sidebar
- Fill in the test details:
- Test Name: Enter a descriptive name for your test
- Number of Questions: Choose how many questions to generate
- Difficulty: Select Easy, Medium, or Hard
- Technology: Choose the technology domain (Python, JavaScript, Java, React, Node.js, Machine Learning)
- Click "π Generate Test" to create your test using AI
- Preview the generated questions with correct answers and explanations
- Save the test or generate a new one
- Click "π List of Questions" in the sidebar
- Use the tabs to navigate between different views:
- π All Questions: View all generated test sets
- π Search & Filter: Find specific questions using filters
- π Analytics: View statistics and distributions
- Use action button "View" to view tests
- Google Gemini API: Powers the question generation with advanced language models
- LangGraph Workflow: Ensures robust, validated question generation
- Question Validation: Automatic validation of generated questions for quality assurance
- File Storage Service: JSON-based persistent storage for tests and metadata
- Session Management: Streamlit session state for user preferences and temporary data
The application uses a sophisticated LangGraph workflow for question generation:
- Question Generator: Creates unique technical questions using Gemini API
- Validator: Ensures question quality, format, and uniqueness
- State Management: Tracks progress and maintains question history
- Components: Reusable UI elements with clear interfaces
- Pages: Main application views with business logic
- Services: Data access and business logic layer
- Workflow: AI-powered question generation pipeline
- Streamlit: Web application framework
- LangGraph: Workflow orchestration
- Google Generative AI: Question generation API
- Python-dotenv: Environment variable management
- Python 3.12+: Required for modern features
- pip: Python package manager
- Google Gemini API Key: Required for AI question generation
This project is licensed under the MIT License - see the LICENSE file for details.
- Python 3.12 or higher is required.
- If you see errors about missing API keys, ensure your
.envfile is set up as described. - If you have dependency issues, run
pip install -e .again.
- To add or change supported technologies or difficulty levels, edit the lists in
TestFormandTestGenerationService.