This Streamlit application allows users to evaluate Retrieval-Augmented Generation (RAG) systems by uploading JSON files containing query and response data. The app uses OpenAI's API to perform various evaluations on the RAG system's performance.
- Upload and validate JSON files containing RAG system data
- Configure OpenAI API key and model selection
- Evaluate RAG system performance across multiple metrics
- Display evaluation results in a table format
- Download evaluation results as a CSV file
- Python 3.7+
- Streamlit
- OpenAI API key
-
Clone the repository:
git clone https://github.com/yourusername/rag-evaluation-app.git cd rag-evaluation-app
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
-
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run app.py
-
Open your web browser and navigate to the URL provided by Streamlit (usually
http://localhost:8501
). -
In the sidebar, enter your OpenAI API key and select the desired model.
-
Upload a JSON file containing your RAG system data using the file uploader.
-
If the JSON file is valid, click the "Evaluate" button to start the evaluation process.
-
View the evaluation results in the table displayed on the page.
-
Download the results as a CSV file using the "Download Results CSV" button.
The uploaded JSON file should follow this structure:
see output.json
in the repo