A secure, private, and local Retrieval-Augmented Generation (RAG) application. This tool allows you to chat with your PDF documents using local LLMs via Ollama, ensuring that your data never leaves your machine.
- 100% Local: Uses Ollama to run LLMs and embeddings locally. No API keys or internet connection required after setup.
- Privacy First: Your documents are processed and stored on your own machine.
- RAG Architecture:
- Ingestion: Loads and cleans PDF text using
pypdf. - Chunking: Splits text into manageable chunks.
- Embeddings: Uses
nomic-embed-textfor high-quality vector representations. - Vector Store: Stores embeddings in a local ChromaDB instance.
- Ingestion: Loads and cleans PDF text using
- Interactive UI: Built with Streamlit for a clean chat interface.
- Multi-Query Retrieval: Uses AI to generate different versions of your question to find the best answers in the text.
- Python 3.9+
- Ollama: Model runner.
- LangChain: Framework for LLM applications.
- ChromaDB: Vector database.
- Streamlit: Frontend UI.
- Python 3.9 or higher installed.
- Ollama installed and running. Download here.
### 1. Clone the repository
```bash
git clone [https://github.com/AbRather/Local-PDF-RAG-with-Ollama-LangChain.git](https://github.com/AbRather/Local-PDF-RAG-with-Ollama-LangChain.git)
cd Local-PDF-RAG-with-Ollama-LangChain