Code Monkey home page Code Monkey logo

privatedocbot's Introduction

PrivateDocBot ๐Ÿš€๐Ÿค–

Abhishek LinkedIn Abhishek StackOverflow

Blue and White Illustrative Playful Basic Ai Tools YouTube Thumbnail

๐Ÿ” Local LLM-Powered Chatbot for Secure Document Interactions

gif

Project Overview

Discover the innovation of this chatbot project, seamlessly merging Chainlit user-friendly interface with localized language models ๐ŸŒ. Tailored for sensitive data, it's a vital asset for both organizations and individuals. From deciphering intricate user guides to extracting vital insights from complex PDF reports, this project streamlines data access.

Equipped with advanced technology, it offers an engaging conversational experience. It redefines data interaction, empowering you with control.

Use Cases:

  • Effortless Research: Swiftly extract insights from intricate reports for informed decisions.
  • Enhanced Productivity: Businesses streamline workflows by navigating user manuals seamlessly.
  • Precise Insights: Extract vital data from complex financial reports efficiently.
  • Data Confidentiality: Process sensitive data locally for utmost security.
  • Personalized Access: Instantly retrieve essential information from a variety of PDF documents.
  • Engaging Learning: Educational institutions offer interactive study material access.

Prerequisites

Make sure you have the following installed:

  • Python 3.11.0
  • pip 23.2.1
  • To utilize the online database, you can simply comment out the line database = "local" in the config.toml file. This will ensure that the necessary dependencies are installed.
  • Please note that for the local mode, a functional Node.js installation is essential as it relies on the Prisma CLI for its operation. You can find more details about setting up local persistence in the Chainlit documentation.

Setup Instructions

  1. Clone the project repository using Git.

  2. Download the necessary model from HuggingFace by visiting the following link: Download Llama Model. Once downloaded, move the model file to the "models" directory.

    • also tested with llama-2-7b-chat.ggmlv3.q2_K.bin and mistral-7b-openorca.Q4_K_M.gguf
    • ctransformers Now Support GGUF format support for Llama and Falcon models.
    • Models
  3. Install the required Python packages by running the following command: pip install -r requirements.txt

  4. Place your PDF document in the "data" directory. You can choose the appropriate document loader from the available options to match your requirements. Refer to Document Loaders for more information. Note that the current implementation is designed for PDF documents.

  5. Launch the application using the following command: chainlit run main.py -w

  6. For the initial setup, it's essential to build the vector database. Click on the "Rebuild vector" to initiate this process. Rebuild vector

  7. With the setup complete, you can now ask pertinent questions related to your PDF document. Input your queries and receive informative responses.

Follow these instructions meticulously to ensure seamless functionality and accurate outcomes. Experience the convenience of easily querying your PDF office data for insightful insights!

Welcome screen

To modify the welcome screen, edit the chainlit.md file at the root of your project. If you do not want a welcome screen, just leave this file empty.

Log

pip install langchain[all]
pip install --upgrade langchain
pip install --upgrade python-box
pip install pypdf
pip install -U sentence-transformers
python -m pip install --upgrade pip
pip install ctransformers
pip install chainlit

Note:

Inference speed will depend upon CPU cores and avaialble RAM. It's recomended to have multi core CPU (Laptop / PC) with atleast 16GB RAM. You can deploy it on Server for better performance.

Tested on :

  • Windows 10
  • i7-10510U CPU @ 1.80GHz
  • cores : 4
  • RAM : 16GB

Future Scope:

  • Try adding memory
  • Increase performance by using https://www.ray.io/ or something similar
  • Upgrade to low latency Vector DB
  • Add caching

privatedocbot's People

Contributors

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