PrepGraph is an AI-powered RAG chatbot built with LangGraph, LangChain, FAISS, and Groq’s LLaMA-3.
It’s designed to understand your uploaded PDFs/PPTX, retrieve the most relevant context, and chat naturally — while remembering your past messages.
- Each user has their own persistent chat memory (SQLite-based)
- Remembers your last messages and maintains context automatically
- Memory stored locally — no external database required
- Combines BM25 (keyword search) + FAISS (semantic embeddings)
- Embeddings generated using SentenceTransformers
- Supports both PDFs and PPTX — ideal for lecture slides, project docs, or reports
- Intelligent subject detection (CN, DOS, SE, etc.) for improved retrieval accuracy
- Powered by Groq’s ultra-fast inference
- Context-aware and concise responses with safe fallback extraction
- Strictly follows provided document context to avoid hallucination
- Clean, responsive Gradio UI (minimal design)
- Automatically loads your previous conversations
- Includes “Send” + “Clear Chat” buttons for smooth interaction
- Works even if backend restarts — chat memory persists!
- Modular architecture: Retriever, Memory, and Graph layers separated
- Cached FAISS + BM25 indexes for lightning-fast reloads
.env-driven configuration for flexible environment setup- Structured logging and fault-tolerant persistence
- Fully compatible with Hugging Face Spaces deployment
User Query → Memory (SQLite)
↓
Retriever Node
(BM25 + FAISS Hybrid)
↓
Context Chunk
↓
LLaMA-3 (Groq)
↓
Answer + Memory Save
↓
Gradio Chat UI
├── chatbot_graph.py # Main Gradio app (UI + LangGraph) ├── chatbot_retriever.py # Hybrid retriever (FAISS + BM25) ├── memory_store.py # SQLite-based persistent memory ├── data/ # Upload PDFs / PPTX here ├── .env # API keys and environment configs └── requirements.txt
git clone https://github.com/07Codex07/PrepGraph.git cd PrepGraph
python -m venv myenv source myenv/bin/activate # or myenv\Scripts\activate (Windows)
pip install -r requirements.txt
echo "GROQ_API_KEY=your_groq_api_key_here" > .env
python chatbot_graph.py
🖼️ Screenshots
Chat UI Document Context Retrieval Response Generation

🚀 Project Status
- Backend: Fully functional — LangGraph, Groq, FAISS, BM25, and SQLite memory integrated.
- Frontend: In progress — UI work ongoing (will connect to backend via Gradio/Bolt).
- Deployment: Will be deployed once frontend workflow is ready.
Built by Vinayak Sahu