Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom-Chatbot-using-Langchain

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.

Features

  • 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.

Tech Stack

  • 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.

Getting Started

Prerequisites

  • Python 3.7 or above
  • Git (for cloning the repository)

Installation

  1. Clone the Repository
    git clone https://github.com/YourUsername/Custom-Chatbot-using-Langchain.git
    cd Custom-Chatbot-using-Langchain
    
  2. Set Up the Environment
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install Dependencies
    pip install -r requirements.txt

Configuration

  • 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

Running the ChatBot

  1. Start the Flask Application
    python app.py
  2. 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)

License

This project is licensed under the MIT License.

About

A custom knowledge-based chatbot application that uses LangChain for intelligent retrieval-augmented generation (RAG). It scrapes content from specified URLs, processes it with embeddings stored in ChromaDB, and generates context-aware answers via a language model. Built with Flask, this chatbot includes a simple HTML interface.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages