https://github.com/intrepidkid/rag-chatbot
RAG chatbot using Intel's Neural Chat 7B LLM, BGE Embeddings, ChromaDB, Langchain, and CTransformers. A simple frontend developed using HTML, CSS and bootstrap. Basic Project to implement the functionality of RAG.
https://github.com/intrepidkid/rag-chatbot
ai bootstrap langchain python3 rag
Last synced: 5 months ago
JSON representation
RAG chatbot using Intel's Neural Chat 7B LLM, BGE Embeddings, ChromaDB, Langchain, and CTransformers. A simple frontend developed using HTML, CSS and bootstrap. Basic Project to implement the functionality of RAG.
- Host: GitHub
- URL: https://github.com/intrepidkid/rag-chatbot
- Owner: intrepidkid
- Created: 2025-04-08T09:39:51.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-08T10:59:22.000Z (over 1 year ago)
- Last Synced: 2025-10-23T23:40:27.936Z (9 months ago)
- Topics: ai, bootstrap, langchain, python3, rag
- Language: HTML
- Homepage:
- Size: 1000 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ง RAG Chatbot โ Retrieval-Augmented Generation with LangChain
This is a lightweight, local Retrieval-Augmented Generation (RAG) chatbot built using **LangChain**, **Chroma**, and a **local LLM** (neural-chat 7B GGUF model). It allows users to ask questions, and the system responds with contextually relevant answers based on ingested documents.
## ๐ Features
- ๐ **Document Search:** Uses Chroma vector store to find relevant chunks.
- ๐ง **Local LLM:** Uses `CTransformers` to run a GGUF quantized model (no internet required).
- ๐งพ **Custom PDF Ingestion:** Load and split PDFs using `PyMuPDFLoader`.
- ๐งฌ **HuggingFace BGE Embeddings:** For high-quality semantic search.
- ๐ **Flask Web App:** Simple frontend to interact with the chatbot.
---
## ๐๏ธ Project Structure
```
RAG_Chatbot_Inv_Bank/
โ
โโโ Data/
โ โโโ app.py # Main Flask app
โ โโโ ingest.py # For loading and vectorizing documents
โ โโโ neural-chat-7b...gguf # Local quantized LLM (ignored in git)
โ โโโ 400 Questions.pdf # Sample document
โ
โโโ templates/
โ โโโ index.html # Frontend for the chatbot
โ
โโโ stores/ # Chroma vector store (ignored in git)
โโโ .gitignore
โโโ README.md
```
---
## ๐ ๏ธ Installation
> ๐ Make sure you have Python 3.10+ and `pip` installed.
```bash
git clone https://github.com/intrepidkid/RAG-Chatbot-.git
cd RAG-Chatbot-
python -m venv venv
venv\Scripts\activate # or source venv/bin/activate on Unix
pip install -r requirements.txt
```
> Make sure to download the `.gguf` model file manually and place it inside the `Data/` folder.
---
## โ๏ธ Usage
### 1. Ingest Documents
Run this once to process your PDF files and generate embeddings:
```bash
python Data/ingest.py
```
### 2. Start the Flask App
```bash
python Data/app.py
```
Go to `http://127.0.0.1:5000/` to chat!
---
## ๐ .gitignore Example
```gitignore
venv/
__pycache__/
*.pyc
*.log
.env
*.gguf
stores/
```
---
## ๐ก Tech Stack
- [LangChain](https://www.langchain.com/)
- [CTransformers](https://github.com/marella/ctransformers)
- [ChromaDB](https://www.trychroma.com/)
- [HuggingFace BGE Embeddings](https://huggingface.co/BAAI/bge-large-en)
- Flask + HTML
---
## ๐งผ TODO
- [ ] Improve UI with streaming response
- [ ] Add file upload functionality
- [ ] Support GPU inference (optional)
---
## ๐ License
MIT License
---
## ๐งโ๐ป Author
**@intrepidkid**
๐ [GitHub](https://github.com/intrepidkid)