This project implements a Retrieval-Augmented Generation (RAG) system for document-based question answering using:
- DeepSeek-R1 (via Groq) for fast & efficient AI-powered responses.
- ChromaDB for storing and retrieving document embeddings.
- HuggingFace Embeddings for vectorization.
- Streamlit for an interactive UI.
πΉ Users can upload a PDF, process it into a vector database, and query it for answers!
- π Upload and process PDF documents into a vector store.
- π Retrieve relevant document sections using ChromaDB.
- π¬ Generate AI-powered answers using DeepSeek-R1 via Groq.
- π Interactive UI built with Streamlit.
/project-folder
β-- main.py # Streamlit UI for user interaction
β-- rag_utility.py # Core logic for document processing & retrieval
β-- config.json # Stores API keys
β-- requirements.txt # Required dependencies
git clone https://github.com/AymenGabsi/rag_deepseek_groq_doc_qa.git
cd your-repopython -m venv venv
source venv/bin/activate # For macOS/Linux
venv\Scripts\activate # For Windowspip install --upgrade pip setuptools wheel
pip install -r requirements.txt- Open config.json and replace
your_groq_api_keywith your actual Groq API Key:
{
"GROQ_API_KEY": "your_groq_api_key"
}After setting up, launch the Streamlit app:
streamlit run main.pyThis will open a web interface where you can:
- Upload a PDF
- Ask questions about its content
- Receive AI-generated answers powered by DeepSeek-R1
- Upload a PDF file.
- Extract text and convert it into vector embeddings using HuggingFace.
- Store embeddings in ChromaDB for efficient retrieval.
- Retrieve relevant sections from ChromaDB when a user asks a question.
- Send retrieved data to DeepSeek-R1 (Groq) LLM for final answer generation.
- LangChain for orchestrating LLM-based workflows.
- DeepSeek-R1 via Groq for LLM-based response generation.
- ChromaDB for vector storage and retrieval.
- HuggingFace Embeddings for document vectorization.
- Streamlit for UI interaction.
- π Support more document formats (TXT, DOCX, HTML, etc.)
- π Improve retrieval accuracy using hybrid search (BM25 + embeddings).
- π¨ Enhance UI with real-time answer explanations.
- π Optimize response speed by caching retrieval results.
This project is licensed under the MIT License.
Contributions are welcome! Feel free to fork this repository, submit issues, or create pull requests.
π§ For inquiries, reach out via GitHub Issues.
π Happy Coding!