An Evaluation Framework for Assessing Quality of Care & Risk in AI Psychotherapy.
The `dataset` folder contains the data generated during my PhD thesis at Northeastern University.
- Python 3.12 is required to run this project.
- Clone the repository:
git clone https://github.com/IanSteenstra/ai-psychotherapy-eval.git cd ai-psychotherapy-eval
The simulation runner executes the AI psychotherapy sessions and logs the data. It requires its own virtual environment.
-
Navigate to the
run_simulationdirectory:cd run_simulation -
Create and activate the simulation environment:
python3.12 -m venv .sim_env source .sim_env/bin/activate -
Install the required dependencies:
pip install -r requirements.txt
-
Configuration: Open
simulation_runner.pyand update theConfigclass with your API keys:GEMINI_API_KEYOPENAI_API_KEYCHARACTERAI_API_KEYCHARACTERAI_ID
-
Run the simulation:
python simulation_runner.py
-
Deactivate the environment when done:
deactivate cd ..
The interactive dashboard reads data from Google BigQuery. After running the simulation, you must upload the generated logs.
Prerequisites:
- Google Cloud SDK (
gcloudandbqCLI tools) installed and authenticated. - A Google Cloud Platform (GCP) project.
-
Navigate to the
run_simulationdirectory (if not already there):cd run_simulation -
Configuration: Open
populate_all_tables.shand update thePROJECT_IDvariable with your GCP project ID:PROJECT_ID="<your-gcp-project-id>" -
Run the upload script:
chmod +x populate_all_tables.sh ./populate_all_tables.sh
This script creates the necessary dataset and tables in BigQuery and uploads the CSV logs from the
logs/directory.
The dashboard allows you to visualize and analyze the simulation results. It is designed to be deployed on Google App Engine, but can be run locally. It requires a separate virtual environment.
-
Navigate to the
interactive_dashboarddirectory:cd interactive_dashboard -
Create and activate the dashboard environment:
python3.12 -m venv .dash_env source .dash_env/bin/activate -
Install the required dependencies:
pip install -r requirements.txt
-
(Optional) Configure Redis for caching: Set the following environment variables if you have a Redis instance:
REDIS_URLorREDIS_HOST,REDIS_PORT,REDIS_PASSWORD
-
Run the dashboard application:
python main.py
-
Open your browser and navigate to:
http://localhost:8080