Skip to content

Latest commit

 

History

History
87 lines (54 loc) · 2.74 KB

File metadata and controls

87 lines (54 loc) · 2.74 KB

🤖 RAG PDF Chatbot

A Retrieval-Augmented Generation (RAG) chatbot that allows you to interact with your PDF documents using natural language queries. Powered by Microsoft's BitNet model, this chatbot runs efficiently on CPUs, eliminating the need for costly GPUs.

🚀 Features

  • Local Execution: Ensures data privacy and security.
  • CPU-Only Inference: No GPU required.
  • Efficient Retrieval: Utilizes FAISS for quick document chunk retrieval.
  • Interactive Interface: Built with Streamlit for ease of use.

🛠️ Technologies Used

📦 Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/your-repo-name.git
    cd your-repo-name
    
  2. Create a virtual environment: python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

  3. Install dependencies: pip install -r requirements.txt

  4. Download the BitNet model:

  5. Run the application:

📁 Directory Structure

your-repo-name/ ├── app.py

├── models/ │ └── bitnet-model.gguf

├── rag-dataset/ │ └── your-pdfs.pdf

├── requirements.txt

└── README.md "

🧠 How It Works PDF Processing: Upload PDFs which are then parsed and split into text chunks.

Embedding Generation: Each chunk is converted into embeddings using Hugging Face models.

Vector Store Creation: Embeddings are stored using FAISS for efficient retrieval.

Query Handling: User queries are embedded and compared against the vector store to find relevant chunks.

Response Generation: The BitNet model generates responses based on the retrieved context.

🔒 Security & Efficiency Local Execution: All processes run locally, ensuring data privacy.

CPU Optimization: BitNet's 1.58-bit quantization allows efficient CPU inference.

Cost-Effective: Eliminates the need for expensive GPU resources.

🤝 Contributing Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

📄 License This project is licensed under the MIT License. See the LICENSE file for details.


📌 Additional Tips