🤖 RAG Assistant (Local AI Document Chatbot)
📘 Overview
RAG Assistant is a Retrieval-Augmented Generation (RAG) based chatbot built using LangChain and Hugging Face local embeddings.
It allows users to upload and query their own text documents without requiring any API keys — making it completely free and offline.
This project demonstrates how RAG (Retrieval-Augmented Generation) can be used to build a local intelligent assistant capable of understanding and answering questions from your own documents.
Features
✅ Load and process any .txt document
✅ Use local Sentence-BERT embeddings (all-MiniLM-L6-v2) for semantic search
✅ Ask natural language questions about your text
✅ 100% offline — no API key or internet required
✅ Lightweight, beginner-friendly Python setup
🧠 How It Works
1️⃣ The program loads your text files using LangChain’s TextLoader
2️⃣ It converts the text into embeddings using Hugging Face Sentence-BERT
3️⃣ These embeddings are stored in ChromaDB for vector similarity search
4️⃣ When you ask a question, it retrieves the most relevant chunks
5️⃣ A local Retrieval QA chain generates a contextual answer
🏗️ Tech Stack
Component Technology Used
Programming Language Python 3.10+
Framework LangChain
Embeddings Hugging Face Sentence-BERT (all-MiniLM-L6-v2)
Vector Database ChromaDB
Model Type Local Retrieval QA Chain
Interface Command-Line Interface (CLI)
⚙️ Installation & Setup
git clone https://github.com/Rachanashivarkar/rag-assistant.git
cd rag-assistant
python -m venv venv
venv\Scripts\activate # On Windows
source venv/bin/activate # On Mac/Linux
pip install -r requirements.txt
If you don’t have a requirements file, install manually:
pip install langchain langchain-community langchain-core langchain-openai chromadb sentence-transformers
🧩 Project Structure
rag-assistant/
│
├── app.py # Main RAG chatbot logic
├── documents/ # Folder for input text files
├── requirements.txt # Dependencies list
└── README.md # Project documentation
▶️ Running the Project
python app.py
You’ll see:
🤖 AI Assistant is ready (free local mode)! Type 'exit' to quit.
You:
Then type your queries, for example:
You: What is this document about?
The assistant will respond based on your uploaded document’s content.
📂 Example Output
You: What is this document about?
Assistant: This project builds a simple RAG chatbot using LangChain and Hugging Face to answer questions from local documents.
👩💻 Author
Rachana Shivarkar
🎓 Computer Engineering Student
💡 Passionate about Artificial Intelligence, Machine Learning, and Software Development
🔗 GitHub: https://github.com/Rachanashivarkar
📜 License
This project is licensed under the MIT License — free to use and modify for learning or research purposes.