Revolutionize data interaction with a chatbot built using Retrieval-Augmented Generation (RAG) and OpenAI’s GPT-4. Upload documents, create custom knowledge bases, and get precise, contextual answers for research, business operations, and customer support.
The RAG-powered chatbot combines retrieval and generative AI to help users access specific information from custom data sources. By uploading your documents, the chatbot can pull the most relevant data from your files, ensuring high accuracy and up-to-date answers.
Upload Documents:
Create Knowledge Base:
Query Knowledge Base:
Persistent Database:
Clone the repository:
git clone https://github.com/your-username/rag-powered-gpt4-chatbot.git
cd rag-powered-gpt4-chatbotSet up a virtual environment:
python -m venv ragvenv
source ragvenv/bin/activateInstall dependencies:
pip install -r requirements.txtConfigure Azure OpenAI Credentials:
config.env file and add the following Azure OpenAI credentials:
AZURE_OPENAI_ENDPOINT="your-azure-openai-endpoint"
AZURE_OPENAI_API_KEY="your-azure-openai-api-key"
API_VERSION="2024-02-15-preview"Run the application:
python app.pyAccess the application:
http://localhost:8000.Upload a file:
Create a knowledge base:
Query the chatbot:
Access previous databases:
rag-powered-gpt4-chatbot/
├── app.py # Main application script
├── config.env # Configuration file for API keys
├── database/ # Folder for storing database files
├── rag_app.log # Log file for tracking application events
├── requirements.txt # Python dependencies
├── static/ # Static files like CSS
│ └── styles.css # CSS file for basic styling
├── templates/ # HTML templates for the app interface
│ └── index.html # Main page of the app
├── upload_file/ # Directory for storing uploaded files
├── utils.py # Utility functions
Contributions are welcome! Please open an issue or submit a pull request if you'd like to add new features or fix bugs.
This project is licensed under the MIT License - see the LICENSE file for details.