This project implements a Retrieval-Augmented Generation (RAG) chatbot that lets you upload a PDF and interact with their content using GROQ LLM and an in-memory Chroma vector store.
- 📄 Upload and process a PDF file
- 🧠 Store document embeddings in Chroma (in-memory)
- 💬 Query with GROQ LLM using RAG
- 🔍 Inspect vector store chunks from the sidebar
- 🛠️ Modular, well-commented code for easy customization
Windows
python -m venv .venv
.venv\Scripts\activate
macOS / Linux
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
To use this RAG chatbot, you'll need a GROQ API key.
- Visit console.groq.com/keys
- Sign up or log in to your GROQ account
- Create a new API key
- Copy the generated API key
Windows (Command Prompt)
set GROQ_API_KEY=your_api_key_here
Windows (PowerShell)
$env:GROQ_API_KEY="your_api_key_here"
macOS / Linux
export GROQ_API_KEY="your_api_key_here"
Alternative: Create a .env file
You can also create a .env
file in the project root directory:
GROQ_API_KEY=your_api_key_here
⚠️ Important: Never commit your API key to version control. Add.env
to your.gitignore
file if using this method.
After installing dependencies, start the Streamlit app:
streamlit run index.py
The app will open in your default web browser at:
http://localhost:8501
If it doesn’t open automatically, copy and paste the URL from your terminal into your browser.
💡 Build your own custom RAG chatbot effortlessly!