GithubHelp home page GithubHelp logo

knowledge-base-question-answering-chatbot's Introduction

Knowledge-Base-Question-Answering-Chatbot

This is a medical chatbot built using Llama2 and Sentence Transformers for multiple Large PDF files (You can change to any other field PDF files). The chatbot is designed to deliver a seamless conversational experience with its natural language processing capabilities on your own data.

The chatbot is powered by Langchain, Fasiss and Chainlit. LangChain is a framework that makes it easier to build scalable AI/LLM apps and chatbots. Faiss is a vectorstore for storing embeddings and your PDF in text to later retrieve similar docs. Chainlit lets you create ChatGPT-like UIs on top of any Python code.

The chatbot runs on a decent CPU machine with a minimum of 16GB of RAM.

Prerequisites

Install package

pip install -r requirements.txt

Run

Convert your PDFs to embeddings

  1. Put your PDF doc under /data folder
  2. Run the script python ingest.py to 'ingest' and embed your docs.
  3. Verify that the index.pkl and index.faiss files are successfully created in the /vectorstore/db_faiss folder.

Run the app

Once you've verified that the embeddings and content have been successfully added to your faiss store, you can run the app chainlit run model.py -w to launch the local dev environment with Chainlit UI, and then type a question in the chat interface.

chainlit_demo_screenshot

Credit:

knowledge-base-question-answering-chatbot's People

Contributors

yqvqy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.