A knowledge-driven chatbot application that leverages LangChain for retrieval-augmented generation (RAG) using content from specified URLs. This project uses ChromaDB for storing embeddings and Flask for the web interface, creating a chatbot capable of generating precise answers based on a specific knowledge base.
- Custom Knowledge Base: Scrapes and stores data from URLs for use in chatbot responses.
- RAG Architecture: Combines retrieval from the knowledge base with a language model to answer questions contextually.
- ChromaDB Integration: Uses ChromaDB for efficient vector storage and retrieval of document embeddings.
- Flask Web Interface: Lightweight, interactive web front end for user interaction.
- LangChain: Manages the chatbot pipeline, including embedding generation and retrieval processes.
- ChromaDB: Stores and retrieves embeddings generated by the chatbot.
- Flask: Serves the web interface, handling user input and displaying responses.
- HTML and CSS: Provides a simple frontend for interacting with the chatbot.
- Python 3.7 or above
- Git (for cloning the repository)
- Clone the Repository
git clone https://github.com/YourUsername/Custom-Chatbot-using-Langchain.git cd Custom-Chatbot-using-Langchain - Set Up the Environment
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install Dependencies
pip install -r requirements.txt
- Ensure the URL sources are correctly defined in the script, under urls (I have included some random url).
- You can also include multiple url under urls
- Start the Flask Application
python app.py
- Access the Chatbot
- Open your browser and go to http://127.0.0.1:5000 to interact with the chatbot. (as I have mentioned that port in the code, you can also change as per you wish)
This project is licensed under the MIT License.