rag-chatbot

rag-chatbot

Chat with multiple PDFs locally

Stars: 245

Visit
 screenshot

rag-chatbot is a tool that allows users to chat with multiple PDFs using Ollama and LlamaIndex. It provides an easy setup for running on local machines or Kaggle notebooks. Users can leverage models from Huggingface and Ollama, process multiple PDF inputs, and chat in multiple languages. The tool offers a simple UI with Gradio, supporting chat with history and QA modes. Setup instructions are provided for both Kaggle and local environments, including installation steps for Docker, Ollama, Ngrok, and the rag_chatbot package. Users can run the tool locally and access it via a web interface. Future enhancements include adding evaluation, better embedding models, knowledge graph support, improved document processing, MLX model integration, and Corrective RAG.

README:

πŸ€– Chat with multiple PDFs locally

alt text

πŸ“– Table of Contents

⭐️ Key Features

  • Easy to run on Local or Kaggle (new)
  • Using any model from Huggingface and Ollama
  • Process multiple PDF inputs.
  • Chat with multiples languages (Coming soon).
  • Simple UI with Gradio.

πŸ’‘ Idea (Experiment)

πŸ’» Setup

1. Kaggle (Recommended)

2. Local

2.1. Clone project

git clone https://github.com/datvodinh/rag-chatbot.git
cd rag-chatbot

2.2 Install

2.2.1 Docker

docker compose up --build

2.2.2 Using script (Ollama, Ngrok, python package)

source ./scripts/install_extra.sh

2.2.3 Install manually

1. Ollama
curl -fsSL https://ollama.com/install.sh | sh
2. Ngrok
  • Macos
brew install ngrok/ngrok/ngrok
  • Linux
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
| sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \
&& echo "deb https://ngrok-agent.s3.amazonaws.com buster main" \
| sudo tee /etc/apt/sources.list.d/ngrok.list \
&& sudo apt update \
&& sudo apt install ngrok
3. Install rag_chatbot Package
source ./scripts/install.sh

2.3 Run

source ./scripts/run.sh

or

python -m rag_chatbot --host localhost
  • Using Ngrok
source ./scripts/run.sh --ngrok

3. Go to: http://0.0.0.0:7860/ or Ngrok link after setup completed

🎯 Todo

  • [x] Add evaluation.
  • [x] Better Document Processing.
  • [ ] Support better Embedding Model for Vietnamese and other languages.
  • [ ] ReAct Agent.
  • [ ] Document mangement (Qrdant, MongoDB,...)

🌟 Star History

Star History Chart

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for rag-chatbot

Similar Open Source Tools

For similar tasks

For similar jobs