Skip to content

AmolMagar2000/RAG_PDF_Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 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

About

Revolutionizing AI with RAG-Powered PDF Chat on CPU-based

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages