- Clone the repository - https://github.com/RayZhou920/Adaptive-Recommendation-Chatbot-with-RAG-and-Vector-Database.
- Clone this repository, and add the evaluate_rag.py file to the Adaptive-Recommendation-Chatbot-with-RAG-and-Vector-Database repository.
- Navigate to your repository directory containing the whole project: ‘cd your-repository’.
- Create a virtual environment: 'pipenv shell'.
- Install the required packages: 'pipenv install'.
- Set up environment variables: Create a .env file in the root directory of your project and add your Pinecone API key, OpenAI API key
- Fetch data from the MySQL website for the example cases: mkdir mysql-docs wget -r -P mysql-docs -E https://www.mysql.com/docs/manual
- Pre-process the data by running the process_data.py script. You should see the following message if successful: Going to add xxx to Pinecone Loading to vectorstore done
- Calculate the metrics for RAG:
Run the evaluate_rag.py script
python evaluate_rag.py