A modern, end-to-end LLMOps quiz and study system that leverages large language models and advanced system design patterns for maintainability, extensibility, and robustness. This project covers the full lifecycle from LLM-powered question generation to deployment and monitoring, following best practices in LLMOps.
- End-to-End LLMOps: Complete workflow from prompt engineering, LLM-powered question generation, evaluation, to deployment and monitoring.
- LLM-Powered Quiz Generation: Uses large language models to generate multiple-choice and fill-in-the-blank questions on any topic and difficulty.
- System Design Patterns: Incorporates Factory, Strategy, and Template Method patterns for clean, modular, and extensible code.
- Beautiful Streamlit UI: Interactive, user-friendly web interface for quiz taking and results review.
- Session Management: Uses Streamlit session state for persistent, multi-step workflows.
- Result Export: Download quiz results as CSV files.
- Factory Pattern: Centralized question creation logic for different question types.
- Strategy Pattern: Pluggable evaluation and UI logic for each question type.
- Template Method Pattern: Modular quiz workflow steps (generate, attempt, evaluate).
- Separation of Concerns: Business logic, UI, and LLM integration are cleanly separated.
- Python 3.12
- Streamlit (frontend/UI)
- LangChain (LLM integration)
- Pydantic (data validation)
- Kubernetes (container orchestration)
- GCP VM (cloud hosting)
- Jenkins (CI pipeline)
- ArgoCD (CD pipeline)
-
Clone the repo:
git clone https://github.com/yourusername/study_buddy.git cd study_buddy -
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Copy
.env.exampleto.envand fill in your API keys and settings.
- Copy
-
Run the app locally:
streamlit run app.py
- Kubernetes:
- Deploy the app using the provided
Dockerfileand Kubernetes manifests (manifests/).
- Deploy the app using the provided
- GCP VM:
- Host your Kubernetes cluster or Jenkins/ArgoCD runners on Google Cloud Platform VMs.
- Jenkins (CI):
- Automated testing, linting, and build pipeline.
- ArgoCD (CD):
- GitOps-based continuous deployment to Kubernetes.
src/
models/ # Pydantic models
generator/ # LLM question factory
strategy/ # Evaluation and UI strategies
utils/ # QuizManager and helpers
prompts/ # Prompt templates
common/ # Logging, exceptions, constants
config/ # Settings
app.py # Streamlit entry point
manifests/ # Kubernetes manifests
Dockerfile # Container build
.pre-commit-config.yaml
Pull requests are welcome! Please lint and format your code with pre-commit before submitting.
MIT License