EduFocus is an intelligent, grounded Retrieval-Augmented Generation (RAG) educational platform that converts static academic materials (PDFs) into an interactive, personalized learning environment.
Designed to adapt dynamically to a student's technical proficiency, EduFocus AI provides level-tailored explanations, verifiable page-level citations, zero-hallucination guardrails, and automated self-assessment quizzes.
-
🧠 Adaptive Learning Modes
- Beginner Mode: Explains complex concepts using simple language, relatable analogies, and intuitive examples.
- Intermediate Mode: Provides technically accurate, academically rigorous explanations for deeper understanding.
-
📚 Grounded Page-Level Citations
- Every response includes verifiable citations in the format:
[Source: document.pdf, Page X] - Enables students to validate answers directly from the uploaded study material.
- Every response includes verifiable citations in the format:
-
🛡️ Hallucination-Resistant Responses
- Strict prompt engineering ensures answers are generated only from the retrieved document context.
- If the required information is unavailable, the assistant clearly states that it is not present in the uploaded material.
-
⚡ Real-Time AI Streaming
- Powered by Groq's
llama-3.1-8b-instantfor low-latency, token-by-token response generation using Streamlit streaming.
- Powered by Groq's
-
📝 Automatic Quiz Generation
- Uses
llama-3.3-70b-versatileto generate contextual 5-question MCQ quizzes directly from the uploaded academic content.
- Uses
-
🔄 Context-Aware Chat Memory
- Maintains a rolling 3-turn conversation history (6 messages) to preserve context while keeping token usage efficient.
EduFocus is engineered entirely with high-performance, 100% free and open-source technologies:
┌─────────────────┐ ┌────────────────────┐ ┌──────────────────────┐
│ PDF Uploads │ ────► │ PyPDF + Chunking │ ────► │ sentence-transformer │
└─────────────────┘ └────────────────────┘ └──────────┬───────────┘
│
┌─────────────────┐ ┌────────────────────┐ ▼
│ Streamlit UI │ ◄──── │ Groq Cloud Stream │ ◄──── ┌──────────────────────┐
│ (Chat + Quiz) │ │ (Llama-3.1 / 70B) │ │ Local FAISS Index │
└─────────────────┘ └────────────────────┘ └──────────────────────┘
EduFocus/
├── 📄 app.py # Main Streamlit UI entry point
├── 📂 utils/
│ ├── ⚙️ loader.py # Document loading via PyPDFLoader
│ ├── ✂️ splitter.py # Text chunking (1000 chars, 200 overlap)
│ ├── 🧮 embeddings.py # CPU sentence-transformer model
│ ├── 🗄️ vector_store.py # FAISS similarity search utilities
│ ├── 🧠 chat_memory.py # 3-turn sliding window history logic
│ ├── 🚀 chat_engine.py # Groq streaming & citation extraction
│ └── 📝 prompts.py # Adaptive system prompts & quiz formatters
├── 📂 database/
│ ├── 📥 ingestion.py # Document processing pipeline
│ └── 💾 vector_store.py # Persistence wrappers
├── 📂 faiss_db/ # Local vector index storage
├── 📄 requirements.txt # Python dependencies
└── 🔒 .env # Environment variables (API key)
git clone https://github.com/Trisha937/EduFocus.git
cd EduFocusWindows
python -m venv venv
venv\Scripts\activatemacOS / Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root and add your Groq API key:
GROQ_API_KEY=your_groq_api_key_herestreamlit run app.py🌐 Application URL: http://localhost:8501
Open the above URL in your browser after the Streamlit server starts.