https://github.com/gurpreetkaurjethra/rag-based-llm-chatbot
RAG Based LLM Chatbot Built using Open Source Stack (Llama 3.2 Model, BGE Embeddings, and Qdrant running locally within a Docker Container)
https://github.com/gurpreetkaurjethra/rag-based-llm-chatbot
aichatbot generative-ai large-language-models llama3 llama3-2 llms qdrant rag streamlit
Last synced: 8 months ago
JSON representation
RAG Based LLM Chatbot Built using Open Source Stack (Llama 3.2 Model, BGE Embeddings, and Qdrant running locally within a Docker Container)
- Host: GitHub
- URL: https://github.com/gurpreetkaurjethra/rag-based-llm-chatbot
- Owner: GURPREETKAURJETHRA
- License: mit
- Created: 2025-01-09T12:18:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-09T13:00:40.000Z (over 1 year ago)
- Last Synced: 2025-10-01T01:31:50.097Z (9 months ago)
- Topics: aichatbot, generative-ai, large-language-models, llama3, llama3-2, llms, qdrant, rag, streamlit
- Language: Python
- Homepage: https://github.com/GURPREETKAURJETHRA/Generative-AI-LLM-Projects
- Size: 1.14 MB
- Stars: 13
- Watchers: 1
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RAG Based LLM AI Chatbot π€
RAG Based LLM AI Chatbot Built using Open Source Stack (Llama 3.2 Model, BGE Embeddings, and Qdrant running locally within a Docker Container)

**RAG Based LLM AI Chatbot** is a powerful Streamlit-based application designed to simplify document management. Upload your PDF documents, create embeddings for efficient retrieval, and interact with your documents through an intelligent chatbot interface. π
## π οΈ Features
- **π Upload Documents**: Easily upload and preview your PDF documents within the app.
- **π§ Create Embeddings**: Generate embeddings for your documents to enable efficient search and retrieval.
- **π€ Chatbot Interface**: Interact with your documents using a smart chatbot that leverages the created embeddings.
- **π§ Contact**: Get in touch with the developer or contribute to the project on GitHub.
- **π User-Friendly Interface**: Enjoy a sleek and intuitive UI with emojis and responsive design for enhanced user experience.
## π₯οΈ Tech Stack
The Document Buddy App leverages a combination of cutting-edge technologies to deliver a seamless and efficient user experience. Here's a breakdown of the technologies and tools used:
- **[LangChain](https://langchain.readthedocs.io/)**: Utilized as the orchestration framework to manage the flow between different components, including embeddings creation, vector storage, and chatbot interactions.
- **[Unstructured](https://github.com/Unstructured-IO/unstructured)**: Employed for robust PDF processing, enabling the extraction and preprocessing of text from uploaded PDF documents.
- **[BGE Embeddings from HuggingFace](https://huggingface.co/BAAI/bge-small-en)**: Used to generate high-quality embeddings for the processed documents, facilitating effective semantic search and retrieval.
- **[Qdrant](https://qdrant.tech/)**: A vector database running locally via Docker, responsible for storing and managing the generated embeddings for fast and scalable retrieval.
- **[LLaMA 3.2 via Ollama](https://ollama.com/)**: Integrated as the local language model to power the chatbot, providing intelligent and context-aware responses based on the document embeddings.
- **[Streamlit](https://streamlit.io/)**: The core framework for building the interactive web application, offering an intuitive interface for users to upload documents, create embeddings, and interact with the chatbot.
## π Directory Structure
document_buddy_app/
```
βββ logo.png
βββ new.py
βββ vectors.py
βββ chatbot.py
βββ requirements.txt
```
## π Getting Started
Follow these instructions to set up and run the Document Buddy App on your local machine.
### 1. Clone the Repository
```bash
git clone https://github.com/GURPREETKAURJETHRA/RAG-Based-LLM-Chatbot.git
cd RAG-Based-LLM-Chatbot
```
2. Create a Virtual Environment
You can either use Pythonβs venv or Anaconda to create a virtual environment for managing dependencies.
Option 1: Using venv
On Windows:
```bash
python -m venv venv
venv\Scripts\activate
```
On macOS and Linux:
```bash
python3 -m venv venv
source venv/bin/activate
```
Option 2: Using Anaconda
Follow these steps to create a virtual environment using Anaconda:
1. Open the Anaconda Prompt.
2. Create a new environment:
```bash
conda create --name Chatbot python=3.10
```
(Replace Chatbot with your preferred environment name if desired).
3. Activate the newly created environment:
```bash
conda activate Chatbot
```
3. Install Dependencies
Once the environment is set up (whether venv or Conda), install the required dependencies using requirements.txt:
```bash
pip install -r requirements.txt
```
4. Run the App
Start the Streamlit app using the following command:
```bash
streamlit run new.py
```
Note: If your main application file is named differently, replace new.py with your actual file name (e.g., app.py).
This command will launch the app in your default web browser. If it doesnβt open automatically, navigate to the URL provided in the terminal (usually http://localhost:8501).
### π€ Contributing
Contributions are welcome! Whether itβs reporting a bug, suggesting a feature, or submitting a pull request, your input is highly appreciated. Follow these steps to contribute:
1. Fork the Repository: Click on the βForkβ button at the top-right corner of the repository page.
2. Clone Your Fork
3. Create a New Branch:
```
git checkout -b feature/YourFeatureName
```
4. Make Your Changes: Implement your feature or fix.
5. Commit Your Changes:
```
git commit -m "Add Your Feature Description"
```
6. Push to Your Fork:
```
git push origin feature/YourFeatureName
```
7. Create a Pull Request: Navigate to the original repository and create a pull request from your fork.
### π Useful Links
β’ Streamlit Documentation: https://docs.streamlit.io/
β’ LangChain Documentation: https://langchain.readthedocs.io/
β’ Qdrant Documentation: https://qdrant.tech/documentation/
β’ ChatOllama Documentation: https://github.com/langchain-ai/langchain-llms#ollama
Happy coding! πβ¨
## Β©οΈ License πͺͺ
Distributed under the MIT License. See `LICENSE` for more information.
---
#### **If you like this LLM Project do drop β to this repo**
#### Follow me on [](https://www.linkedin.com/in/gurpreetkaurjethra/) Β [](https://github.com/GURPREETKAURJETHRA/)
---