RAG for local LLM, enables chat with PDF/docs
Top 45.4% on sourcepulse
ChatPDF is a locally deployed Retrieval Augmented Generation (RAG) system designed for question-answering over documents. It targets users who want to leverage local Large Language Models (LLMs) and embedding models for private, efficient document interaction, supporting various file types and offering advanced RAG techniques.
How It Works
This project implements a RAG pipeline using local LLMs, embedding models, and reranker models, with an emphasis on pure native implementation without external agent libraries. It supports GraphRAG for relational knowledge retrieval and offers flexibility in choosing LLMs (OpenAI, Deepseek, Ollama, etc.) and embedding models (text2vec, HuggingFace, Sentence-Transformers). Optimizations include Chinese chunk splitting, sentence embedding, BM25 with Jieba for keyword matching, and a reranker module to refine candidate chunks, enhancing accuracy.
Quick Start & Requirements
pip install -r requirements.txt
CUDA_VISIBLE_DEVICES=0 python rag.py
python webui.py
(accessible at http://localhost:8082
)python graphrag_demo.py
(requires OPENAI_API_KEY
or Ollama setup)Highlighted Details
Maintenance & Community
shibing624/MedicalGPT
for LLM training.Licensing & Compatibility
Limitations & Caveats
The project is described as "rough code" and welcomes improvements. While it supports various LLMs and embedding models, performance and compatibility may vary depending on the specific local models chosen.
4 months ago
1 day