A simple PDF-based RAG (Retrieval-Augmented Generation) chatbot built with Streamlit, ChromaDB, Sentence Transformers, and Groq API.
- 📄 Upload PDF files
- 🔍 Extract and process PDF text
- 🧠 Create embeddings using Sentence Transformers
- 🗄️ Store vectors in ChromaDB
- 💬 Ask questions from uploaded PDF
- ⚡ Groq-powered intelligent responses
- 📌 View source chunks used for answers
RAG Implementation/ │── app.py │── .env │── .env.example │── requirements.txt │── uploads/
git clone <your-repo-url>
cd RAG-Implementationpython -m venv venvWindows CMD:
venv\Scripts\activatePowerShell:
venv\Scripts\Activate.ps1pip install -r requirements.txtCreate .env file using .env.example:
GROQ_API_KEY=your_groq_api_key_here
MODEL_NAME=llama-3.1-8b-instantstreamlit run app.pyRecommended:
MODEL_NAME=llama-3.1-8b-instant- Upload PDF
- Wait for text extraction + embedding
- Ask questions
- Get answers from PDF context
| Component | Technology |
|---|---|
| UI Framework | Streamlit |
| Vector Database | ChromaDB |
| Embeddings | Sentence Transformers |
| LLM API | Groq API |
| Orchestration | LangChain |
| Language | Python |
- Make sure your Groq API key is valid
- Large PDFs may take more processing time
- Best for text-based PDFs (not scanned images)