A production-ready Generative AI application built using Python, Streamlit, and Google Gemini, designed to generate high-quality MCQs (Multiple Choice Questions) and provide interactive, explanation-driven learning.
This project demonstrates real-world usage of LLMs, structured prompting, JSON parsing, and frontend-backend integration.
This application uses Gen-AI (Google Gemini) to:
-
Generate exactly 15 MCQs based on:
- Topic
- Difficulty level (Easy / Medium / Hard)
-
Display one question at a time
-
Allow users to select options interactively
-
Provide:
- ✅ Explanation for correct answers
- ❌ Feedback + correct answer + explanation for wrong answers
This makes the app both a generator and an AI tutor.
- LLM-driven MCQ generation
- Interactive learning experience
- Beginner-friendly explanations
- Modular, scalable project structure
- Production-grade prompt design
- Clean Streamlit UI
| Layer | Technology |
|---|---|
| Language | Python 3.10+ |
| LLM | Google Gemini |
| Frontend | Streamlit |
| Prompt Mgmt | JSON |
| Config Mgmt | YAML |
| Env Mgmt | python-dotenv |
| Validation | Pydantic |
python-gen-ai/
│
├── apps/
│ └── mcp_generator/
│ └── app.py
│
├── utils/
│ ├── llm_client.py
│ ├── mcp_helper.py
│ └── prompts/
│ └── mcp_generator_prompt.json
│
├── config/
│ ├── config.yaml
│ └── model_config.py
│
├── .env
├── requirements.txt
├── README.md
└── main.py
git clone https://github.com/DeepaliPaspule/python-gen-ai.git
cd python-gen-aipython3 -m venv myenv
source myenv/bin/activate # macOS / Linuxpip install -r requirements.txtCreate a .env file:
GEMINI_API_KEY=your_google_gemini_api_keystreamlit run apps/mcp_generator/app.pyQ1. What is a list in Python?
A. Immutable sequence
B. Mutable sequence
C. Dictionary type
D. Set type
❌ Wrong Answer
Correct Answer: B
Explanation: Lists are mutable, meaning elements can be modified after creation.
This project demonstrates:
- Practical LLM integration
- End-to-end Gen-AI workflow
- Frontend + backend orchestration
- Real-world AI reliability challenges
Deepali Paspule-CSE Graduate|Gen-AI Enthusiast