ChatBot-RAG is a Retrieval-Augmented Generation (RAG) based conversational agent that leverages LangChain, FAISS, and Streamlit to enable context-aware Q&A from custom data sources. This project demonstrates how to ingest documents, generate embeddings, store them in a vector database, and query them during chatbot interactions.
- LangChain – Language model orchestration
- FAISS – Fast vector similarity search for document retrieval
- Streamlit – Interactive UI for the chatbot
- OpenAI / HuggingFace – LLM backbone (can be swapped)
- Python – Primary programming language
ChatBot-RAG/
├── data/ # Input documents (.txt files)
├── vectorstore/db_faiss/ # Persisted FAISS index
├── bot.py # Streamlit frontend for chatbot
├── create_memory_for_llm.py # Embeds and indexes documents
├── connect_memory_with_llm.py # Chains vector memory with LLM
├── test.py # Test scripts and utilities
└── requirements.txt # Python dependencies
git clone https://github.com/rijul21/ChatBot-RAG.git
cd ChatBot-RAGpip install -r requirements.txtEnsure you have Python ≥ 3.7 and an OpenAI or HuggingFace API key set via environment variable.
Place .txt documents inside the data/ directory.
Run the script to generate vector embeddings and build the FAISS index.
python create_memory_for_llm.pySet up LangChain with the indexed data:
python connect_memory_with_llm.pyLaunch the chatbot with Streamlit frontend:
streamlit run bot.pyYou’ll get an interactive UI where you can ask questions grounded in your uploaded documents.
Run test.py to verify embedding and retrieval logic:
python test.py- Internal knowledge base assistants
- Academic document Q&A bots
- Domain-specific helpdesks
- Custom data-aware chat interfaces