Chat_bot_Rag/README.md

53 lines
1.3 KiB
Markdown

# RAG Chatbot
This repository contains a Retrieval Augmented Generation (RAG) chatbot implementation that can process data and answer questions based on the provided context.
## Requirements
### Python Version
⚠️ **Important**: This project requires Python version lower than 3.12. Python 3.11 works correctly.
## Installation
1. Clone this repository:
```bash
git clone <repository-url>
cd <repository-name>
```
2. Install the required dependencies:
```bash
pip install -r requirement.txt
```
## Usage
### Command Line Interface
Run the chatbot in terminal mode:
```bash
python cli.py
```
### Web Interface
Launch the Gradio web interface:
```bash
python gradio_chatbot.py
```
### RAG Implementation
If you want to import the RAG functionality in your own Python script:
```python
from rag_chatbot import RagChatbot
chatbot = RagChatbot()
response = chatbot.query("your question here")
```
## PDF Processing
The repository includes a Jupyter notebook [`final_pdf.ipynb`](final_pdf.ipynb) for processing PDF documents as knowledge sources for the chatbot.
## Project Structure
- [`cli.py`](cli.py): Command-line interface implementation
- [`gradio_chatbot.py`](gradio_chatbot.py): Gradio web interface
- [`rag_chatbot.py`](rag_chatbot.py): Core RAG implementation
- [`final_pdf.ipynb`](final_pdf.ipynb): Jupyter notebook for PDF processing