StudyMate AI is an interactive Retrieval-Augmented Generation (RAG) application built with Streamlit.
It allows students and researchers to upload PDFs, ask questions, get summaries, generate quizzes, and explore content interactively using Groq’s Gemma2-9B-IT LLM and ChromaDB.
- 📂 Upload one or multiple PDFs( Magic Fast Uploading with Batch Processing and Parallel File Processing)
- 🔍 Semantic search using embeddings
- 💡 Summarization & quiz generation from PDFs
- 🧠 RAG-based conversational Q&A
- ⚡ Fast response using Groq API
- 🎯 Supports sentence-transformers for embeddings
- 🖥 Clean Streamlit frontend
The user uploads one or more documents (PDF/TXT).

After upload, a confirmation is displayed, and the user sees the home interface.

Ask any question from the uploaded document, and get AI-generated answers.

Get a concise summary along with important bullet points.

Generate quizzes from the uploaded content for self-assessment.

Below is the complete workflow architecture:
| Component | Technology |
|---|---|
| Frontend | Streamlit |
| Language Model | Groq - Gemma2-9B-IT |
| Vector Database | ChromaDB |
| Embeddings | Sentence-Transformers (HuggingFace) |
| PDF Parsing | PyMuPDF |
| Environment Config | python-dotenv |
RAG (Retrieval-Augmented Generation) is a technique where the LLM retrieves relevant information from a vector store before generating a response.
Why use RAG here?
- Keeps answers accurate to the uploaded PDFs
- Reduces hallucinations from the LLM
- Allows working with large documents without exceeding token limits
---
## 📥 Installation
1. **Clone the repository**
```bash
git clone https://github.com/yourusername/studymate-ai.git
cd studymate-ai
- Create virtual environment
python -m venv .venv
source .venv/bin/activate # (Linux/Mac)
.venv\Scripts\activate # (Windows)- Install dependencies
pip install -r requirements.txt- Set environment variables
Create a
.envfile:
GROQ_API_KEY=your_groq_api_key
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2Run the Streamlit app:
streamlit run app.py