Revolutionizing Education with AI-Powered Question Generation
EduPrompt AI is an intelligent educational platform that leverages cutting-edge AI technology to automatically generate high-quality educational questions. Whether you're a teacher looking to create engaging assessments or a student wanting to practice with diverse question types, EduPrompt AI has got you covered!
- 🤖 AI-Powered Generation: Uses Groq LLM for intelligent question creation
- 📝 Multiple Question Types: Generate MCQs and Fill-in-the-Blank questions
- 🎯 Difficulty Control: Customize question difficulty (easy, medium, hard)
- 🔄 Smart Retry Logic: Robust error handling with automatic retries
- 📊 Structured Output: Pydantic models ensure consistent, validated responses
- 🎨 Modern UI: Beautiful Streamlit interface for seamless interaction
- Backend: Python 3.10+
- AI Framework: LangChain + Groq LLM
- Data Validation: Pydantic
- Web Interface: Streamlit
- Environment Management: uv (modern Python package manager)
- Logging: Custom logging system with structured output
- Python 3.10 or higher
- Groq API key (get one at groq.com)
-
Clone the repository
git clone https://github.com/ChandaVarshith/EduPromptAI.git cd EduPrompt-AI -
Install dependencies using uv
uv sync
-
Set up environment variables
# Create a .env file echo "GROQ_API_KEY=your_groq_api_key_here" > .env
-
Run the application
uv run streamlit run main.py
from src.generator.question_generator import QuestionGenerator
# Initialize the generator
generator = QuestionGenerator()
# Generate an MCQ question
mcq = generator.generate_mcq(
topic="Python Programming",
difficulty="medium"
)
print(f"Question: {mcq.question}")
print(f"Options: {mcq.options}")
print(f"Correct Answer: {mcq.correct_answer}")
# Generate a Fill-in-the-Blank question
fill_blank = generator.generate_fill_blank(
topic="Machine Learning",
difficulty="hard"
)
print(f"Question: {fill_blank.question}")
print(f"Answer: {fill_blank.correct_answer}")- 4 carefully crafted options
- One correct answer
- Difficulty-based complexity
- Topic-specific content
- Contextual sentence completion
- Single-word or phrase answers
- Adaptive difficulty levels
- Educational focus
EduPrompt-AI/
├── src/
│ ├── common/ # Common utilities and exceptions
│ ├── config/ # Configuration management
│ ├── generator/ # Question generation logic
│ ├── llm/ # Groq LLM integration
│ ├── models/ # Pydantic data models
│ ├── prompts/ # AI prompt templates
│ └── utils/ # Helper functions
├── main.py # Application entry point
├── pyproject.toml # Project configuration
├── requirements.txt # Dependencies
└── README.md # This file
The application uses a settings system that can be configured through environment variables:
GROQ_API_KEY: Your Groq API keyMAX_RETRIES: Maximum retry attempts for question generation (default: 3)LOG_LEVEL: Logging level (default: INFO)
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Install development dependencies
uv sync --dev
# Run tests (when implemented)
uv run pytest
# Format code
uv run black src/
uv run isort src/This project is licensed under the MIT License - see the LICENSE file for details.
- Groq for providing fast and reliable LLM inference
- LangChain for the excellent AI framework
- Streamlit for the beautiful web interface
- Pydantic for robust data validation
- 📧 Contact: Reach out through GitHub